Search code examples
linuxnodesrosubuntu-20.04

Why do I get a roscd: No such package/stack ’test_pub_sub/src’ error when I run roscd?


I tried to create 2 nodes shared a string message in a custom package. I use ubuntu 20.04 and ROS noetic

After installing ROS. I did do the following steps:

  1. I have created a catkin workspace
  2. created a package
  3. installed the package to standard messages
  4. Compile the catkin workspace

When I then tried to source the environment, I got an roscd: No such package/stack ’test_pub_sub/src’ error. What I did was running the following commands:

cd catkin_ws 
source devel/setup.bash 
roscd 'test_pub_sub/src/'

erorr message

My workspace looks like this

workspace


Solution

  • I had the same problem. I solved it with this command:catkin_create_pkg package_name inside the src folder on your workspace.