gazebo-ros多无人机仿真
参考
参考
cd PX4_AutoPilot
source Tools/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd):$(pwd)/Tools/sitl_gazebo
roslaunch px4 xxx.launch
to add more UAVs (up to 10):
.launch文件中添加新无人机需改变项:
<arg name="ID" value="3"/>
<arg name="fcu_url" default="udp://:14543@localhost:14583"/>
<arg name="x" value="1"/>
<arg name="y" value="1"/>
<arg name="z" value="0"/>
<arg name="mavlink_udp_port" value="14563"/>
<arg name="mavlink_tcp_port" value="4563"/>
offboard单机控制
参考
打开三个终端,分别运行如下内容: 1、打开px4在环仿真
cd PX4-Autopilot/
make px4_sitl_default gazebo
2、运行mavros
roslaunch mavros px4.launch fcu_url:="udp://:14540@127.0.0.1:14557"
3、运行offboard节点
cd ~/catkin_ws/
source devel/setup.bash
rosrun offb offb_node
多无人机offboard-ros控制
参考
10.21:board文件修改完成 运行后只链接到了uav0
|