AirSim SITL with QgroundControl and px4

Hello everyone,
My goal is to run Qground control with PX4 as SITL with Unreal Landscape Mountain as a simulation environment. This part is not detailed in the documentation. I would appreciate any help on this. Thanks

  • Has anybody been able to setup and get it to work?
    I am running this on a Windows 10 machine with a linux terminal. When I follow the instructions on this link https://airsim-fork.readthedocs.io/en/latest/px4_sitl.html I get this line at the end
    INFO [simulator] Waiting for initial data on UDP port 14560. Please start the flight simulator to proceedā€¦
  • When I start the simulation on the Unreal editor, I donā€™t see anything happening on the px4 console?
  • It seems PX4 is not connected to Unreal editor simulation.
  • I am using v1.8.2 of PX4
  • You can find below the json file for AirSim settings

sudo ./build/posix_sitl_default/px4 ./posix-configs/SITL/init/ekf2/iris
commands file: ./posix-configs/SITL/init/ekf2/iris


| ___ \ \ \ / / / |
| |/ / \ V / / /| |
| __/ / \ / /
| |
| | / /^\ \ ___ |
_| / / |_/

px4 starting.

INFO [dataman] Unknown restart, data manager file ā€˜rootfs/fs/microsd/datamanā€™ size is 11405132 bytes
INFO [simulator] Waiting for initial data on UDP port 14560. Please start the flight simulator to proceedā€¦

json settings file for unreal project
{
ā€œSeeDocsAtā€: ā€œhttps://github.com/Microsoft/AirSim/blob/master/docs/settings.mdā€,
ā€œSettingsVersionā€: 1.2,
ā€œSimModeā€: ā€œMultirotorā€,
ā€œvehiclesā€: {
ā€œPX4ā€: {
ā€œVehicleTypeā€: ā€œPX4Multirotorā€,
ā€œSitlIpā€: ā€œā€,
ā€œUdpIpā€: ā€œ127.0.0.1ā€,
ā€œUdpPortā€: 14560,
ā€œUseSerialā€: false
}
}
}

I was able to set it up. It can connect to PX4 SITL. Make sure to run the latest AirSim.

However I canā€™t do much beyond that in SITL mode, it doesnā€™t respond to Joystick input. Flying via DroneShell only works with SimpleFlight (not PX4).

@jessearmand Have you set the parameters correctly? I was able to fly it by sending joystick inputs over mavlink using QGroundControl

Iā€™m not sure what additional parameters need to be setup. I have calibrated the joystick with QGroundControl.

Next, Iā€™m thinking to test with gazebo, and straight to HITL.

More details on my setup is here:

Solved the issue. I figured out itā€™s because I didnā€™t assign the PlayerStart to automatically receive input from Player 0 on the LandscapeMountains environment.

It works fine in Blocks environment, because thereā€™s only 1 player.

1 Like

@jessearmand Awesome that it works!