Airsim base on PX4 v1.9.2

Hi,
is it possible to run the airsim simulator in cooperation with PX4 v1.9.2 or newer?
In version 1.8.2, launched based on this tutorial:
it works fine, but currently i need PX4 1.9.2 version.

Base on PX4 v1.8.2 it compiles as:

make posix_sitl_ekf2 none_iris

in version 1.9.2 it looks like neither posix nor ekf2 module.

@Darek AirSim does not support lockstep yet which was added in PX4 v1.9.2. They are however, working on adding support for it.

In the meantime, you can recompile PX4 with lockstep disabled:
https://dev.px4.io/v1.9.0/en/simulation/index.html#disable-lockstep-simulation

Thanks a lot Julian,
I did it, recompile px4, but it still not want to work.
when I followed tutorial:
~> /PX4/Firmware$ make posix_sitl_ekf2 none_iris

Makefile:469: *** “posix_sitl_ekf2 cannot be the first argument. Use ‘make help|list_config_targets’ to get a list of all possible [configuration] targets.”. Stop.

so I try to make:

make px4_sitl_default none_iris

The px4 start but it still have not communication with airsim.

How to run px4 in version 1.9.2 to communicate witch AirSim?

Ps.
When I started px4 repo from master I see in PX4 console:
WARN [commander] Preflight Fail: Compass Sensor #0 missing

I suppose you also need to switch from TCP to UDP by switching this to false:

I changed ~/PX4/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.xacro to:

<xacro:arg name=‘use_tcp’ default=‘false’ />

next

make clean
make px4_sitl_default none_iris

but PX4 still start on TCP

INFO [simulator] Waiting for simulator to connect on TCP port 4560

Did I miss something? maybe call other model not none_iris?

Oh, I’m stupid. You don’t need to switch Gazebo :man_facepalming: but PX4:

https://github.com/PX4/Firmware/blob/7fe257c0c0e729f91afdf1b7d8d9a32d94ddcfc4/ROMFS/px4fmu_common/init.d-posix/rcS#L208

Change this line to:

simulator start -u 14560
1 Like

It works +1:
Julian, many many thanks for your help.

1 Like