sitl_gazebo/include/gazebo_opticalflow_plugin.h:43:18: error: ‘TRUE’ was not declared in this scope

时间:2024-05-22 11:55:26

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/mima/Firmware/Tools/sitl_gazebo/include/gazebo_opticalflow_plugin.h:43:18: error: ‘TRUE’ was not declared in this scope
#define HAS_GYRO TRUE
^
/home/mima/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/mima/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
sitl_gazebo/include/gazebo_opticalflow_plugin.h:43:18: error: ‘TRUE’ was not declared in this scope
sitl_gazebo/include/gazebo_opticalflow_plugin.h:43:18: error: ‘TRUE’ was not declared in this scope
修改 HAS_GYRO TURE为1,因为是bool型,1ture 0false
sitl_gazebo/include/gazebo_opticalflow_plugin.h:43:18: error: ‘TRUE’ was not declared in this scope
想法参考:
https://www.freesion.com/article/3806730682/