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:
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/'
My workspace looks like this
I had the same problem.
I solved it with this command:catkin_create_pkg package_name
inside the src folder on your workspace.