I am trying to perform some basic flight using offboard mode. Similar to the very basic example I send the points to the
mavros/setpoint_position/local topic. When I send the position
[0,0,1] I expect the drone to fly to one meter altitude. In simulation this works great but on the real drone the
/mavros/local_position/pose initializes with values far from
[0,0,0]. I assume it is receiving its postion from the ekf and if gps is enabled these are values like
[-15, 5, -1], which is very bad as the drone would fly 15 meter in a very wrong direction to reach the setpoint
[0,0,1]. If I disable GPS by setting
0, I get values reasonable close to zero.
But disabling GPS is not always what I want as I have to reboot the drone, so is there a way to init the
local_position always to
[0,0,0] or do I have to fetch the current local pose and calculate the relative offset myself and set the offboard points accordingly?