Ask Your Question
0

roscd returns roscd: No such package/stack '<package_name>'

asked 2013-06-25 15:51:51 -0500

Hello! I am using ROS Groovy on Linux 3.2.0-48-generic-pae. When I am using roscd <package> I get the output

roscd: No such package/stack '<package>'

on my terminal. I have checked the package exists, and I can cd into the package when I use the full path. I have tried deleting everything including the catkin_ws and recreated the package. However, I still unable to roscd into the packages I have created. Is their anything I am doing wrong? or understanding wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2013-06-25 16:40:23 -0500

lindzey gravatar image

updated 2013-06-26 04:33:08 -0500

I'm assuming that you created the package by doing something like "cd ~catkin_ws/src; catkin_create_pkg <pkgname> <dependencies>". Can you roscd to other packages in your catkin_ws? If not, you probably haven't sourced the appropriate setup.bash file (you probably want "source ~catkin_ws/devel/setup.bash").

EDIT: (I'm assuming that you're using bash as your shell, running on Ubuntu) Each catkin workspace includes a setup.bash file that in turn runs a setup.sh file that sets environment variables needed for the various ros tools to work correctly. (e.g. specifying where in your system to look for ros packages).

Typing "source ~catkin_ws/devel/setup.bash" (where ~catkin_ws is the path to your catkin workspace) in your terminal will cause the commands in this file to be run.

If you want to avoid having to do that in every terminal that you open, add that command as a line in your ~/.bashrc file, which will cause it to be run every time you open a new terminal.

edit flag offensive delete link more

Comments

Hey lindzey, thanks for the answer. Can you tell me a bit more in detail about how to do that(source the setup.bash file) Thanks in advance. Edit: It worked! Thanks.

expelliarmus gravatar image expelliarmus  ( 2013-06-26 04:16:07 -0500 )edit

Just to clarify because this answer was helpful but tripped me up, I first tried adding source ~catkin_ws/devel/setup.bash to my ~/.bashrc file and that gave an error. Instead I had to add source catkin_ws/devel/setup.bash (removing the "~").

SeaTail gravatar image SeaTail  ( 2014-11-15 16:32:15 -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: 2013-06-25 15:51:51 -0500

Seen: 5,369 times

Last updated: Jun 26 '13