PX4 / PX4-SITL_gazebo-classic

Set of plugins, models and worlds to use with OSRF Gazebo Simulator in SITL and HITL.
http://dev.px4.io/simulation-gazebo.html
378 stars 795 forks source link

development/mavlink.h Missing? #823

Closed iamrajee closed 2 years ago

iamrajee commented 2 years ago

While building on ubuntu20.04, I'm getting below error:

/home/rajendra/px4_ws/src/PX4-SITL_gazebo/include/gazebo_gimbal_controller_plugin.hh:39:10: fatal error: development/mavlink.h: No such file or directory
   39 | #include <development/mavlink.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

I've tried to built by both make -j$(nproc) -l$(nproc) and catkin_make, I get the same error.

I'm origin/master branch.

Logs

rajendra@u20:~/px4_ws/src/PX4-SITL_gazebo/build$ cmake ..
-- install-prefix: /usr
-- cmake build type: RelWithDebInfo
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- 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
-- 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
-- Performing Test COMPILER_SUPPORTS_CXX17
-- Performing Test COMPILER_SUPPORTS_CXX17 - Success
-- Performing Test COMPILER_SUPPORTS_CXX14
-- Performing Test COMPILER_SUPPORTS_CXX14 - Success
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Using C++17 standard
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.58") found components: system thread filesystem 
CMake Warning (dev) at /usr/local/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
  The package name passed to `find_package_handle_standard_args` (PkgConfig)
  does not match the name of the calling package (gazebo).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/cmake-3.19/Modules/FindPkgConfig.cmake:70 (find_package_handle_standard_args)
  /usr/lib/x86_64-linux-gnu/cmake/gazebo/gazebo-config.cmake:72 (include)
  CMakeLists.txt:48 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'bullet>=2.82'
--   Found bullet, version 2.88
-- Found ccd: /usr/include (found suitable version "2.0", minimum required is "2.0") 
-- Found fcl: /opt/ros/noetic/include (found suitable version "0.6.1", minimum required is "0.3.2") 
-- Found assimp: /usr/include (found version "5.0.0") 
-- Found DART: /usr/include (Required is at least version "6.6") found components: dart 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.40.0") found components: thread system filesystem program_options regex iostreams date_time 
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1") 
-- Looking for ignition-math6 -- found version 6.8.0
-- Searching for dependencies of ignition-math6
-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- Checking for module 'OGRE'
--   Found OGRE, version 1.9.0
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/lib/x86_64-linux-gnu/libOgreMain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Looking for ignition-math6 -- found version 6.8.0
-- Looking for ignition-transport8 -- found version 8.2.0
-- Searching for dependencies of ignition-transport8
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found suitable version "3.6.1", minimum required is "3") 
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
--   Found libzmq , version 4.3.2
-- Found ZeroMQ: TRUE (Required is at least version "4") 
-- Checking for module 'uuid'
--   Found uuid, version 2.34.0
-- Found UUID: TRUE  
-- Looking for ignition-msgs5 -- found version 5.7.0
-- Searching for dependencies of ignition-msgs5
-- Looking for ignition-math6 -- found version 6.8.0
-- Checking for module 'tinyxml2'
--   Found tinyxml2, version 6.2.0
-- Looking for ignition-msgs5 -- found version 5.7.0
-- Looking for ignition-common3 -- found version 3.13.1
-- Searching for dependencies of ignition-common3
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Found DL: TRUE  
-- Searching for <ignition-common3> component [graphics]
-- Looking for ignition-common3-graphics -- found version 3.13.1
-- Searching for dependencies of ignition-common3-graphics
-- Looking for ignition-math6 -- found version 6.8.0
-- Looking for ignition-fuel_tools4 -- found version 4.3.0
-- Searching for dependencies of ignition-fuel_tools4
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.68.0")  
-- Checking for module 'jsoncpp'
--   Found jsoncpp, version 1.7.4
-- Found JSONCPP: TRUE  
-- Checking for module 'yaml-0.1'
--   Found yaml-0.1, version 0.2.2
-- Found YAML: TRUE  
-- Checking for module 'libzip'
--   Found libzip, version 1.5.1
-- Found ZIP: TRUE  
-- Looking for ignition-common3 -- found version 3.13.1
-- Looking for ignition-msgs5 -- found version 5.7.0
-- Checking for one of the modules 'glib-2.0'
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") 
-- Found OpenCV: /usr/local (found version "3.4.6") 
-- Found TinyXML: /usr/lib/x86_64-linux-gnu/libtinyxml.so  
-- Checking for module 'gstreamer-1.0 >= 1.0'
--   Found gstreamer-1.0 , version 1.16.2
-- Checking for module 'gstreamer-base-1.0 >= 1.0'
--   Found gstreamer-base-1.0 , version 1.16.2
-- Checking for module 'gstreamer-app-1.0 >= 1.0'
--   Found gstreamer-app-1.0 , version 1.16.2
-- Found GStreamer: GSTREAMER_INCLUDE_DIRS;GSTREAMER_LIBRARIES;GSTREAMER_VERSION;GSTREAMER_BASE_INCLUDE_DIRS;GSTREAMER_BASE_LIBRARIES (Required is at least version "1.0") 
-- Checking for module 'OGRE'
--   Found OGRE, version 1.9.0
CMake Deprecation Warning at external/OpticalFlow/CMakeLists.txt:34 (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.

CMake Deprecation Warning at external/OpticalFlow/external/klt_feature_tracker/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.

-- Building klt_feature_tracker without catkin
-- Building OpticalFlow with OpenCV
-- Found MAVLink: /opt/ros/noetic/include (found version "2021.10.10") 
-- catkin DISABLED
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1") 
-- Checking for module 'protobuf'
--   Found protobuf, version 3.6.1
-- Gazebo version: 11.5
-- Found GStreamer: adding gst_camera_plugin
-- Found GStreamer: adding gst_video_stream_widget
-- Configuring done
-- Generating done
-- Build files have been written to: /home/rajendra/px4_ws/src/PX4-SITL_gazebo/build
rajendra@u20:~/px4_ws/src/PX4-SITL_gazebo/build$ make -j$(nproc) -l$(nproc)
[  1%] Running cpp protocol buffer compiler on msgs/MotorSpeed.proto
[  1%] Running cpp protocol buffer compiler on msgs/SITLGps.proto
[  1%] Running cpp protocol buffer compiler on msgs/CommandMotorSpeed.proto
[  2%] Running cpp protocol buffer compiler on msgs/Wind.proto
[  3%] Running cpp protocol buffer compiler on msgs/Airspeed.proto
[  5%] Running cpp protocol buffer compiler on msgs/Float.proto
[  5%] Running cpp protocol buffer compiler on msgs/Int32.proto
[  6%] Running cpp protocol buffer compiler on msgs/Odometry.proto
[  7%] Running cpp protocol buffer compiler on msgs/Force.proto
Scanning dependencies of target models_gen
Scanning dependencies of target klt_feature_tracker
[  8%] Running cpp protocol buffer compiler on msgs/Groundtruth.proto
[ 23%] Built target models_gen
[ 24%] Building CXX object OpticalFlow/klt_feature_tracker/CMakeFiles/klt_feature_tracker.dir/src/trackFeatures.cpp.o
[ 24%] Running cpp protocol buffer compiler on msgs/IRLock.proto
[ 25%] Running cpp protocol buffer compiler on msgs/Imu.proto
[ 26%] Running cpp protocol buffer compiler on msgs/MagneticField.proto
[ 28%] Running cpp protocol buffer compiler on msgs/Pressure.proto
[ 28%] Running cpp protocol buffer compiler on msgs/OpticalFlow.proto
[ 29%] Running cpp protocol buffer compiler on msgs/Range.proto
Scanning dependencies of target std_msgs
Scanning dependencies of target physics_msgs
Scanning dependencies of target mav_msgs
Scanning dependencies of target nav_msgs
[ 30%] Building CXX object CMakeFiles/std_msgs.dir/Int32.pb.cc.o
[ 30%] Building CXX object CMakeFiles/nav_msgs.dir/Odometry.pb.cc.o
[ 31%] Building CXX object CMakeFiles/mav_msgs.dir/MotorSpeed.pb.cc.o
[ 32%] Building CXX object CMakeFiles/mav_msgs.dir/CommandMotorSpeed.pb.cc.o
[ 33%] Building CXX object CMakeFiles/physics_msgs.dir/Force.pb.cc.o
[ 33%] Building CXX object CMakeFiles/physics_msgs.dir/Wind.pb.cc.o
Scanning dependencies of target sensor_msgs
[ 34%] Building CXX object CMakeFiles/sensor_msgs.dir/Imu.pb.cc.o
[ 34%] Building CXX object CMakeFiles/sensor_msgs.dir/Airspeed.pb.cc.o
[ 35%] Building CXX object CMakeFiles/sensor_msgs.dir/IRLock.pb.cc.o
[ 36%] Building CXX object CMakeFiles/sensor_msgs.dir/Float.pb.cc.o
[ 37%] Building CXX object CMakeFiles/sensor_msgs.dir/Groundtruth.pb.cc.o
[ 38%] Linking CXX shared library libstd_msgs.so
[ 38%] Building CXX object CMakeFiles/sensor_msgs.dir/Range.pb.cc.o
[ 39%] Building CXX object CMakeFiles/sensor_msgs.dir/SITLGps.pb.cc.o
[ 40%] Building CXX object CMakeFiles/sensor_msgs.dir/MagneticField.pb.cc.o
[ 40%] Building CXX object CMakeFiles/sensor_msgs.dir/Pressure.pb.cc.o
[ 41%] Building CXX object CMakeFiles/sensor_msgs.dir/OpticalFlow.pb.cc.o
[ 42%] Linking CXX shared library libmav_msgs.so
[ 43%] Linking CXX shared library libphysics_msgs.so
[ 43%] Built target std_msgs
[ 44%] Linking CXX shared library libnav_msgs.so
[ 44%] Built target mav_msgs
[ 44%] Built target physics_msgs
[ 44%] Built target nav_msgs
[ 45%] Linking CXX static library libklt_feature_tracker.a
[ 45%] Built target klt_feature_tracker
Scanning dependencies of target OpticalFlow
[ 45%] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/optical_flow.cpp.o
[ 46%] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/flow_px4.cpp.o
[ 47%] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/px4flow.cpp.o
[ 48%] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/flow_opencv.cpp.o
[ 49%] Linking CXX shared library libsensor_msgs.so
[ 49%] Built target sensor_msgs
Scanning dependencies of target ForceVisual
Scanning dependencies of target gazebo_airship_dynamics_plugin
Scanning dependencies of target gazebo_airspeed_plugin
Scanning dependencies of target gazebo_usv_dynamics_plugin
Scanning dependencies of target gazebo_groundtruth_plugin
[ 50%] Generating include/moc_gazebo_video_stream_widget.cpp
Scanning dependencies of target gazebo_gps_plugin
Scanning dependencies of target gazebo_opticalflow_mockup_plugin
Scanning dependencies of target gazebo_irlock_plugin
Scanning dependencies of target gazebo_lidar_plugin
Scanning dependencies of target gazebo_parachute_plugin
[ 50%] Building CXX object CMakeFiles/ForceVisual.dir/src/force_visual/force_visual.cpp.o
[ 51%] Building CXX object CMakeFiles/gazebo_irlock_plugin.dir/src/gazebo_irlock_plugin.cpp.o
[ 52%] Building CXX object CMakeFiles/gazebo_usv_dynamics_plugin.dir/src/gazebo_usv_dynamics_plugin.cpp.o
[ 53%] Building CXX object CMakeFiles/gazebo_airship_dynamics_plugin.dir/src/gazebo_airship_dynamics_plugin.cpp.o
[ 55%] Building CXX object CMakeFiles/gazebo_groundtruth_plugin.dir/src/gazebo_groundtruth_plugin.cpp.o
[ 55%] Building CXX object CMakeFiles/gazebo_airspeed_plugin.dir/src/gazebo_airspeed_plugin.cpp.o
[ 55%] Building CXX object CMakeFiles/gazebo_opticalflow_mockup_plugin.dir/src/gazebo_opticalflow_mockup_plugin.cpp.o
[ 56%] Building CXX object CMakeFiles/gazebo_gps_plugin.dir/src/gazebo_gps_plugin.cpp.o
[ 57%] Building CXX object CMakeFiles/gazebo_parachute_plugin.dir/src/gazebo_parachute_plugin.cpp.o
[ 58%] Building CXX object CMakeFiles/gazebo_lidar_plugin.dir/src/gazebo_lidar_plugin.cpp.o
Scanning dependencies of target gazebo_video_stream_widget
[ 59%] Building CXX object CMakeFiles/gazebo_video_stream_widget.dir/include/moc_gazebo_video_stream_widget.cpp.o
[ 59%] Linking CXX shared library libOpticalFlow.so
[ 59%] Built target OpticalFlow
Scanning dependencies of target gazebo_multirotor_base_plugin
[ 60%] Building CXX object CMakeFiles/gazebo_multirotor_base_plugin.dir/src/gazebo_multirotor_base_plugin.cpp.o
[ 60%] Building CXX object CMakeFiles/gazebo_video_stream_widget.dir/src/gazebo_video_stream_widget.cpp.o
[ 60%] Linking CXX shared library libgazebo_usv_dynamics_plugin.so
[ 61%] Linking CXX shared library libgazebo_opticalflow_mockup_plugin.so
[ 62%] Linking CXX shared library libgazebo_groundtruth_plugin.so
[ 62%] Built target gazebo_usv_dynamics_plugin
Scanning dependencies of target gazebo_wind_plugin
[ 62%] Linking CXX shared library libgazebo_parachute_plugin.so
[ 62%] Building CXX object CMakeFiles/gazebo_wind_plugin.dir/src/gazebo_wind_plugin.cpp.o
[ 63%] Linking CXX shared library libgazebo_multirotor_base_plugin.so
[ 63%] Linking CXX shared library libgazebo_irlock_plugin.so
[ 63%] Built target gazebo_groundtruth_plugin
[ 63%] Built target gazebo_opticalflow_mockup_plugin
Scanning dependencies of target gazebo_opticalflow_plugin
Scanning dependencies of target gazebo_uuv_plugin
[ 64%] Building CXX object CMakeFiles/gazebo_opticalflow_plugin.dir/src/gazebo_opticalflow_plugin.cpp.o
[ 65%] Building CXX object CMakeFiles/gazebo_uuv_plugin.dir/src/gazebo_uuv_plugin.cpp.o
[ 66%] Linking CXX shared library libgazebo_lidar_plugin.so
[ 67%] Linking CXX shared library libgazebo_airship_dynamics_plugin.so
[ 67%] Built target gazebo_multirotor_base_plugin
Scanning dependencies of target gazebo_drop_plugin
[ 67%] Built target gazebo_parachute_plugin
Scanning dependencies of target gazebo_sonar_plugin
[ 68%] Linking CXX shared library libgazebo_airspeed_plugin.so
[ 68%] Building CXX object CMakeFiles/gazebo_drop_plugin.dir/src/gazebo_drop_plugin.cpp.o
[ 69%] Building CXX object CMakeFiles/gazebo_sonar_plugin.dir/src/gazebo_sonar_plugin.cpp.o
[ 69%] Built target gazebo_irlock_plugin
Scanning dependencies of target gazebo_vision_plugin
[ 70%] Building CXX object CMakeFiles/gazebo_vision_plugin.dir/src/gazebo_vision_plugin.cpp.o
[ 70%] Linking CXX shared library libgazebo_gps_plugin.so
[ 70%] Built target gazebo_airship_dynamics_plugin
[ 70%] Built target gazebo_lidar_plugin
[ 71%] Generating include/moc_gazebo_user_camera_plugin.cpp
Scanning dependencies of target gazebo_gst_camera_plugin
[ 72%] Building CXX object CMakeFiles/gazebo_gst_camera_plugin.dir/src/gazebo_gst_camera_plugin.cpp.o
[ 72%] Built target gazebo_airspeed_plugin
Scanning dependencies of target gazebo_controller_interface
[ 73%] Building CXX object CMakeFiles/gazebo_controller_interface.dir/src/gazebo_controller_interface.cpp.o
Scanning dependencies of target gazebo_user_camera_plugin
[ 73%] Building CXX object CMakeFiles/gazebo_user_camera_plugin.dir/include/moc_gazebo_user_camera_plugin.cpp.o
[ 73%] Built target gazebo_gps_plugin
Scanning dependencies of target gazebo_gimbal_controller_plugin
[ 74%] Building CXX object CMakeFiles/gazebo_gimbal_controller_plugin.dir/src/gazebo_gimbal_controller_plugin.cpp.o
In file included from /home/rajendra/px4_ws/src/PX4-SITL_gazebo/src/gazebo_gimbal_controller_plugin.cpp:21:
/home/rajendra/px4_ws/src/PX4-SITL_gazebo/include/gazebo_gimbal_controller_plugin.hh:39:10: fatal error: development/mavlink.h: No such file or directory
   39 | #include <development/mavlink.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/gazebo_gimbal_controller_plugin.dir/build.make:82: CMakeFiles/gazebo_gimbal_controller_plugin.dir/src/gazebo_gimbal_controller_plugin.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1045: CMakeFiles/gazebo_gimbal_controller_plugin.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 75%] Building CXX object CMakeFiles/gazebo_user_camera_plugin.dir/src/gazebo_user_camera_plugin.cpp.o
[ 76%] Linking CXX shared library libForceVisual.so
[ 76%] Built target ForceVisual
[ 77%] Linking CXX shared library libgazebo_video_stream_widget.so
[ 77%] Built target gazebo_video_stream_widget
[ 78%] Linking CXX shared library libgazebo_wind_plugin.so
[ 78%] Built target gazebo_wind_plugin
[ 79%] Linking CXX shared library libgazebo_uuv_plugin.so
[ 79%] Built target gazebo_uuv_plugin
[ 80%] Linking CXX shared library libgazebo_drop_plugin.so
[ 81%] Linking CXX shared library libgazebo_sonar_plugin.so
[ 82%] Linking CXX shared library libgazebo_vision_plugin.so
[ 82%] Built target gazebo_drop_plugin
[ 82%] Built target gazebo_sonar_plugin
[ 83%] Linking CXX shared library libgazebo_controller_interface.so
[ 83%] Built target gazebo_vision_plugin
[ 83%] Built target gazebo_controller_interface
[ 84%] Linking CXX shared library libgazebo_opticalflow_plugin.so
[ 84%] Linking CXX shared library libgazebo_gst_camera_plugin.so
[ 84%] Built target gazebo_opticalflow_plugin
[ 84%] Built target gazebo_gst_camera_plugin
[ 85%] Linking CXX shared library libgazebo_user_camera_plugin.so
[ 85%] Built target gazebo_user_camera_plugin
make: *** [Makefile:171: all] Error 2
rajendra@u20:~/px4_ws/src/PX4-SITL_gazebo/build$ 
Jaeyoung-Lim commented 2 years ago

@iamrajee You need a newer mavlink version that has the develop dialect

iamrajee commented 2 years ago

@iamrajee You need a newer mavlink version that has the develop dialect

You are right. After rolling back to previous version (git checkout 6fa6ec78a7a1619b7b90ac0c01aaec919defbe35), I no longer get above error.

Jaeyoung-Lim commented 2 years ago

@iamrajee Not sure if you understood what I meant. The reason rolling back it works is because the development dialect started being used in this repo after https://github.com/PX4/PX4-SITL_gazebo/pull/822

However, your problem is that you don't have a development dialect in your mavlink package (not this repo)

AnushaDevi-Embedded commented 2 years ago

@iamrajee

Hello,

I am new to Mavlink and PX4. I am also facing the same issue. I did not understand the solution. Can you please elaborate?

wuyanze0226 commented 3 weeks ago

Hello. I meeting the same problem as you,would you mind telling me how to fix it? Thank you very much.