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

can't use roscd to find package?

asked 2017-02-16 04:24:44 -0600

Tomas yuan gravatar image

First ,I create a workspace ,then create a package ,and things all go right . Then I creat my second package in the same workspace ,and catkin_make ,but I can't roscd the second packgage! I can roscd the first package!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
6

answered 2017-02-16 04:53:58 -0600

gvdhoorn gravatar image

If you've just catkin_maked your workspace with your second package:

  • make sure to source /path/to/catkin_ws/devel/setup.bash again (you'll have to do this after every package addition / removal)
  • run rospack profile to force an update of the package cache that roscd uses
edit flag offensive delete link more

Comments

thanks , since I source the devel/setup.bash ,the problem has been solved !

Tomas yuan gravatar image Tomas yuan  ( 2017-02-16 05:53:58 -0600 )edit

Hello, Thanks this answer was helpful, I just have a small doubt, is it possible to directly add a sourcing line to my bashrc file ?

microbot gravatar image microbot  ( 2019-06-22 09:21:28 -0600 )edit

is it possible to directly add a sourcing line to my bashrc file ?

yes, but as you can read in my answer:

you'll have to [source] after every package addition / removal

so unless you source your .bashrc again after adding or removing packages, it still won't work.

And at that point you're sourceing either the devel/setup.bash or your .bashrc, which is the exact same amount of commands.

gvdhoorn gravatar image gvdhoorn  ( 2019-06-22 09:24:14 -0600 )edit

Thank you, this helps

microbot gravatar image microbot  ( 2019-06-22 09:32:51 -0600 )edit

Question Tools

Stats

Asked: 2017-02-16 04:24:44 -0600

Seen: 6,515 times

Last updated: Feb 16 '17