0

阿木币

0

精华

31 小时

在线时间

老司机

Rank: 2

发表于 2020-3-8 17:35:47 13057 浏览 2 回复

[飞控嵌入式] px4 gazebo仿真报错

1阿木币
使用gazebo仿真程序的时候报错,可以用jmavsim仿真
有没有大佬知道为什么该怎么办么

[1/11] git submodule Tools/sitl_gazebo
[7/11] Performing configure step for 'sitl_gazebo'
-- install-prefix: /usr/local
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- 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++14 compiler
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
--   chrono
--   date_time
--   atomic
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'bullet>=2.82'
--   Found bullet, version 2.83
-- Found Simbody: /usr/include/simbody  
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   thread
--   system
--   filesystem
--   program_options
--   regex
--   iostreams
--   date_time
--   chrono
--   atomic
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so  
-- Boost version: 1.58.0
-- 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
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so (Required is at least version "2.3.0")
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
--   Found libzmq , version 4.1.4
-- Found ZeroMQ: TRUE (Required is at least version "4")
-- Checking for module 'uuid'
--   Found uuid, version 2.27.0
-- Found UUID: TRUE  
-- Checking for module 'tinyxml2'
--   Found tinyxml2, version 2.2.0
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Found DL: TRUE  
-- FreeImage.pc not found, we will search for FreeImage_INCLUDE_DIRS and FreeImage_LIBRARIES
-- Checking for module 'gts'
--   Found gts, version 0.7.6
-- Found GTS: TRUE  
-- Checking for module 'libswscale'
--   Found libswscale, version 3.1.101
-- Found SWSCALE: TRUE  
-- Checking for module 'libavdevice >= 56.4.100'
--   Found libavdevice , version 56.4.100
-- Found AVDEVICE: TRUE (Required is at least version "56.4.100")
-- Checking for module 'libavformat'
--   Found libavformat, version 56.40.101
-- Found AVFORMAT: TRUE  
-- Checking for module 'libavcodec'
--   Found libavcodec, version 56.60.100
-- Found AVCODEC: TRUE  
-- Checking for module 'libavutil'
--   Found libavutil, version 54.31.100
-- Found AVUTIL: TRUE  
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.47.0")
-- Checking for module 'jsoncpp'
--   Found jsoncpp, version 1.7.2
-- Found JSONCPP: TRUE  
-- Checking for module 'yaml-0.1'
--   Found yaml-0.1, version 0.1.6
-- Found YAML: TRUE  
-- Checking for module 'libzip'
--   Found libzip, version 1.0.1
-- Found ZIP: TRUE  
-- Found PythonInterp: /usr/bin/python (found version "2.7.12")
-- Found TinyXML: /usr/lib/x86_64-linux-gnu/libtinyxml.so  
-- Checking for module 'OGRE'
--   Found OGRE, version 1.9.0
-- Building klt_feature_tracker without catkin
-- Building OpticalFlow with OpenCV
-- Found MAVLink: /home/bill/Firmware/mavlink/include (found version "2.0")
-- catkin DISABLED
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so  
-- Checking for module 'protobuf'
--   Found protobuf, version 2.6.1
Gazebo version: 9.12
-- Configuring done
-- Generating done
-- Build files have been written to: /home/bill/Firmware/build/px4_sitl_default/build_gazebo
[8/11] Performing build step for 'sitl_gazebo'
FAILED: cd /home/bill/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/cmake --build . && /usr/bin/cmake -E touch /home/bill/Firmware/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-build
[1/86] Generating /home/bill/Firmware/Tools/sitl_gazebo/models/c920/c920-gen.sdf
[2/86] Generating /home/bill/Firmware/Tools/sitl_gazebo/models/pixhawk/pixhawk-gen.sdf
[3/86] Generating /home/bill/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf
[4/86] Generating /home/bill/Firmware/Tools/sitl_gazebo/models/r200/r200-gen.sdf
[5/86] Building CXX object OpticalFlow/klt_feature_tracker/CMakeFiles/klt_feature_tracker.dir/src/trackFeatures.cpp.o
[6/86] Running C++ protocol buffer compiler on msgs/Int32.proto
[7/86] Running C++ protocol buffer compiler on msgs/Imu.proto
[8/86] Running C++ protocol buffer compiler on msgs/IRLock.proto
[9/86] Running C++ protocol buffer compiler on msgs/Float.proto
[10/86] Running C++ protocol buffer compiler on msgs/Groundtruth.proto
[11/86] Generating /home/bill/Firmware/Tools/sitl_gazebo/models/matrice_100/matrice_100-gen.sdf
[12/86] Running C++ protocol buffer compiler on msgs/Odometry.proto
[13/86] Running C++ protocol buffer compiler on msgs/Wind.proto
[14/86] Generating /home/bill/Firmware/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag-gen.sdf
[15/86] Running C++ protocol buffer compiler on msgs/MotorSpeed.proto
[16/86] Building CXX object CMakeFiles/std_msgs.dir/Int32.pb.cc.o
[17/86] Running C++ protocol buffer compiler on msgs/CommandMotorSpeed.proto
[18/86] Generating /home/bill/Firmware/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4-gen.sdf
[19/86] Building CXX object CMakeFiles/physics_msgs.dir/Wind.pb.cc.o
[20/86] Building CXX object CMakeFiles/nav_msgs.dir/Odometry.pb.cc.o
[21/86] Generating /home/bill/Firmware/Tools/sitl_gazebo/models/sf10a/sf10a-gen.sdf
[22/86] Generating /home/bill/Firmware/Tools/sitl_gazebo/models/px4flow/px4flow-gen.sdf
[23/86] Building CXX object CMakeFiles/mav_msgs.dir/MotorSpeed.pb.cc.o
/home/bill/Firmware/Tools/sitl_gazebo/models/r200/r200.sdf.jinja -> /home/bill/Firmware/Tools/sitl_gazebo/models/r200/r200-gen.sdf
[24/86] Building CXX object CMakeFiles/mav_msgs.dir/CommandMotorSpeed.pb.cc.o
/home/bill/Firmware/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag.sdf.jinja -> /home/bill/Firmware/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag-gen.sdf
[25/86] Running C++ protocol buffer compiler on msgs/Range.proto
/home/bill/Firmware/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4.sdf.jinja -> /home/bill/Firmware/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4-gen.sdf
[26/86] Running C++ protocol buffer compiler on msgs/SITLGps.proto
/home/bill/Firmware/Tools/sitl_gazebo/models/pixhawk/pixhawk.sdf.jinja -> /home/bill/Firmware/Tools/sitl_gazebo/models/pixhawk/pixhawk-gen.sdf
[27/86] Running C++ protocol buffer compiler on msgs/OpticalFlow.proto
/home/bill/Firmware/Tools/sitl_gazebo/models/sf10a/sf10a.sdf.jinja -> /home/bill/Firmware/Tools/sitl_gazebo/models/sf10a/sf10a-gen.sdf
[28/86] Running C++ protocol buffer compiler on msgs/MagneticField.proto
[29/86] Running C++ protocol buffer compiler on msgs/Pressure.proto
/home/bill/Firmware/Tools/sitl_gazebo/models/px4flow/px4flow.sdf.jinja -> /home/bill/Firmware/Tools/sitl_gazebo/models/px4flow/px4flow-gen.sdf
[30/86] Building CXX object CMakeFiles/sensor_msgs.dir/Imu.pb.cc.o
[31/86] Building CXX object CMakeFiles/sensor_msgs.dir/Float.pb.cc.o
[32/86] Building CXX object CMakeFiles/sensor_msgs.dir/IRLock.pb.cc.o
[33/86] Building CXX object CMakeFiles/sensor_msgs.dir/Range.pb.cc.o
[34/86] Building CXX object CMakeFiles/sensor_msgs.dir/Groundtruth.pb.cc.o
/home/bill/Firmware/Tools/sitl_gazebo/models/c920/c920.sdf.jinja -> /home/bill/Firmware/Tools/sitl_gazebo/models/c920/c920-gen.sdf
[35/86] Building CXX object CMakeFiles/sensor_msgs.dir/SITLGps.pb.cc.o
/home/bill/Firmware/Tools/sitl_gazebo/models/matrice_100/matrice_100.sdf.jinja -> /home/bill/Firmware/Tools/sitl_gazebo/models/matrice_100/matrice_100-gen.sdf
[36/86] Building CXX object CMakeFiles/sensor_msgs.dir/OpticalFlow.pb.cc.o
[37/86] Building CXX object CMakeFiles/sensor_msgs.dir/MagneticField.pb.cc.o

[38/86] Building CXX object CMakeFiles/sensor_msgs.dir/Pressure.pb.cc.o
[39/86] Linking CXX shared library libstd_msgs.so
[40/86] Linking CXX shared library libphysics_msgs.so
[41/86] Linking CXX shared library libmav_msgs.so
[42/86] Linking CXX shared library libnav_msgs.so
[43/86] Linking CXX static library OpticalFlow/klt_feature_tracker/libklt_feature_tracker.a
[44/86] Linking CXX shared library libsensor_msgs.so
[45/86] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/optical_flow.cpp.o
[46/86] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/px4flow.cpp.o
[47/86] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/flow_px4.cpp.o
[48/86] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/flow_opencv.cpp.o
[49/86] Building CXX object CMakeFiles/LiftDragPlugin.dir/src/liftdrag_plugin/liftdrag_plugin.cpp.o
[50/86] Building CXX object CMakeFiles/gazebo_magnetometer_plugin.dir/src/geo_mag_declination.cpp.o
[51/86] Building CXX object CMakeFiles/gazebo_geotagged_images_plugin.dir/src/gazebo_geotagged_images_plugin.cpp.o
[52/86] Building CXX object CMakeFiles/gazebo_barometer_plugin.dir/src/gazebo_barometer_plugin.cpp.o
[53/86] Building CXX object CMakeFiles/gazebo_magnetometer_plugin.dir/src/gazebo_magnetometer_plugin.cpp.o
[54/86] Building CXX object CMakeFiles/gazebo_lidar_plugin.dir/src/gazebo_lidar_plugin.cpp.o
[55/86] Building CXX object CMakeFiles/gazebo_controller_interface.dir/src/gazebo_controller_interface.cpp.o
[56/86] Building CXX object CMakeFiles/gazebo_wind_plugin.dir/src/gazebo_wind_plugin.cpp.o
[57/86] Building CXX object CMakeFiles/gazebo_irlock_plugin.dir/src/gazebo_irlock_plugin.cpp.o
[58/86] Building CXX object CMakeFiles/gazebo_sonar_plugin.dir/src/gazebo_sonar_plugin.cpp.o
[59/86] Building CXX object CMakeFiles/gazebo_vision_plugin.dir/src/gazebo_vision_plugin.cpp.o
[60/86] Building CXX object CMakeFiles/gazebo_gps_plugin.dir/src/gazebo_gps_plugin.cpp.o
[61/86] Building CXX object CMakeFiles/gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o
[62/86] Building CXX object CMakeFiles/gazebo_imu_plugin.dir/src/gazebo_imu_plugin.cpp.o
[63/86] Building CXX object CMakeFiles/gazebo_multirotor_base_plugin.dir/src/gazebo_multirotor_base_plugin.cpp.o
[64/86] Linking CXX shared library libgazebo_controller_interface.so
[65/86] Linking CXX shared library libLiftDragPlugin.so
[66/86] Linking CXX shared library libgazebo_sonar_plugin.so
[67/86] Linking CXX shared library libgazebo_barometer_plugin.so
[68/86] Linking CXX shared library libgazebo_gps_plugin.so
[69/86] Linking CXX shared library libgazebo_magnetometer_plugin.so
[70/86] Linking CXX shared library libgazebo_wind_plugin.so
[71/86] Building CXX object CMakeFiles/gazebo_uuv_plugin.dir/src/gazebo_uuv_plugin.cpp.o
[72/86] Linking CXX shared library libgazebo_lidar_plugin.so
[73/86] Building CXX object CMakeFiles/gazebo_motor_model.dir/src/gazebo_motor_model.cpp.o
[74/86] Linking CXX shared library libgazebo_imu_plugin.so
[75/86] Linking CXX shared library libgazebo_irlock_plugin.so
[76/86] Linking CXX shared library libgazebo_vision_plugin.so
[77/86] Building CXX object CMakeFiles/gazebo_gimbal_controller_plugin.dir/src/gazebo_gimbal_controller_plugin.cpp.o
[78/86] Linking CXX shared library OpticalFlow/libOpticalFlow.so
[79/86] Building CXX object CMakeFiles/gazebo_opticalflow_plugin.dir/src/gazebo_opticalflow_plugin.cpp.o
[80/86] Linking CXX shared library libgazebo_mavlink_interface.so
[81/86] Linking CXX shared library libgazebo_multirotor_base_plugin.so
[82/86] Linking CXX shared library libgazebo_uuv_plugin.so
[83/86] Linking CXX shared library libgazebo_motor_model.so
[84/86] Linking CXX shared library libgazebo_gimbal_controller_plugin.so
[85/86] Linking CXX shared library libgazebo_geotagged_images_plugin.so
FAILED: /usr/bin/c++   -DLIBBULLET_VERSION=2.83 -DLIBBULLET_VERSION_GT_282 -Dgazebo_opticalflow_plugin_EXPORTS -I/usr/include/opencv -isystem /usr/include/gazebo-9 -isystem /usr/include/bullet -isystem /usr/include/simbody -isystem /usr/include/sdformat-6.2 -isystem /usr/include/ignition/math4 -isystem /usr/include/OGRE -isystem /usr/include/OGRE/Terrain -isystem /usr/include/OGRE/Paging -isystem /usr/include/ignition/transport4 -isystem /usr/include/ignition/msgs1 -isystem /usr/include/ignition/common1 -isystem /usr/include/ignition/fuel_tools1 -I/home/bill/Firmware/Tools/sitl_gazebo/include -I. -I/usr/include/eigen3 -I/usr/include/eigen3/eigen3 -I/usr/include/gazebo-9/gazebo/msgs -I/home/bill/Firmware/mavlink/include -I/home/bill/Firmware/Tools/sitl_gazebo/external/OpticalFlow/include -isystem /usr/include/uuid -isystem /usr/include/x86_64-linux-gnu -I/home/bill/Firmware/Tools/sitl_gazebo/external/OpticalFlow/external/klt_feature_tracker/include -Wno-deprecated-declarations -fPIC   -I/usr/include/uuid -I/usr/include/x86_64-linux-gnu -std=gnu++14 -MMD -MT CMakeFiles/gazebo_opticalflow_plugin.dir/src/gazebo_opticalflow_plugin.cpp.o -MF CMakeFiles/gazebo_opticalflow_plugin.dir/src/gazebo_opticalflow_plugin.cpp.o.d -o CMakeFiles/gazebo_opticalflow_plugin.dir/src/gazebo_opticalflow_plugin.cpp.o -c /home/bill/Firmware/Tools/sitl_gazebo/src/gazebo_opticalflow_plugin.cpp
In file included from /home/bill/Firmware/Tools/sitl_gazebo/src/gazebo_opticalflow_plugin.cpp:24:0:
/home/bill/Firmware/Tools/sitl_gazebo/src/gazebo_opticalflow_plugin.cpp: In member function ‘virtual void gazebo::OpticalFlowPlugin::Load(gazebo::sensors::SensorPtr, sdf::ElementPtr)’:
/home/bill/Firmware/Tools/sitl_gazebo/include/gazebo_opticalflow_plugin.h:43:18: error: ‘TRUE’ was not declared in this scope
#define HAS_GYRO TRUE
                  ^
/home/bill/Firmware/Tools/sitl_gazebo/src/gazebo_opticalflow_plugin.cpp:115:17: note: in expansion of macro ‘HAS_GYRO’
     has_gyro_ = HAS_GYRO;
                 ^
ninja: build stopped: subcommand failed.
ninja: build stopped: subcommand failed.
Makefile:200: recipe for target 'px4_sitl' failed
make: *** [px4_sitl] Error 1



最佳答案

查看完整内容

报错的.h文件大写改为小写;重新编译

扫一扫浏览分享
回复

使用道具 举报

149

阿木币

1

精华

429 小时

在线时间

技术大V

Rank: 4

发表于 2020-3-8 17:35:48
报错的.h文件大写改为小写;重新编译
72273447-86C2-4E7D-BB9D-F0FDE8D42B0E.jpeg

评分

参与人数 1阿木币 +3 收起 理由
admin + 3 赞一个!一招制敌!

查看全部评分

回复

使用道具 举报

202

阿木币

0

精华

373 小时

在线时间

版主

Rank: 7Rank: 7Rank: 7

发表于 2020-3-9 08:47:13
eason 发表于 2020-3-8 17:35
报错的.h文件大写改为小写;重新编译

赞一个~~一招制敌
回复

使用道具 举报

返回列表
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表