Ask Your Question
1

Multiple packages in catkin workspace?

asked 2017-06-28 01:16:16 -0500

space gravatar image

Hi! I'm just starting out with ROS. I'm trying to create multiple packages in the same workspace, but tab complete fails for some inexplicable (to me) reason. I've outlined the steps below. Can anyone help me figure out why this is happening?

mkdir catkin_ws/src
cd catkin_ws/src/
catkin_init_workspace

In catkin_ws/src:

catkin_create_pkg pkg1

Then in catkin_ws

catkin_make
source devel/setup.bash

This allows me to tab complete rosrun pkg1 ...

However, when I create a second package in catkin_ws/src named 'pkg2' following the same steps, run catkin_make again and try to tab complete 'rosrun pk', I'm only shown 'pkg1'. Shouldn't ROS allow me to create multiple packages in the same folder?

edit retag flag offensive close merge delete

Comments

1

[..] following the same steps [..]

Which steps are you repeating, specifically?

gvdhoorn gravatar image gvdhoorn  ( 2017-06-28 01:45:19 -0500 )edit

In catkin_ws/src:

catkin_create_pkg pkg2

Then in catkin_ws

catkin_make
source devel/setup.bash
space gravatar image space  ( 2017-06-28 01:57:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-06-28 02:02:26 -0500

gvdhoorn gravatar image

updated 2017-06-28 02:02:38 -0500

Sometimes the rospkg cache isn't updated fast enough when you do these things.

Try -- after you've sourced devel/setup.bash -- to run rospack profile and see if that helps.

edit flag offensive delete link more

Comments

I just tried again without changing anything and it works. Looks like you're right. rospack profile list the directory structure up to the src folder containing the packages, but not the packages themselves. Is there something else I can do to see if the cache has been updated? Thanks!

space gravatar image space  ( 2017-06-28 02:12:55 -0500 )edit

I wouldn't bother with the output of rospack profile for now, it's not really relevant for your purpose.

gvdhoorn gravatar image gvdhoorn  ( 2017-06-28 02:19:05 -0500 )edit

Found the bit detailing what rospack profile does here: http://wiki.ros.org/rospack/Troubleshooting. Issue resolved. Thanks!

space gravatar image space  ( 2017-06-28 02:30:21 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-06-28 01:16:16 -0500

Seen: 2,545 times

Last updated: Jun 28 '17