ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I had my VM paused from yesterday, turned PC on, resumed VM, opened one terminal, typed roscore, opened another one, typed rosrun package_name, hit tab key twice and the exe appeared.

Every time you open a new terminal, a new bash session is started.

if you have your .bashrc setup to do source ~/catkin_ws/devel/setup.bash for you, then new terminals will cause your workspace to be sourced.

If you add a package, build your workspace, then don't source it, the package will not be found.

If you now open a new terminal - as you say you did - that terminal will start a new bash session, causing your workspace to be sourced. And as the new package has now been built, it will be added to the appropriate environment variables and can then be found - in the new terminals - by rosrun and roslaunch.

I had my VM paused from yesterday, turned PC on, resumed VM, opened one terminal, typed roscore, opened another one, typed rosrun package_name, hit tab key twice and the exe appeared.

Every time you open a new terminal, a new bash session is started.

if you have your .bashrc setup to do source ~/catkin_ws/devel/setup.bash for you, then new terminals will cause your workspace to be sourced.

If you add a package, build your workspace, then don't source it, the package will not be found.

If you now open a new terminal - as you say you did - that terminal will start a new bash session, causing your workspace to be sourced. And as the new package has now been built, it will be added to the appropriate environment variables and can then be found - in the new terminals - by rosrun and roslaunch.


Edit: some related questions:

  • #q269784: setup.bash every time?
  • #q229365: Do I really need to $ source ~/catkin_ws/devel/setup.bash ?
  • #q200174: How to aviod running the command "source devel/setup.bash"
  • #q188309: What does source command actually do?

I had my VM paused from yesterday, turned PC on, resumed VM, opened one terminal, typed roscore, opened another one, typed rosrun package_name, hit tab key twice and the exe appeared.

Every time you open a new terminal, a new bash session is started.

if you have your .bashrc setup to do source ~/catkin_ws/devel/setup.bash for you, then new terminals will cause your workspace to be sourced.

If you add a package, build your workspace, then don't source it, the package will not be found.

If you now open a new terminal - as you say you did - that terminal will start a new bash session, causing your workspace to be sourced. And as the new package has now been built, it will be added to the appropriate environment variables and can then be found - in the new terminals - by rosrun and roslaunch.

For already open terminals (really: bash sessions), just source ~/catkin_ws/devel/setup.bash yourself, and new packages should now be found.


Edit: some related questions:

  • #q269784: setup.bash every time?
  • #q229365: Do I really need to $ source ~/catkin_ws/devel/setup.bash ?
  • #q200174: How to aviod running the command "source devel/setup.bash"
  • #q188309: What does source command actually do?