Accidentally I deleted the source package inside the catkin_ws. Is there a way of getting back the package? And when I create a package inside the source, I couldn’t able to get the package by using the command roscd <package_name> (It says no such package)
Hey, if by source package you mean the src folder, simply creating a new src folder should do the trick.
Use “cd ~/catkin_ws; mkdir src”
As for why you’re not able to get to your package, you’ll need to build the catkin_ws first. Either use catkin build or catkin_make command once you are in the catkin_ws folder after creating your package. It is mentioned in the course for additional reference.
Also don’t forget to source your ws after building it (use source devel/setup.bash).
Hope it solves your problem.
1 Like
Thank you
I did all you said. The problem of ‘no such package’ is solved after I use the command rm -rf devel/ build/. After removing the devel and build, and building my catkin_ws and source it again works for me.
1 Like