PX4 / jMAVSim

Simple multirotor simulator with MAVLink protocol support
BSD 3-Clause "New" or "Revised" License
82 stars 207 forks source link

Simulator: make lockstep an option #94

Closed julianoes closed 5 years ago

julianoes commented 5 years ago

This adds a CLI argument to enable lockstep. This should restore HITL in its original working shape.

The problem was mainly that we used the simulator time instead of the computer time and also we ran update twice which is required for lockstep. One step is to receive messages from the autopilot, and the other step is to send new messages out.

This change will require that we use the cli flag on the PX4 side.

Fixes #93.

potaito commented 5 years ago

Sweet! It's working! Just for the record, I'm using the same old launch command without any extra cli option: ./Tools/jmavsim_run.sh -q -d /dev/ttyACM0 -b 500000 -r 100

The simulated vehicle flies nicely and stable.