使用Gazebo仿真器
px4 gazebo version
GZ_VERSION
px4_gz_bridge
ros_gz_bridge
sdf场景模型描述文件
常见问题
1. make px4_sitl gz_x500出现Preflight Fail 预飞检查失败,传感器数据丢失
解决方法1:卸载重装gz版本,比如gzgarden gzharmonic等这些版本 https://github.com/PX4/PX4-Autopilot/issues/24033 https://discuss.px4.io/t/px4-simulation-in-gazebo-fortress-support/45249
解决方法2:由于在v1.15版本将Tools的gz替换为v1.16版本的gz文件内容,替换回原版本对应的没有问题
解决方法3:使用其他模拟机身及环境模型,比如 make px4_sitl gz_x500
解决方法4:检查sdf文件是否包含传感器插件,如果没有添加试试 Missing sensors for a Gazebo simulation
2. ros_gz_bridge 无法工作,无法使用 rviz2 获取 PX4 x500_mono_cam 图像主题
3. 时间戳同步对齐问题
https://blog.csdn.net/2401_83038233/article/details/149101727
ERROR [vehicle_imu] 0 - gyro 1310988 timestamp error timestamp_sample: 1110864000, previous timestamp_sampl
ERROR [vehicle_imu] 0 - accel 1310988 timestamp error timestamp_sample: 1110864000, previous timestamp_samp
NodeShared::Publish()
Error: Interrupted system call