当前位置:网站首页>Px4 multi computer simulation (gazebo)

Px4 multi computer simulation (gazebo)

2022-06-25 23:41:00 Blue sky

Version Description :

operating system

The host machine ( Or development machine ):ubuntu server 20.0.04, thinkpad

Target machine ( Airborne computer ):ubuntu server 20.0.04, Shumei school 3b+

Flight control software :px4 autopilot 1.11.3

Simulation software :gazebo 9

Application software running environment :mavsdk

mavlink Data flow routing software :mavlink-router

The first part , Flight control application and gazebo The software simulation environment runs on the same machine

Flight controller software (PX4 Autopilot

Simulation software (gazebo

Flight control application software ,MAVSDK Running environment and application

All the above software runs in one machine , Here is thinkpad+ubuntu server.

1. Start on the development machine gazebo Software simulation environment

stay PX4-Autopilot Execute command under directory :

$./Tools/gazebo_sitl_multiple_run.sh -w baylands

gazebo Three four axis aircrafts appear in the simulation graphical interface

2. Launch the flight control application on the development aircraft

stay MAVSDK/examples/takeoff_land/build Execute command under directory

$./takeoff_and_land udp://:14540

from gazebo The first plane can be seen taking off in the simulation graphical interface 、 hover 、 land

stay MAVSDK/examples/multiple_drones/build Execute command under directory

$./multiple_drones udp://:14540 udp://:14541 udp://:14542

from gazebo You can see in the simulation graphical interface 3 Planes take off in turn 、 hover 、 land

The second part . The simulation environment runs on the host computer and the flight control application software runs on the Shumei school

here , The target plane is Shumei sect , It works with the host computer thinkpad Has passed between wifi The router has established a connection , And you can thinkpad On the computer through ssh Log in to Shumei sect remotely .

1. Same as the first part , Start on the host first gazebo Software simulation environment .

2. Establish a relationship between the host computer and the Shumei sect mavlink route

In the host mavlink_router Execute command under directory :

./mavlink-routerd -e 192.168.3.18:14540 0.0.0.014540

This order will gazebo The first aircraft used in the simulation environment udp Speak with what will be executed takeoff_and_land Application's udp Mouth to mouth ( Route up ).

Modify the parameters in the above command 14540 by 14541 It corresponds to the second plane ,14542 It corresponds to the third plane .

3. Run the flight control application on Shumei pie

stay MAVSDK/examples/takeoff_land/build Under the table of contents

Take off first command :./takeoff_and_land udp://:14540

Take off the second command :./takeoff_and_land udp://:14541

Take off the third command :./takeoff_and_land udp://:14542

stay MAVSDK/examples/multiple_drones/build Under the table of contents

Take off in turn 3 An order to fly a plane :

$./multiple_drones udp://:14540 udp://:14541 udp://:14542

原网站

版权声明
本文为[Blue sky]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202180602056272.html