Building Movit2 on Foxy / Ubuntu 20.04
Hi
Just built Foxy from source following these instructions:
https://index.ros.org/doc/ros2/Instal...
And I tried to build Moveit2 following these instructions:
https://moveit.ros.org/install-moveit...
But the build fails:
snortman@DESKTOP-ST1BND8:~/ws_ros2$ colcon build --event-handlers desktop_notification- status- --cmake-args -
Starting >>> geometric_shapes
Starting >>> moveit_msgs
Starting >>> srdfdom
Starting >>> moveit_common
Starting >>> hardware_interface
Starting >>> moveit_resources_panda_description
Starting >>> warehouse_ros
Starting >>> moveit_resources_fanuc_description
--- stderr: geometric_shapes
CMake Error: The source directory "/home/snortman/ws_ros2/build/geometric_shapes/-" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
---
Failed <<< geometric_shapes [0.27s, exited with code 1]
--- stderr: moveit_msgs
CMake Error: The source directory "/home/snortman/ws_ros2/build/moveit_msgs/-" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
---
Failed <<< moveit_msgs [0.25s, exited with code 1]
--- stderr: srdfdom
CMake Error: The source directory "/home/snortman/ws_ros2/build/srdfdom/-" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
---
Failed <<< srdfdom [0.23s, exited with code 1]
--- stderr: moveit_common
CMake Error: The source directory "/home/snortman/ws_ros2/build/moveit_common/-" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
---
Failed <<< moveit_common [0.22s, exited with code 1]
--- stderr: hardware_interface
CMake Error: The source directory "/home/snortman/ws_ros2/build/hardware_interface/-" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
---
Failed <<< hardware_interface [0.20s, exited with code 1]
Aborted <<< moveit_resources_fanuc_description [0.14s]
Aborted <<< moveit_resources_panda_description [0.18s]
Aborted <<< warehouse_ros [0.16s]
Summary: 0 packages finished [0.71s]
5 packages failed: geometric_shapes hardware_interface moveit_common moveit_msgs srdfdom
3 packages aborted: moveit_resources_fanuc_description moveit_resources_panda_description warehouse_ros
7 packages had stderr output: geometric_shapes hardware_interface moveit_common moveit_msgs moveit_resources_panda_description srdfdom warehouse_ros
37 packages not processed
I made sure to source from /opt/ros/foxy/setup.bash and dependencies were OK:
snortman@DESKTOP-ST1BND8:~/ws_ros2$ rosdep install -r --from-paths . --ignore-src --rosdistro foxy -y
#All required rosdeps installed successfully
Not sure how to resolve..
Thanks Scott
It looks like colcon build arguments are not enough. Add
DCMAKE_BUILD_TYPE=Release
after the last-
. So, try below.colcon build --event-handlers desktop_notification- status- --cmake-args -DCMAKE_BUILD_TYPE=Release
Thank you! That solved the problem
Please don't use an answer to leave a comment, this isn't a forum
@urad it seems like your comment solved @scott.nortman@gmail.com's question. Perhaps you could make it an answer so others will know that this solution worked?