Ask Your Question
0

why roscd does not find the package I create?

asked 2018-04-18 11:16:17 -0500

MTV1368 gravatar image

updated 2018-04-18 11:31:35 -0500

jayess gravatar image

Hello everyone, I create beginner_tutorial package as it is instructed in the tutorial. However, I cant use roscd on it. every time it said that there is no such package or stack. I can use cd ~/catkin_ws/src/beginner_tutorial to have access to it.

I closed all the terminals previously. Does it related to this?

here's what it said:

mehrdadtavassoli@ubuntu:~$ roscd beginner_tutorials
roscd: No such package/stack 'beginner_tutorials'

same thing applies for:

$ roscd dev

Lastly, it works perfectly fine for the following:

$ roscd roscpp

Thanks in advance

edit retag flag offensive close merge delete

Comments

2

Have you sourced your devel/setup.bash?

jayess gravatar image jayess  ( 2018-04-18 11:32:55 -0500 )edit

Running $ rospack profile might solve your issue if the above still doesn't work.

BrettHemes gravatar image BrettHemes  ( 2018-04-18 15:47:11 -0500 )edit

I actually forgot to source it. Anyway thanks

MTV1368 gravatar image MTV1368  ( 2018-04-20 04:02:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-04-19 02:59:30 -0500

jotator gravatar image

The problem is that roscd is not aware of the existence of your catkin_ws workspace. You need to build the workspace so that catkin generates additional setup scripts, then source them so that your workspace becomes part of the environment and roscd knows about it.

In your catkin worspace directory (I assume its ~/catkin_ws from the tutorials) these commands should work:

$ catkin_make
$ . ~/catkin_ws/devel/setup.bash

After this, use the following command to check that environment was setup correctly:

$ printenv | grep ROS

The ROS_PACKAGE_PATH variable there should contain your catkin_ws.

Keep in mind that you must do this every time you open a new terminal.

edit flag offensive delete link more

Comments

Thanks, It did work :)

MTV1368 gravatar image MTV1368  ( 2018-04-20 03:56:22 -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

2 followers

Stats

Asked: 2018-04-18 11:16:17 -0500

Seen: 2,037 times

Last updated: Apr 19 '18