Roscd: No such package

Hi, I created a package using ~/catkin_ws/src$ catkin_create_pkg ejemplo2 rospy BUT when I made the next step user:~/catkin_ws/src$ roscd ejemplo2, it show me this mistake, I am confused.
roscd: No such package/stack 'ejemplo2’

user:~/catkin_ws/src$ ls
CMakeLists.txt ejemplo2

Thanks for your help

try executing rospack profile to make ROS refresh its list of packages

2 Likes

Thanks, but it show me the same mistake, I am confused.
**roscd: No such package/stack 'ejemplo2’**m I am using the construct interface web

Please I need help moderators the contruct

user:~/catkin_ws/src$ catkin_create_pkg ejemplo2 rospy2
Created file ejemplo2/package.xml
Created file ejemplo2/CMakeLists.txt
Successfully created files in /home/user/catkin_ws/src/ejemplo2. Please adjust the values in package.xml. BUT then I use roscd ejemplo2 and make a mistake

Hello @Ayrton ,

After creating your package, compile and source your workspace with:

cd ~/catkin_ws
catkin_make
source devel/setup.bash

You can also run after the command suggested by @pavlostd : rospack profile

Best,

Thanks, I did that you recomemd me and it show me

user:~/catkin_ws$ catkin_make
Base path: /home/user/catkin_ws
Source space: /home/user/catkin_ws/src
Build space: /home/user/catkin_ws/build
The build space at ‘/home/user/catkin_ws/build’ was previously built by ‘catkin build’. Please remove the build space or pick a different build space.

I am not sure if this msg is correct ??

Hey,

Try removing your build and devel folders and compiling again:

cd ~/catkin_ws
rm -rf build/ devel/
catkin_make

These issues happen when you combine catkin build and catkin_make