accidentally deleted build folder inside the catkin_ws folder
I accidentally deleted the build
folder inside the catkin_ws
directory by running rm -rf build
inside the catkin_ws
directory. It seems to have broken some things. I am not able to build any package by running catkin build <package_name>
.
Is there a way I can fix the issue?
This is the terminal output -
Profile: default
Extending: [cached] /opt/ros/melodic
Workspace: /home/skpro19/catkin_ws
------------------------------------------------------------
Build Space: [exists] /home/skpro19/catkin_ws/build
Devel Space: [exists] /home/skpro19/catkin_ws/devel
Install Space: [unused] /home/skpro19/catkin_ws/install
Log Space: [exists] /home/skpro19/catkin_ws/logs
Source Space: [exists] /home/skpro19/catkin_ws/src
DESTDIR: [unused] None
------------------------------------------------------------
Devel Space Layout: linked
Install Space Layout: None
------------------------------------------------------------
Additional CMake Args: None
Additional Make Args: None
Additional catkin Make Args: None
Internal Make Job Server: True
Cache Job Environments: False
------------------------------------------------------------
Whitelisted Packages: None
Blacklisted Packages: None
------------------------------------------------------------
Workspace configuration appears valid.
------------------------------------------------------------
[build] Found '105' packages in 0.0 seconds.
[build] Package table is up to date.
Starting >>> controller_manager_msgs
Starting >>> gazebo_dev
Starting >>> geometry_msgs
Starting >>> grid_map_core
Starting >>> husky_description
Starting >>> husky_msgs
Starting >>> map_msgs
Starting >>> my_turtlebot2_training
Finished <<< my_turtlebot2_training [ 0.1 seconds ]
Starting >>> roscpp
Finished <<< gazebo_dev [ 0.1 seconds ]
Starting >>> tf
Finished <<< grid_map_core [ 0.2 seconds ]
Finished <<< husky_description [ 0.1 seconds ]
Finished <<< geometry_msgs [ 0.2 seconds ]
Finished <<< husky_msgs [ 0.4 seconds ]
Starting >>> grid_map_cv
Starting >>> grid_map_octomap
Starting >>> grid_map_sdf
Starting >>> autonomous_mapping_package
Finished <<< roscpp [ 0.1 seconds ]
Starting >>> exploration_msgs
Finished <<< controller_manager_msgs [ 0.5 seconds ]
Starting >>> gazebo_msgs
Finished <<< tf [ 0.1 seconds ]
Starting >>> move_base_msgs
Finished <<< grid_map_octomap [ 0.2 seconds ]
Starting >>> teleop_twist_keyboard
Finished <<< grid_map_sdf [ 0.2 seconds ]
Starting >>> tf2_msgs
__________________________________________________________________________
Errors << map_msgs:cmake /home/skpro19/catkin_ws/logs/map_msgs/build.cmake.006.log
CMake Error at /home/skpro19/catkin_ws/build/map_msgs/cmake/map_msgs-genmsg.cmake:3 (message):
Could not find messages which
'/home/skpro19/catkin_ws/src/navigation_msgs/map_msgs/msg/ProjectedMap.msg'
depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?
Cannot locate message [Pose] in package [geometry_msgs] with paths
[['/home/skpro19/catkin_ws/devel/share/geometry_msgs/cmake/../msg']]
Call Stack (most recent call first):
/opt/ros/melodic/share/genmsg/cmake/genmsg-extras.cmake:307 (include)
CMakeLists.txt:29 (generate_messages)
cd /home/skpro19/catkin_ws/build/map_msgs; catkin build --get-env map_msgs | catkin env -si /usr/bin/cmake /home/skpro19/catkin_ws/src/navigation_msgs/map_msgs --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/skpro19/catkin_ws/devel/.private/map_msgs -DCMAKE_INSTALL_PREFIX=/home/skpro19/catkin_ws/install; cd -
..........................................................................
Failed << map_msgs:cmake [ Exited with code 1 ]
Failed <<< map_msgs [ 0.8 seconds ]
Abandoned <<< actionlib [ Unrelated job failed ]
Abandoned <<< adhoc_communication [ Unrelated job failed ]
Abandoned <<< beginner_tutorials [ Unrelated job failed ]
Abandoned <<< display_point [ Unrelated job failed ]
Abandoned <<< grid_map_msgs [ Unrelated job failed ]
Abandoned <<< hardware_interface [ Unrelated job failed ]
Abandoned <<< map_stitch_package [ Unrelated job failed ]
Abandoned <<< multihusky_viz [ Unrelated job failed ]
Abandoned <<< voxel_grid [ Unrelated job failed ]
Abandoned <<< rqt_controller_manager [ Unrelated job failed ]
Abandoned <<< gmapping [ Unrelated job failed ]
Abandoned <<< husky_bringup [ Unrelated job failed ]
Abandoned <<< husky_control [ Unrelated job failed ]
Abandoned <<< husky_gazebo [ Unrelated job ...
If I create a new
catkin
workspace and move the package files from inside thecatkin_ws/src
folder to the new catkin workspace'ssrc
folder, I am build to those packages. This is strange.@skpro19 well that's solved then haha....just use that new workspace.
Actually, I am not able to build the packages in the new catkin_ws.
I'm sorry to have to do this for something so seemingly unimportant, but please don't post screenshots of terminal text in question on ROS Answers. It's all text, so there is no need. Just copy-paste the text from the terminal into your question text. Do make sure to format it properly by selecting the text and pressing
ctrl+k
(or clicking the Preformatted Text button (the one with101010
on it)).You don't need to post a new question, just edit your curent one. You can use the
edit
button/link for this.After you replace the screenshot with the error message itself, we can re-open your question.
And @skpro19: you've been around for some time now, so this should not be new to you.
@gvdhoom I have edited my question to make the changes suggested by you.
All the errors pertain to
geometry_msgs
, which you appear to have built from source. Have you modified that package since it was last built? Also, can you please confirm whether you've triedcatkin clean
before building everything again?Can you try to do
catkin clean --all -y
in your catkin_ws and try again to build the workspace.@tryan I didn't modify that package. I did trying
catkin clean
before building everyting again.