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?


Post your code and a small dataflash.log file where the problem occurs. Otherwise it`s just speculative guesswork.

PS: Are you using ArduCopter or are you using PX4 firmware?
I guess you are using a Pixhawk flight controller hardware?

I use a PX4 but I think it is arducopter on it.
There is no log, the copter just keep sending the position package and they are right.
The code is :
set_mode(autopilot, ‘GUIDED’)
while dist(get_pos(autopilot), pos) < 1.5:
And I see that the problem come from the drone because visually the drone do not go to the point I send him. So I don 't know what to do

What is the value of your WP_RADIUS parameter?

WP_RADIUS = 0.3 and my algorithm check one meter around the point