osrf / vehicle_gateway

A pluginlib-based C++ library that interfaces with several vehicle SDK's
Apache License 2.0
50 stars 11 forks source link

Build error with px4_sim #16

Closed Jaeyoung-Lim closed 1 year ago

Jaeyoung-Lim commented 1 year ago

Problem Description This is just a report on the results of having followed the documentation of this repository on a fresh ROS Humble 22.04

The build fails on px4_sim

make[3]: warning: -j0 forced in submake: resetting jobserver mode.
-- PX4 version: v1.14.0-beta1-142-gedc531913d
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.10.6", minimum required is "3") 
-- PX4 config file: /home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/boards/px4/sitl/default.px4board
-- PLATFORM posix                                               
-- ROMFSROOT px4fmu_common
-- TESTING y
-- ETHERNET y
-- PX4 config: px4_sitl_default
-- PX4 platform: posix
-- PX4 lockstep: enabled
-- The CXX compiler identification is GNU 11.3.0
-- The C compiler identification is GNU 11.3.0
-- The ASM compiler identification is GNU                       
-- Found assembler: /usr/bin/cc
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done                         
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- cmake build type: RelWithDebInfo
-- Building for code coverage
-- Looking for gz-transport12 -- found version 12.1.0           
-- Searching for dependencies of gz-transport12
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so (found suitable version "3.12.4", minimum required is "3") 
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
--   Found libzmq , version 4.3.4
-- Found ZeroMQ: TRUE (Required is at least version "4")        
-- Checking for module 'uuid'
--   Found uuid, version 2.37.2
-- Found UUID: TRUE  
-- Looking for gz-utils2 -- found version 2.0.0
-- Searching for dependencies of gz-utils2
-- Searching for <gz-utils2> component [cli]
-- Looking for gz-utils2-cli -- found version 2.0.0
-- Searching for dependencies of gz-utils2-cli
-- Looking for gz-msgs9 -- found version 9.2.0
-- Searching for dependencies of gz-msgs9
-- Looking for gz-math7 -- found version 7.1.0                  
-- Searching for dependencies of gz-math7
-- Looking for gz-utils2 -- found version 2.0.0
-- Checking for module 'tinyxml2'
--   Found tinyxml2, version 9.0.0
-- ROMFS: ROMFS/px4fmu_common                                   
-- Configuring done                                             
-- Generating done                                              
-- Build files have been written to: /home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/build/px4_sitl_default
[  1%] Building CXX object boards/px4/sitl/src/CMakeFiles/drivers_board.dir/board_shutdown.cpp.o
[  1%] Generating Flight Tasks
[  1%] Generating combined event json file
[  1%] Generating uORB topic headers
Failed to import genmsg: No module named 'genmsg'

You may need to install it using:
    pip3 install --user pyros-genmsg

gmake[6]: *** [msg/CMakeFiles/uorb_headers.dir/build.make:441: uORB/topics/action_request.h] Error 1
gmake[5]: *** [CMakeFiles/Makefile2:5371: msg/CMakeFiles/uorb_headers.dir/all] Error 2
gmake[5]: *** Waiting for unfinished jobs....
[  2%] Generating px4 event header file
[  2%] Building C object boards/px4/sitl/src/CMakeFiles/drivers_board.dir/sitl_led.c.o
[  2%] Built target flighttasks_generated
[  2%] Linking CXX static library libdrivers_board.a
[  2%] Built target drivers_board                             
[  2%] Built target events_header
gmake[4]: *** [Makefile:156: all] Error 2
make[3]: *** [Makefile:227: px4_sitl_default] Error 2
gmake[2]: *** [CMakeFiles/px4-firmware.dir/build.make:86: px4-src/src/px4-firmware-stamp/px4-firmware-build] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/px4-firmware.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
--- stderr: px4_sim
Cloning into 'px4-firmware'...
Switched to a new branch 'pr-gz-bridge-airspeed'
Submodule 'Tools/flightgear_bridge' (https://github.com/PX4/PX4-FlightGear-Bridge.git) registered for path 'Tools/simulation/flightgear/flightgear_bridge'
Submodule 'Tools/simulation/gazebo/sitl_gazebo' (https://github.com/PX4/PX4-SITL_gazebo.git) registered for path 'Tools/simulation/gazebo/sitl_gazebo'
Submodule 'Tools/simulation/jmavsim/jMAVSim' (https://github.com/PX4/jMAVSim.git) registered for path 'Tools/simulation/jmavsim/jMAVSim'
Submodule 'Tools/simulation/jsbsim/jsbsim_bridge' (https://github.com/PX4/px4-jsbsim-bridge.git) registered for path 'Tools/simulation/jsbsim/jsbsim_bridge'
Submodule 'platforms/nuttx/NuttX/apps' (https://github.com/PX4/NuttX-apps.git) registered for path 'platforms/nuttx/NuttX/apps'
Submodule 'platforms/nuttx/NuttX/nuttx' (https://github.com/PX4/NuttX.git) registered for path 'platforms/nuttx/NuttX/nuttx'
Submodule 'src/drivers/cyphal/legacy_data_types' (https://github.com/PX4/public_regulated_data_types.git) registered for path 'src/drivers/cyphal/legacy_data_types'
Submodule 'src/drivers/cyphal/libcanard' (https://github.com/opencyphal/libcanard.git) registered for path 'src/drivers/cyphal/libcanard'
Submodule 'src/drivers/cyphal/public_regulated_data_types' (https://github.com/opencyphal/public_regulated_data_types.git) registered for path 'src/drivers/cyphal/public_regulated_data_types'
Submodule 'src/drivers/gps/devices' (https://github.com/PX4/PX4-GPSDrivers.git) registered for path 'src/drivers/gps/devices'
Submodule 'src/drivers/uavcan/libuavcan' (https://github.com/dronecan/libuavcan.git) registered for path 'src/drivers/uavcan/libuavcan'
Submodule 'src/lib/crypto/libtomcrypt' (https://github.com/PX4/libtomcrypt.git) registered for path 'src/lib/crypto/libtomcrypt'
Submodule 'src/lib/crypto/libtommath' (https://github.com/PX4/libtommath.git) registered for path 'src/lib/crypto/libtommath'
Submodule 'src/lib/crypto/monocypher' (https://github.com/PX4/Monocypher.git) registered for path 'src/lib/crypto/monocypher'
Submodule 'src/lib/events/libevents' (https://github.com/mavlink/libevents.git) registered for path 'src/lib/events/libevents'
Submodule 'src/modules/mavlink/mavlink' (https://github.com/mavlink/mavlink.git) registered for path 'src/modules/mavlink/mavlink'
Submodule 'src/modules/microdds_client/Micro-XRCE-DDS-Client' (https://github.com/PX4/Micro-XRCE-DDS-Client.git) registered for path 'src/modules/microdds_client/Micro-XRCE-DDS-Client'
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/Tools/simulation/flightgear/flightgear_bridge'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/Tools/simulation/gazebo/sitl_gazebo'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/Tools/simulation/jmavsim/jMAVSim'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/Tools/simulation/jsbsim/jsbsim_bridge'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/platforms/nuttx/NuttX/apps'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/platforms/nuttx/NuttX/nuttx'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/src/drivers/cyphal/legacy_data_types'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/src/drivers/cyphal/libcanard'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/src/drivers/cyphal/public_regulated_data_types'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/src/drivers/gps/devices'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/src/drivers/uavcan/libuavcan'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/src/lib/crypto/libtomcrypt'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/src/lib/crypto/libtommath'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/src/lib/crypto/monocypher'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/src/lib/events/libevents'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/src/modules/mavlink/mavlink'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/src/modules/microdds_client/Micro-XRCE-DDS-Client'...
Submodule 'models/FlightGear-Rascal' (https://github.com/ThunderFly-aerospace/FlightGear-Rascal.git) registered for path 'Tools/simulation/flightgear/flightgear_bridge/models/Rascal'
Submodule 'models/FlightGear-TF-G1' (https://github.com/ThunderFly-aerospace/FlightGear-TF-G1.git) registered for path 'Tools/simulation/flightgear/flightgear_bridge/models/TF-G1'
Submodule 'models/FlightGear-TF-G2' (https://github.com/ThunderFly-aerospace/FlightGear-TF-G2.git) registered for path 'Tools/simulation/flightgear/flightgear_bridge/models/TF-G2'
Submodule 'models/FlightGear-TF-R1' (https://github.com/ThunderFly-aerospace/FlightGear-TF-R1.git) registered for path 'Tools/simulation/flightgear/flightgear_bridge/models/TF-R1'
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/Tools/simulation/flightgear/flightgear_bridge/models/Rascal'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/Tools/simulation/flightgear/flightgear_bridge/models/TF-G1'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/Tools/simulation/flightgear/flightgear_bridge/models/TF-G2'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/Tools/simulation/flightgear/flightgear_bridge/models/TF-R1'...
Submodule 'external/OpticalFlow' (https://github.com/PX4/OpticalFlow.git) registered for path 'Tools/simulation/gazebo/sitl_gazebo/external/OpticalFlow'
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/Tools/simulation/gazebo/sitl_gazebo/external/OpticalFlow'...
Submodule 'external/klt_feature_tracker' (https://github.com/ethz-ait/klt_feature_tracker.git) registered for path 'Tools/simulation/gazebo/sitl_gazebo/external/OpticalFlow/external/klt_feature_tracker'
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/Tools/simulation/gazebo/sitl_gazebo/external/OpticalFlow/external/klt_feature_tracker'...
Submodule 'jMAVlib' (https://github.com/PX4/jMAVlib.git) registered for path 'Tools/simulation/jmavsim/jMAVSim/jMAVlib'
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/Tools/simulation/jmavsim/jMAVSim/jMAVlib'...
Submodule 'models/ATI-Resolution' (https://github.com/FGMEMBERS/ATI-Resolution.git) registered for path 'Tools/simulation/jsbsim/jsbsim_bridge/models/ATI-Resolution'
Submodule 'models/Rascal' (https://github.com/Auterion/FlightGear-Rascal.git) registered for path 'Tools/simulation/jsbsim/jsbsim_bridge/models/Rascal'
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/Tools/simulation/jsbsim/jsbsim_bridge/models/ATI-Resolution'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/Tools/simulation/jsbsim/jsbsim_bridge/models/Rascal'...
Submodule 'dsdl' (https://github.com/dronecan/DSDL) registered for path 'src/drivers/uavcan/libuavcan/dsdl'
Submodule 'libuavcan/dsdl_compiler/pyuavcan' (https://github.com/dronecan/pydronecan) registered for path 'src/drivers/uavcan/libuavcan/libuavcan/dsdl_compiler/pyuavcan'
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/src/drivers/uavcan/libuavcan/dsdl'...
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/src/drivers/uavcan/libuavcan/libuavcan/dsdl_compiler/pyuavcan'...
Submodule 'libs/cpp/parse/nlohmann_json' (https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent.git) registered for path 'src/lib/events/libevents/libs/cpp/parse/nlohmann_json'
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/src/lib/events/libevents/libs/cpp/parse/nlohmann_json'...
Submodule 'pymavlink' (https://github.com/ardupilot/pymavlink.git) registered for path 'src/modules/mavlink/mavlink/pymavlink'
Cloning into '/home/jaeyoung/vg/vg_ws/build/px4_sim/px4-src/src/px4-firmware/src/modules/mavlink/mavlink/pymavlink'...
HEAD is now at edc531913d Bring over gz vehicles and fix warns.
make[3]: warning: -j0 forced in submake: resetting jobserver mode.
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

make[3]: warning: -j0 forced in submake: resetting jobserver mode.
gmake[6]: *** [msg/CMakeFiles/uorb_headers.dir/build.make:441: uORB/topics/action_request.h] Error 1
gmake[5]: *** [CMakeFiles/Makefile2:5371: msg/CMakeFiles/uorb_headers.dir/all] Error 2
gmake[5]: *** Waiting for unfinished jobs....
gmake[4]: *** [Makefile:156: all] Error 2
make[3]: *** [Makefile:227: px4_sitl_default] Error 2
gmake[2]: *** [CMakeFiles/px4-firmware.dir/build.make:86: px4-src/src/px4-firmware-stamp/px4-firmware-build] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/px4-firmware.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< px4_sim [4min 33s, exited with code 2]

Summary: 28 packages finished [17min 58s]
  1 package failed: px4_sim
  2 packages had stderr output: gz-sim7 px4_sim
Jaeyoung-Lim commented 1 year ago

Didn't identify exactly what was missing from the previous colcon build, but running the setup script from PX4 (https://github.com/PX4/PX4-Autopilot/blob/main/Tools/setup/ubuntu.sh) seems to install additional dependencies that are missing

codebot commented 1 year ago

This should be resolved now; feel free to re-open if a clean "everything" (fresh clone, fresh install of dependencies, etc.) doesn't fix it. Thank you.