Skip to content

The doc of mavros_msgs about coordinate needs better clarification. #1500

Open
@petertheprocess

Description

@petertheprocess

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
uint8 coordinate_frame
uint8 FRAME_LOCAL_NED = 1
uint8 FRAME_LOCAL_OFFSET_NED = 7
uint8 FRAME_BODY_NED = 8
uint8 FRAME_BODY_OFFSET_NED = 9

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions