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!