Fake GPS via mavlink HIL_GPS message

@Mana_Saedan - I wasn’t using dronekit to generate the HIL_GPS message, though I’m fairly sure that would be possible as well.

Instead, I used the mavros fake_gps plugin. To use this plugin, you publish a ROS pose message to the /mavros/fake_gps/mocap/pose ROS topic and the plugin generates a HIL_GPS message that gets sent to the ardupilot. You can find some example configurations on this thread.

As a bit of a caveat, I haven’t been able to achieve a reliable position hold with this method, though I believe others have. I’ve recently tried using some other message types that seem better suited to the task, but haven’t had success with that method yet either.

1 Like