The purpose is to have a docker-isolated PX4 SITL via gazebo.
To run from the DockerHub image:
docker run --rm -it -p5760:5760 radarku/px4-sitl
...which starts a MAVLink TCP socket listening at port 5760
--env PX4_HOME_LAT 42.3898
--env PX4_HOME_LON -71.1476
--env PX4_HOME_ALT 14.2
You should get an interactive PX4 shell, which you can use:
pxh> commander takeoff
Alternatively you can connect to the MAVLink stream:
mavproxy.py --master=tcp:127.0.0.1:5760
If you start getting this RC FAILSAFE:
INFO [commander] Takeoff detected
WARN [commander] Failsafe enabled: no datalink
INFO [navigator] RTL HOME activated
INFO [navigator] RTL: climb to 25 m (11 m above home)
INFO [navigator] RTL: return at 25 m (11 m above home)
INFO [navigator] RTL: land at home
Go into your GCS and update the parameter NAV_RCL_ACT
(Set RC loss failsafe mode) to 0
(Disabled) as explained here:
https://docs.px4.io/en/advanced_config/parameter_reference.html#NAV_RCL_ACT
To build:
docker build --rm --tag px4-sitl .
To run:
docker run --rm -it -p5760:5760 px4-sitl
...which starts a MAVLink TCP socket listening at port 5760