PX4在GAZEBO仿真中加载iris模型问题

本文详述了PX4启动仿真时使用的launch文件,包括px4.launch、posix_sitl.launch、mavros_posix_sitl.launch和single_vehicle_spawn.launch等,解析了它们各自的功能。介绍了如何为iris模型添加相机,以及在添加过程中遇到的问题。同时,文章提到了环境变量~/.bashrc对运行的影响,并列举了在不同PX4版本中遇到的模型加载Bug及其解决方案。最后,讨论了gazebo无法打开的可能原因及解决办法。


1. PX4启动仿真的launch系列文件

1.1 单个launch文件解读

打开每个文件的开头,都有对它功能的描述。

  • px4.launch

Posix SITL PX4 launch script
Launches Only PX4 SITL. This can be used by external projects
加载px4_sitl仿真的节点

  • posix_sitl.launch

Posix SITL environment launch script
launches PX4 SITL, Gazebo environment, and spawns vehicle
px4.launch基础上,打开GAZEBO环境并使用spawn_model加载sdf格式的飞机模型

  • mavros_posix_sitl.launch

posix_sitl.launch基础上,加入mavros package里的px4.launch(注意不是px4下的px4.launch)。
即开启了sitl仿真后,飞机信息通过mavros来传递交互。那么交互的端口号fcu_url即飞机端udp端口由<arg name="fcu_url" default="udp://:14540@localhost:14557"/>确定。这个参数主要是为传入mavros使用。

  • single_vehicle_spawn.launch

Posix SITL environment launch script
launchs PX4 SITL and spawns vehicle
打开sitl节点,以及使用xacro加载urdf格式的飞机模型。注意加载模型有urdf和上述sdf两种方式。后文会对两种方式详细比较。

  • <
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值