How can i reset catkin_ws?

i have done something wrong and i keep getting error when i did catkin_make. and i think i need to reset everything

You can reset everything by changing of course or to a unit in the same course that changes the simulation.

Although if its something related to the catkin_ws, try to remove the build, devel and the files in src, and run catkin_make again. With a clean src there shouldn’t be any problems.

But please post the error you are getting so you get better help :wink:

1 Like

No, it does not work ! When I change course or unit in the course, I have the same old settings. Please why is there not trivial way to reset to default setttings. I cannot even express how frustrating is this for me - not being to reset everything and start from beginning. I am beginner, I make tons of irreversible mistakes - I NEED RESET BUTTON PLEASE

Hi @t.hri,

I apologize for the problem you are having. The next time your launch the course, you can manually reset your workspace (pending the implementation of an automatic system to do this) by typing the following commands:

WARNING: This will remove all files in the catkin_ws directory and subdirectories so please backup any important files first.

rm -rf /home/user/catkin_ws/src/
rm -rf /home/user/catkin_ws/build/
rm -rf /home/user/catkin_ws/devel/
mkdir -p /home/user/catkin_ws/src/
cd /home/user/catkin_ws/
catkin_make
1 Like

How long before my workspace gets restarted automatically ? I have done irreversible mistake again and I cannot use it anymore… I deleted some files by mistake… God, please make it easy to restart. It shouldnt be even vote request, its so obvious, that the beginner needs to be able to restart everything, because we dont know what we are doing… Your commands contain typos I believe, but they dont help me, because I already made irreversible mistake…

Hi @t.hri,

Sorry about the typos in the commands; I’ve corrected them.

If you get off the system for about 20 mins, your workspace will be automatically reset. But can you tell us the files you mistakenly deleted? Perhaps there’s a way to solve this without waiting for 20 mins…

Thank you, but I cannot tell what have I done, I just know I make irreversible mistakes sometimes and just want to say “Ehhh, lets start from the beginning” - which is not something I am able to easily do (now I will just wait 20 min or so for automatic restart). You have already helped 100% (you made the feature request). I hope it will go through, because its just crucial to be able to experiment and fall back to “clean workspace”…

Hi,

I have the same problem and followed your suggestions, but I get this error

Created file my_pkg/CMakeLists.txt
Created file my_pkg/package.xml
Created folder my_pkg/src
Successfully created files in /home/user/catkin_ws/src/my_pkg. Please adjust the values in package.xml.

Hi @valentinasoana,

Please where is the error you got? The output you shared is the one you get when you have successfully created a package.

Well I had this mistake too. And I solved using this commands manually. Thanks very much @bayodesegun you saved my day!
In my case I have overwritten the “main” CMakeLists" and Package.xml from src (home/user/catkin_ws) with the CmakeLists and Package.xml from the my_robot_control package which I have created during the class. This happened when I tried to move these files from directories by mistake…

I would suggest the @staff put in this class which dependencies are necessary to create the pkg, because I needed to look in the source directory using roscd “robot_controllers” packages…and I really used more than 20 dependencies which I have found there in these packages hahaha…I think it uses less than those…but maybe you forgot to put in this class during the preparation of it. Regards: Marcus

1 Like