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.
- 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?
Originally posted by moonspacedancer on ROS Answers with karma: 123 on 2017-08-28
Post score: 0
Original comments
Comment by billy on 2017-08-28:
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.
Comment by moonspacedancer on 2017-08-28:
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
Comment by jayess on 2017-08-28:
What setup.bash
are you referring to? The one that's in your /opt/ros/<distro>
folder, the one in your catkin workspace devel
folder, or both?
Comment by moonspacedancer on 2017-08-28:
@jayess, I just edited my question to include that.
Comment by jayess on 2017-08-28:
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
Comment by jayess on 2017-08-28:
This may be helpful: https://answers.ros.org/question/188309/what-does-source-command-actually-do/?answer=188313#post-id-188313