Hi,
since position control is not already provided by the Dronecode SDK and I would really like to have it in my “toolbox”, I decided to add it in the Dronecode OFFBOARD commands.
I have already successfully added the position commands for the NED frame (I will be glad to share the code if you’re interested) and I am now trying to add the position commands for the BODY frame. But it seems to me that frame is ignored by the position control.
Looking inside the PX4 code, I found that the OFFBOARD commands are handled in the method MavlinkReceiver::handle_message_set_position_target_local_ned(mavlink_message_t *msg).
Inside this method, the only reference to a frame is the velocity_frame.
Does it mean that the offboard position control always overrides the frame to NED? Is it possible to command displacements in BODY frame?
Good question, sorry I didn’t get back to you earlier. I think we should support both but it’s probably true that some things are missing on the PX4 and/or SDK side. I hope I’ll get to this some day. Until then PRs welcome .
Hi,
thank you for the update. In the meantime, I made my local branch with the “position_ned” functions.
I am sorry I didn’t share them on github, I was quite in a hurry. Anyway, they seem to work pretty well.
You can find the files here: https://drive.google.com/open?id=1_8xzgTPq88-a2Hi74yR13dIO6b5R7OFS
Here’s git status output:
modified: plugins/offboard/include/plugins/offboard/offboard.h
modified: plugins/offboard/offboard.cpp
modified: plugins/offboard/offboard_impl.cpp
modified: plugins/offboard/offboard_impl.h
I hope they can be of help to make these functionalities available for everyone soon.