setup.bash every time?
the last few times I have done anything w ROS while doing beginning tutorials, I just say 'roscore' and it seems to all run fine, but now im watching a video and it seems like he's saying I need to do the setup.bash steps every time I want to use ros. 1. is it necessary to do the setup.bash steps every time? 2.if so, why have I been able to use turtlesim and other things just running roscore?
edit: I went into .bashrc and added source ~/catkin_ws/devel/setup.bash thinking that was what I was missing but then realized the one I was thinking of was already there, called 'source /opt/ros/kinetic/setup.bash'
- is that the one I need to run every time or should I also add the catkin setup to run every time as well?
- also, do I still now need to roscd everytime to enter the workspace?
I can provide my experience. I also used to think that it wasn't needed and it worked for a awhile. Then I made some change and it stopped working. But I lost two days before answers.ros helped me find out what I was doing wrong. I still break rule by putting it in ~/.bashrc instead of typing it.
Hmm, interesting. I added it in my ~/.bashrc now but still interested in the logic. like is it because the setup.bash is connected w catkin and and roscore is a seperate entity? that's my guess rn
What
setup.bash
are you referring to? The one that's in your/opt/ros/<distro>
folder, the one in your catkin workspacedevel
folder, or both?@jayess, I just edited my question to include that.
I deleted my answer so that I don't add to the noise and confusion with overlaying and setting of the env vars with setup.bash
This may be helpful: https://answers.ros.org/question/1883...