How to source setup.bash with catkin build?
Hi, I'm having some problems with catkin build for my workspace. I've followed the next steps:
- $ mkdir -p ~/catkin_tools_ws/src
- $ source /opt/ros/melodic/setup.bash
- $ cd ~/catkin_tools_ws
- $ catkin init
- $ catkin build
- $ source ~/catkin_tools_ws/devel/setup.bash
It builds correctly without errors or warnings, but if I type 'roscd' it sends me to /opt/ros/melodic
and not to my workspace.
The weird thing is that if i create the workspace with catkin_make, it works perfectly.
Thanks for your time
Are those really all the steps you do?
Because if you haven't
source /opt/ros/melodic/setup.bash
before step 2,catkin init
should complain about "not extend[ing] any other result space", which woud lead to what you describe.Hi gvdhoorn, yes I did it but i forgot to add it in the description. However when i source the setup.bash of my workspace, ROS_PACKAGE_PATH continues to be only '/opt/ros/melodic/share'...
re:
ROS_PACKAGE_PATH
: I would say that is normal, as you have no packages in your workspace as far as I can tell.If you want more specific help, edit your original question to show us the exact steps you take when initialising and building your workspace.
Thanks to you for your time :)