I’m currently working on a project with an Erle-Copter to make it fly indoor with the help of a Motion Capture System (MCS). I am using the Erle-Brain 3 with the latest July “frambuesa” update (ArduCopter 3.5-rc9).
I already implemented a ROS node that retrieves the position estimation of the MCS and publishes it in a dedicated topic. The challenge I’m facing now is to inject this position estimation into the APM flight controller.
My idea was to fake a GPS signal, but I am still not familiar with every aspect of APM and I am unsure of how to proceed. I have made a lot of research on the subject, but I am getting more and more confused… Found topic are from 2015 or 2016, and apparently there have been some changes and new implementations in the code since then.
My main source of inspiration is the following topic:
Once my (X,Y,Z) position is transformed into adequate latitude and longitude, is it sufficient to publish it on “/mavros/fake_gps/fix” ?
I have also found interesting MAVLINK messages (http://mavlink.org/messages/common): HIL_GPS (#113) and GPS_INPUT (#232).
What is the difference between them and could they be of any help ?
Here are the implementations of “AP_GPS_MAV.cpp” and “fake_gps.cpp” of mavros:
Could anyone lead me on the right way to proceed ?
Many thanks !