MAVSDK icon indicating copy to clipboard operation
MAVSDK copied to clipboard

MavFrame enum is not correct?

Open chengguizi opened this issue 1 year ago • 2 comments

In the file https://github.com/mavlink/MAVSDK/blob/main/src/mavsdk/plugins/mocap/include/plugins/mocap/mocap.h

I see MavFrame is defined like the following, which is used to fill up the ODOMETRY message for MAVLINK. I assume they are arrange so MocapNed is coded as 0 and LocalFrd is coded as 1

        enum class MavFrame {
            MocapNed, /**< @brief MAVLink number: 14. Odometry local coordinate frame of data given
                         by a motion capture system, Z-down (x: north, y: east, z: down).. */
            LocalFrd, /**< @brief MAVLink number: 20. Forward, Right, Down coordinate frame. This is
                         a local frame with Z-down and arbitrary F/R alignment (i.e. not aligned
                         with NED/earth frame). Replacement for MAV_FRAME_MOCAP_NED,
                         MAV_FRAME_VISION_NED, MAV_FRAME_ESTIM_NED.. */
        };

However, in MAVLINK they are coded both at 20. Is this something wrong here? Shouldn't we just expose the API as the native MAVLink enum, instead of MAVSDK custom ones?

https://github.com/mavlink/MAVSDK/blob/main/src/mavsdk/plugins/mocap/include/plugins/mocap/mocap.h#L293

chengguizi avatar Mar 12 '23 14:03 chengguizi