question concerning expected behavior of SET_POSITION_TARGET_LOCAL_NED message

98 views
Skip to first unread message

David Zimmermann

unread,
Mar 18, 2021, 2:28:53 PM3/18/21
to MAVLink
Hi all,

I'm working with PX4 SITL in jMavSim and using MavSDK's python wrapper to send MavLink messages to the simulator. I'm confused about what the expected behavior of the SET_POSITION_TARGET_LOCAL_NED message is supposed to be. When I call the drone.offboard.set_position_velocity_ned() API, I see a number of SET_POSITION_TARGET_LOCAL_NED messages get sent, and inside each message, I see both x,y,z and vx,vy,vz get set to the parameters I inputted into the API and the type_mask also field looks like it's set correctly (no field for position or velocity is ignored). However in the simulation, I see the drone move towards the target with a ground speed that doesn't correspond to the velocity fields (eg with my current settings, I see the drone gravitate towards a speed of around 11.3 m/s, but in the SET_POSITION_TARGET_LOCAL_NED message, the velocity fields can be set much lower (I've tried as low as 4 m/s) or much higher (I've tried as high as 50 m/s) and the drone will still gravitate towards 11.3 m/s). Instead of determining the velocity while en route to the target, it looks like the velocity fields only impact the speed of the drone once it's reached the target position (if I set the velocity high enough, I will see the drone oscillate around the target position).

Is this the expected behavior? If so, what is the proper message to use to control the drone's velocity en route to it's target?

Hamish Willee

unread,
Mar 23, 2021, 9:06:44 PM3/23/21
to MAVLink
Docs for the message implementation on PX4 are here: http://docs.px4.io/master/en/flight_modes/offboard.html#copter-vtol

The right place to ask this question is in the PX4 community - can you please raise it in the appropriate category here: https://discuss.px4.io/c/px4/25
Reply all
Reply to author
Forward
0 new messages