Error when building custom ros2 msg

asked 2023-07-07 14:05:21 -0500

gil-user gravatar image

Hi, I am getting this error when attempting to build my custom ros2 msg. I followed this tutorial on creating a custom ros2 msg (https://docs.ros.org/en/crystal/Tutor...), but when i get to the final step of running:

colcon build --packages-select mbs_ros_msgs

I get the following error:

root@docker-desktop:/home/ros2_ws# colcon build --packages-select mbs_ros_msgs
Starting >>> mbs_ros_msgs
--- stderr: mbs_ros_msgs                             
In file included from /home/ros2_ws/build/mbs_ros_msgs/rosidl_generator_c/mbs_ros_msgs/msg/detail/mbsgpssync__functions.h:19,
                 from /home/ros2_ws/build/mbs_ros_msgs/rosidl_generator_c/mbs_ros_msgs/msg/detail/mbsgpssync__functions.c:4:
/home/ros2_ws/build/mbs_ros_msgs/rosidl_generator_c/mbs_ros_msgs/msg/detail/mbsgpssync__struct.h:22:10: fatal error: mbs_ros_msgs/msg/detail/header__struct.h: No such file or directory
   22 | #include "mbs_ros_msgs/msg/detail/header__struct.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/ros2_ws/build/mbs_ros_msgs/rosidl_generator_c/mbs_ros_msgs/msg/detail/mbsephtoa__functions.h:19,
                 from /home/ros2_ws/build/mbs_ros_msgs/rosidl_generator_c/mbs_ros_msgs/msg/detail/mbsephtoa__functions.c:4:
/home/ros2_ws/build/mbs_ros_msgs/rosidl_generator_c/mbs_ros_msgs/msg/detail/mbsephtoa__struct.h:22:10: fatal error: mbs_ros_msgs/msg/detail/header__struct.h: No such file or directory
   22 | #include "mbs_ros_msgs/msg/detail/header__struct.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/mbs_ros_msgs__rosidl_generator_c.dir/build.make:167: CMakeFiles/mbs_ros_msgs__rosidl_generator_c.dir/rosidl_generator_c/mbs_ros_msgs/msg/detail/mbsgpssync__functions.c.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/mbs_ros_msgs__rosidl_generator_c.dir/build.make:153: CMakeFiles/mbs_ros_msgs__rosidl_generator_c.dir/rosidl_generator_c/mbs_ros_msgs/msg/detail/mbsephtoa__functions.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:213: CMakeFiles/mbs_ros_msgs__rosidl_generator_c.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
In file included from /home/ros2_ws/build/mbs_ros_msgs/rosidl_typesupport_cpp/mbs_ros_msgs/msg/mbsephtoa__type_support.cpp:7:
/home/ros2_ws/build/mbs_ros_msgs/rosidl_generator_cpp/mbs_ros_msgs/msg/detail/mbsephtoa__struct.hpp:20:10: fatal error: 'mbs_ros_msgs/msg/detail/header__struct.hpp' file not found
#include "mbs_ros_msgs/msg/detail/header__struct.hpp"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ros2_ws/build/mbs_ros_msgs/rosidl_typesupport_cpp/mbs_ros_msgs/msg/mbsgpssync__type_support.cpp:7:
/home/ros2_ws/build/mbs_ros_msgs/rosidl_generator_cpp/mbs_ros_msgs/msg/detail/mbsgpssync__struct.hpp:20:10: fatal error: 'mbs_ros_msgs/msg/detail/header__struct.hpp' file not found
#include "mbs_ros_msgs/msg/detail/header__struct.hpp"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
1 error generated.
gmake[2]: *** [CMakeFiles/mbs_ros_msgs__rosidl_typesupport_cpp.dir/build.make:122: CMakeFiles/mbs_ros_msgs__rosidl_typesupport_cpp.dir/rosidl_typesupport_cpp/mbs_ros_msgs/msg/mbsephtoa__type_support.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/mbs_ros_msgs__rosidl_typesupport_cpp.dir/build.make:136: CMakeFiles/mbs_ros_msgs__rosidl_typesupport_cpp.dir/rosidl_typesupport_cpp/mbs_ros_msgs/msg/mbsgpssync__type_support.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:395: CMakeFiles/mbs_ros_msgs__rosidl_typesupport_cpp.dir/all] Error 2
In file included from /home/ros2_ws/build/mbs_ros_msgs/rosidl_typesupport_fastrtps_cpp/mbs_ros_msgs/msg/detail/dds_fastrtps/mbsgpssync__type_support.cpp:4:
In file included from /home/ros2_ws/build/mbs_ros_msgs/rosidl_typesupport_fastrtps_cpp/mbs_ros_msgs/msg/detail/mbsgpssync__rosidl_typesupport_fastrtps_cpp.hpp:11:
/home/ros2_ws/build/mbs_ros_msgs/rosidl_generator_cpp/mbs_ros_msgs/msg/detail/mbsgpssync__struct.hpp:20:10: fatal error: 'mbs_ros_msgs/msg/detail/header__struct.hpp' file not found
#include "mbs_ros_msgs/msg/detail/header__struct.hpp"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ros2_ws/build/mbs_ros_msgs/rosidl_typesupport_introspection_cpp/mbs_ros_msgs/msg/detail/mbsgpssync__type_support.cpp:12:
/home/ros2_ws/build/mbs_ros_msgs/rosidl_generator_cpp/mbs_ros_msgs/msg/detail/mbsgpssync__struct.hpp:20:10: fatal error: 'mbs_ros_msgs/msg/detail/header__struct.hpp' file not found
#include "mbs_ros_msgs/msg/detail/header__struct.hpp"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[2]: *** [CMakeFiles/mbs_ros_msgs__rosidl_typesupport_introspection_cpp ...
(more)
edit retag flag offensive close merge delete

Comments

Hi, did you found a solution?

robin_rob96 gravatar image robin_rob96  ( 2023-07-27 14:10:46 -0500 )edit