# why roscd does not find the package I create?

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 close merge delete ## Comments 2 Have you sourced your devel/setup.bash? ( 2018-04-18 11:32:55 -0500 )edit Running $ rospack profile might solve your issue if the above still doesn't work.

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

I actually forgot to source it. Anyway thanks

( 2018-04-20 04:02:21 -0500 )edit

Sort by » oldest newest most voted

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.

more

Thanks, It did work :)

( 2018-04-20 03:56:22 -0500 )edit