hmakelin / gisnav

Estimates airborne drone global position by matching video to map retrieved from onboard GIS server.
https://hmakelin.github.io/gisnav
MIT License
49 stars 21 forks source link

make error #90

Closed JiatengSun closed 11 months ago

JiatengSun commented 12 months ago

What's the issue fatal error: px4_msgs/msg/detail/vehicle_command__struct.h: No such file or directory

Describe it in detail sudo make -C docker demo fails

Logs, screenshots, and other supporting information make: Entering directory '/home/dky/Documents/gisnav/docker' [+] Building 19.9s (14/17) docker:default => [micro-ros-agent internal] load build definition from Dockerfile 0.2s => => transferring dockerfile: 483B 0.0s => [micro-ros-agent internal] load .dockerignore 0.3s => => transferring context: 2B 0.0s => [mavros internal] load build definition from Dockerfile 0.6s => => transferring dockerfile: 1.37kB 0.0s => [mavros internal] load .dockerignore 0.8s => => transferring context: 2B 0.0s => [micro-ros-agent internal] load metadata for docker.io/microros/micro-ros-agent:foxy 1.2s => [mavros internal] load metadata for docker.io/library/ros:humble 1.0s => CACHED [micro-ros-agent 1/2] FROM docker.io/microros/micro-ros-agent:foxy@sha256:21ff98ba8 0.0s => ERROR [micro-ros-agent 2/2] RUN cd /uros_ws && mkdir src && cd src && git clo 11.3s => [mavros internal] load build context 0.1s => => transferring context: 98B 0.0s => [mavros 1/8] FROM docker.io/library/ros:humble@sha256:b10a245d08934951639451b72eb384061ca6 0.0s => CACHED [mavros 2/8] COPY * / 0.0s => CACHED [mavros 3/8] RUN chmod 755 entrypoint.sh edit_mavros.sh 0.0s => CACHED [mavros 4/8] RUN apt update --fix-missing && apt -y dist-upgrade && apt -y 0.0s => CACHED [mavros 5/8] WORKDIR /opt/colcon_ws 0.0s => [mavros 6/8] RUN mkdir src && cd src && git clone --branch gimbal-protocol-v2-plu 17.8s => => # Cloning into 'mavros'...


[micro-ros-agent 2/2] RUN cd /uros_ws && mkdir src && cd src && git clone https://github.com/px4/px4_msgs.git && sed -i 's/*.msg/SensorGps.msg/g' px4_msgs/CMakeLists.txt && cd .. && . /opt/ros/foxy/setup.sh && colcon build --packages-select px4_msgs:
0.651 Cloning into 'px4_msgs'...
6.288 Starting >>> px4_msgs
9.777 --- stderr: px4_msgs 9.777 In file included from /uros_ws/build/px4_msgs/rosidl_generator_c/px4_msgs/srv/detail/vehicle_commandfunctions.h:19, 9.777 from /uros_ws/build/px4_msgs/rosidl_generator_c/px4_msgs/srv/detail/vehicle_commandfunctions.c:4: 9.777 /uros_ws/build/px4_msgs/rosidl_generator_c/px4_msgs/srv/detail/vehicle_commandstruct.h:22:10: fatal error: px4_msgs/msg/detail/vehicle_commandstruct.h: No such file or directory 9.777 22 | #include "px4_msgs/msg/detail/vehicle_commandstruct.h" 9.777 | ^~~~~~~~~~~ 9.777 compilation terminated. 9.777 make[2]: *** [CMakeFiles/px4_msgs__rosidl_generator_c.dir/build.make:123: CMakeFiles/px4_msgsrosidl_generator_c.dir/rosidl_generator_c/px4_msgs/srv/detail/vehicle_commandfunctions.c.o] Error 1 9.777 make[2]: Waiting for unfinished jobs.... 9.777 make[1]: [CMakeFiles/Makefile2:334: CMakeFiles/px4_msgsrosidl_generator_c.dir/all] Error 2 9.777 make[1]: *** Waiting for unfinished jobs.... 9.777 In file included from /uros_ws/build/px4_msgs/rosidl_typesupport_cpp/px4_msgs/srv/vehicle_commandtype_support.cpp:7: 9.777 /uros_ws/build/px4_msgs/rosidl_generator_cpp/px4_msgs/srv/detail/vehicle_commandstruct.hpp:19:10: fatal error: px4_msgs/msg/detail/vehicle_commandstruct.hpp: No such file or directory 9.777 19 | #include "px4_msgs/msg/detail/vehicle_commandstruct.hpp" 9.777 | ^~~~~~~~~~~~~ 9.777 compilation terminated. 9.777 make[2]: [CMakeFiles/px4_msgs__rosidl_typesupport_cpp.dir/build.make:92: CMakeFiles/px4_msgsrosidl_typesupport_cpp.dir/rosidl_typesupport_cpp/px4_msgs/srv/vehicle_commandtype_support.cpp.o] Error 1 9.777 make[2]: Waiting for unfinished jobs.... 9.777 In file included from /uros_ws/build/px4_msgs/rosidl_typesupport_introspection_cpp/px4_msgs/srv/detail/vehicle_commandtype_support.cpp:12: 9.777 /uros_ws/build/px4_msgs/rosidl_generator_cpp/px4_msgs/srv/detail/vehicle_commandstruct.hpp:19:10: fatal error: px4_msgs/msg/detail/vehicle_commandstruct.hpp: No such file or directory 9.777 19 | #include "px4_msgs/msg/detail/vehicle_command__struct.hpp" 9.777 | ^~~~~~~~~~~~~ 9.777 compilation terminated. 9.777 make[2]: *** [CMakeFiles/px4_msgsrosidl_typesupport_introspection_cpp.dir/build.make:100: CMakeFiles/px4_msgsrosidl_typesupport_introspection_cpp.dir/rosidl_typesupport_introspection_cpp/px4_msgs/srv/detail/vehicle_commandtype_support.cpp.o] Error 1 9.777 make[2]: Waiting for unfinished jobs.... 9.777 In file included from /uros_ws/build/px4_msgs/rosidl_typesupport_fastrtps_cpp/px4_msgs/srv/detail/vehicle_commandrosidl_typesupport_fastrtps_cpp.hpp:11, 9.777 from /uros_ws/build/px4_msgs/rosidl_typesupport_fastrtps_cpp/px4_msgs/srv/detail/dds_fastrtps/vehicle_command__type_support.cpp:4: 9.777 /uros_ws/build/px4_msgs/rosidl_generator_cpp/px4_msgs/srv/detail/vehicle_commandstruct.hpp:19:10: fatal error: px4_msgs/msg/detail/vehicle_commandstruct.hpp: No such file or directory 9.777 19 | #include "px4_msgs/msg/detail/vehicle_commandstruct.hpp" 9.777 | ^~~~~~~~~~~~~ 9.777 compilation terminated. 9.777 make[2]: [CMakeFiles/px4_msgsrosidl_typesupport_fastrtps_cpp.dir/build.make:100: CMakeFiles/px4_msgsrosidl_typesupport_fastrtps_cpp.dir/rosidl_typesupport_fastrtps_cpp/px4_msgs/srv/detail/dds_fastrtps/vehicle_commandtype_support.cpp.o] Error 1 9.777 make[2]: Waiting for unfinished jobs.... 9.777 make[1]: [CMakeFiles/Makefile2:472: CMakeFiles/px4_msgsrosidl_typesupport_cpp.dir/all] Error 2 9.777 make[1]: [CMakeFiles/Makefile2:526: CMakeFiles/px4_msgs__rosidl_typesupport_introspection_cpp.dir/all] Error 2 9.777 make[1]: [CMakeFiles/Makefile2:391: CMakeFiles/px4_msgs__rosidl_typesupport_fastrtps_cpp.dir/all] Error 2 9.777 make: *** [Makefile:141: all] Error 2 9.777 --- 9.777 Failed <<< px4_msgs [3.49s, exited with code 2] 9.808 9.808 Summary: 0 packages finished [3.63s] 9.808 1 package failed: px4_msgs 9.808 1 package had stderr output: px4_msgs

failed to solve: process "/bin/sh -c cd /uros_ws && mkdir src && cd src && git clone https://github.com/px4/px4_msgs.git && sed -i 's/\*\.msg/SensorGps.msg/g' px4_msgs/CMakeLists.txt && cd .. && . /opt/ros/foxy/setup.sh && colcon build --packages-select px4_msgs" did not complete successfully: exit code: 2 make: *** [Makefile:154: create-offboard-sitl-middleware-px4] Error 17 make: Leaving directory '/home/dky/Documents/gisnav/docker'

hmakelin commented 11 months ago

Hi Jiateng - thank you for finding this issue!

I confirm I get the same error message when trying to build the micro-ros-agent Docker image on the current master branch at commit 809396d. This is because the px4_msgs ROS 2 package fails to build. Some recent changes to the repo such as https://github.com/PX4/px4_msgs/pull/31 may or may not be related.

In any case I opened #91 to fix the version of px4_msgs that the micro-ros-agent image uses. On this branch you should be able to build the image. If you want to try building the image in isolation of the other images that are part of the demo recipe you can try something like:

cd gisnav/docker
docker compose -p gisnav build micro-ros-agent

I will still test it with the other containers to make sure everything is working as expected before I merge #91.

hmakelin commented 11 months ago

Closing this issue as #91 has been merged