# Local\_ned\_frame and body\_ned\_frame

**URL:** <https://discuss.px4.io/t/local-ned-frame-and-body-ned-frame/23888>\
**Category:** Uncategorized\
**Created:** [August 23, 2021, 10:15am UTC](https://discuss.px4.io/t/local-ned-frame-and-body-ned-frame/23888 "2021-08-23T10:15:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![quadDeveloper](https://discuss.px4.io/letter_avatar_proxy/v4/letter/q/dbc845/32.png) [@quadDeveloper](https://discuss.px4.io/u/quadDeveloper)\
**Post date:** [August 23, 2021, 10:15am UTC](https://discuss.px4.io/t/local-ned-frame-and-body-ned-frame/23888/1 "2021-08-23T10:15:04Z")

</div>

Hello,

I am trying to navigate the drone using velocity commands.  
I am using mavros\_msgs/PositionTarget message ([mavros\_msgs/PositionTarget Documentation](http://docs.ros.org/en/api/mavros_msgs/html/msg/PositionTarget.html)) to send velocity commands.  
I am sending translational velocities to [geometry\_msgs/Vector3] velocity and rotational velocity to yaw and ignored the position commands PX,PY,PZ.

So I am sending x velocity and yaw.  
In mavros\_msgs/PositionTarget, when I choose the coordinate\_frame as FRAME\_LOCAL\_NED, the drone turns to the desired yaw angle but does not move forward in the turned angle, instead just continues in the x direction.

When I choose FRAME\_BODY\_NED, drone turns to desired yaw and continues to fly in the turned yaw angle. But the problem with FRAME\_BODY\_NED is initially the drone rotates to 90 degrees, thus, the coordinate frames with reference to world frame changes and it is a lot of confusion.

Also in both the frames, the drone’s center of gravity is not its origin.

So as the drone moves how can I always make its center to be its origin?  
How can I deal with the above mentioned rotational and translational velocity problem?
