dji-sdk / Onboard-SDK-ROS

Official ROS packages for DJI onboard SDK.
445 stars 308 forks source link

local position outputted by the is not NED #66

Closed chutsu closed 7 years ago

chutsu commented 7 years ago

According to the mesage definition here, the local position is supposed to be in NED, but it is in NEU instead.

The bug can be found at here.

it should have been this:

    local_position.z = -1 * global_position.height;

Edit: having a further look, the NED defined in the message is wrong, D should not be negative downwards, else you will be using NEU as mentioned and that is a Left-Handed Coordinate frame, everything else in the SDK is in right-handed coordinate frame....

andre-nguyen commented 7 years ago

It's not a bug it's a "feature" for non-academic people or people with no formal training in navigation systems. It's unfortunate because it messed with my team quite a bit.

Here's the bit in the documentation that will interest you https://developer.dji.com/onboard-sdk/documentation/introduction/things-to-know.html#2-ground-frame

See the note:

Note: To alleviate this issue of the unnatural downward-pointing positive Z, we adjust the direction of vertical control in order to make the height or vertical velocity to be positive upwards. In other words, giving a positive velocity will make the UAV ascend. This adjustment does not affect the directions and the orders of the other two axis. We are not defining a left-handed co-ordinate system; the actual computations on the flight controller happen in an NED frame.

Also you can see in the message definition that -Z is down, so the message correctly indicates that +Z is up which is in accordance to the documentation..

chutsu commented 7 years ago

Thanks, I've been bitten by co-ordinate transforms with MAVROS as well... Good job on your High Speed Landing paper btw :P

I really wished these ROS packages conformed to the ROS REP-105 standard.