|
发表于 2020-7-16 15:21:44
5748 浏览 6 回复
gazebo仿真编译
我在仿真编译时遇到的问题,不知道该怎么解决。求求大神解答!!!
[0/4] Performing build step for 'sitl_gazebo'
[1/2] Building CXX object CMakeFiles/g...ir/src/gazebo_opticalflow_plugin.cpp.o
FAILED: CMakeFiles/gazebo_opticalflow_plugin.dir/src/gazebo_opticalflow_plugin.cpp.o
/usr/bin/c++ -DLIBBULLET_VERSION=2.87 -DLIBBULLET_VERSION_GT_282 -Dgazebo_opticalflow_plugin_EXPORTS -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 -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/you/Firmware/Tools/sitl_gazebo/include -I. -I/usr/include/eigen3 -I/usr/include/eigen3/eigen3 -I/usr/include/gazebo-9/gazebo/msgs -I/home/you/Firmware/mavlink/include -isystem /usr/include/opencv -I/home/you/Firmware/Tools/sitl_gazebo/external/OpticalFlow/include -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/uuid -isystem /usr/include/x86_64-linux-gnu -I/home/you/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++1z -MD -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/you/Firmware/Tools/sitl_gazebo/src/gazebo_opticalflow_plugin.cpp
In file included from /home/you/Firmware/Tools/sitl_gazebo/src/gazebo_opticalflow_plugin.cpp:24:0:
/home/you/Firmware/Tools/sitl_gazebo/src/gazebo_opticalflow_plugin.cpp: In member function ‘virtual void gazebo::OpticalFlowPlugin::Load(gazebo::sensors::SensorPtr, sdf::ElementPtr)’:
/home/you/Firmware/Tools/sitl_gazebo/include/gazebo_opticalflow_plugin.h:43:18: error: ‘TRUE’ was not declared in this scope
#define HAS_GYRO TRUE
^
/home/you/Firmware/Tools/sitl_gazebo/include/gazebo_opticalflow_plugin.h:43:18: note: in definition of macro ‘HAS_GYRO’
#define HAS_GYRO TRUE
^~~~
ninja: build stopped: subcommand failed.
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-build
cd /home/you/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/cmake --build .
ninja: build stopped: subcommand failed.
Makefile:193: recipe for target 'px4_sitl_default' failed
make: *** [px4_sitl_default] Error 1
xiao_ming已获得悬赏 1 阿木币最佳答案
解决了,是我的linux的gcc编译器的版本不对,升级后就编译成功了。
|
扫一扫浏览分享
|
|
|
|
|
|
|
仿真编译的问题,论坛也不好回答哦。最好还是得靠你自己的编程能力的提升,这是基本功。大家也不愿回答编译的问题,因为对自己本身的提升不大。 |
|
|
|
|
|
|
|
楼主|
发表于 2020-7-16 15:30:50
但是,make px4_sitl_default jmavsim这个指令却可以编译成功
|
|
|
|
|
|
|
|
楼主|
发表于 2020-7-16 16:08:12
|
|
|
|
|
|
|
楼主|
发表于 2020-7-16 17:15:35
解决了,是我的linux的gcc编译器的版本不对,升级后就编译成功了。 |
|
|
|
|
|
|
|
发表于 2020-7-16 20:56:31
来自手机
|
|
|
|
|
|
|
发表于 2020-7-21 16:06:52
我也遇到这个问题,不过我是把gazebo_opticalflow_plugin.h define那里的TURE换成1,因为后面看到这个是bool型 |
|
|
|
|
|
|
|