Description
http://docs.ros.org/en/api/mavros_msgs/html/msg/PositionTarget.html
#1084 (comment)
Just like the @FaboNo said
the FCU is working with the NED frame and ROS is working with the ENU frame.
Mavros takes care of the transforms between the two frames.
So if you want to send a setpoint to the FCU, it must be defined in ENU frame (X forward and Z up), Mavros will do the transform in NED coordinates.
Conversely when you want to read the current pose of the quadrotor, you can use mavros/local_position/pose, mavros will do the transformation so that you will read the pose in ENU as well
While in the documentation in http://docs.ros.org/en/api/mavros_msgs/html/msg/PositionTarget.html, FRAME_LOCAL_NED and FRAME_BODY_NED are still used. It can misguide many beginners of mavros like me.
So I suggest to rename these FRAM CONSTANT like this:
old | new |
---|---|
FRAME_LOCAL_NED | FRAME_LOCAL_ENU |
FRAME_LOCAL_OFFSET_NED | FRAME_LOCAL_OFFSET_ENU |
FRAME_BODY_NED | FRAME_BODY_FLU |
FRAME_BODY_OFFSET_NED | FRAME_BODY_OFFSET_FLU |
mavros/mavros_msgs/msg/PositionTarget.msg Lines 8 to 12 in c9adcfb |