PX4 never reach the position asked


I have a problem with my PX4. So, he has a companion computer (RPi3) and with the companion I send a message SET_POSITION_TARGET_LOCAL_NED with some coordinate (the frame used is the good one)
Then I compare the position of the drone with the point and when he reach the point I do some stuff.
BUT : sometimes the drone do everything well but sometimes the drone goes to another point (3m away) and stop moving. But even if a re-send a SET_POSITION_TARGET_LOCAL_NED he still go to this point which is not the one I send.

Any idea why?

May it be due to the home_position or EFK or anything?


Hi, is it PX4 flight stack or ardupilot?
and are you using dronekit python to communicate between RPi3 and the PX4?

No I use MavLink (but the protocol is in fact the same) and I think it is ardupilot

For ArduPilot questions please ask in discuss.ardupilot.org.