ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

mavros: How to use setpoint_raw/local and set the FRAME_BODY_OFFSET_NED flag

asked 2017-12-23 06:50:09 -0500

MaximeRector gravatar image

updated 2017-12-23 18:33:28 -0500

jayess gravatar image


I'm using the mavros package but I'm not sure on how to use a certain message type. I want to use this: setpoint_raw/local (mavros_msgs/PositionTarget) message type and want to set the FRAME_BODY_OFFSET_NED flag, but I'm not sure on how to do it. Can someone explain this to me?

I was also planning to use the velocity part of the message, but thats quite simple. I will do it as folow:

vel_msg.velocity.x = 0.1;
vel_msg.velocity.y = 0.0;
vel_msg.velocity.z = 0.0;

Of cours I will first declare the publisher and the message.

Message type



edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-12-24 12:32:12 -0500

clyde gravatar image

FRAME_BODY_OFFSET_NED is a flag that's defined in the message. By convention, flags should have the same prefix as the message field that they relate to. In this case the FRAME_* flags are directly below the coordinate_frame field, so they appear to be related. A quick Google search reveals a code snippet that confirms this hypothesis:

moveMsg.coordinate_frame = mavros_msgs::PositionTarget::FRAME_BODY_OFFSET_NED;

Happy roboting!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-12-23 06:50:09 -0500

Seen: 939 times

Last updated: Dec 24 '17