Help! my src folders (packages) were erased when the desktop timed out

I’m taking the ROS in 5 days course and I was working on Unit 6. Because I had an error compiling the custom service message ("No module named ‘my_custom_srv_msg_pkg.srv’; ‘my_custom_srv_msg_pkg’ is not a package”), and couldn’t find a solution on the Forum, I followed the advice of several participants and deleted the catkin_ws build and devel folders and did a catkin_make. I kept getting the same error:

CMake Error at /opt/ros/noetic/share/genmsg/cmake/genmsg-extras.cmake:271 (message):
Could not find ‘share/rospy/cmake/rospy-msg-paths.cmake’ (searched in

So, I decided to try baby steps: I moved all of my packages that were in my catkin_ws/src folder (all the work from Units 3,4,5,6) into a separate src folder in my home directory (i.e., a peer of catkin_ws). I only moved a basic package that had no custom topic or service messages in it into catkin_ws/src. I was able to execute the python programs fine, so I then tried building the custom message Age.msg from Unit 4 following all the notebook’s instructions. I got the same “Could not find 'share/rospy/cmake/rospy-msg-paths.cmake” error. So this is where I left my troubleshooting.

So I took a break for dinner, and the Construct desktop timed out. When I came back to resume my work, I discovered my src folder in my home directory (/home/user) was missing. How do I recover all those packages? I don’t want to have to redo all the coding from those course units.

Thanks, in advance. Ray Kimber


Please check your email for the latest version of your rosject before the files were moved. In the future, please make copies instead of moving it, only the contents in your catkin_ws are saved. Try compiling everything again and following the instructions from the course again.