Yaw only in set_position



I am trying to set the heading of the drone to north (using cloud virtual drone) without moving the position of the drone.
When I check the doc for set_position i found this info:
“To provide only Yaw setpoint use this API with x,y,z arguments set to 0, relative=True, yaw_valid=True”

However I do not get that to work. I can however move the drone relative , and if a add angular z value below with for instance 100/(pi*180) i get a rotation of 10 degrees, so it is still relative to the current angle.

(for the moment i have a workaround to read the heading from telemetry and do a negative relative rotation from that, but it does not give exact heading, and it does not feel the way i would like to to it :slight_smile: )

I have tested different settings true/false for body_frame and relative to see if I could get the intended result, but no success yet.

Can you help me how the msg below should look to just make the drone rotate to north heading?

Thank you!

best regards,
Sebastian W

My code is below:

var msg = {“twist”:{“twist”:{ “linear”:{“x”: 0,“y”: 0,“z”: 0},“angular”:{“z”: 0}}},“tolerance”: 0.3,“async”: true, “relative”: true,“yaw_valid” : true, “body_frame” : false };
type: “POST”,
dataType: “json”,
headers: { ‘Authorization’: 'Token ’ + cloudToken, ‘VehicleID’: vehicleId },
data: JSON.stringify(msg),
url: cloudRestPath+"/ros/"+namespace+"/navigation/position_set",
success: function(data){



Is it possible, to query current local position, and call position_set API without relative or body_frame, but x,y,z filled with current position, and yaw as the target yaw you would want.


Hi @srv!
I implemented your suggestion , and that works good for me. Thank you for quick help!

best regards,