mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
879 stars 989 forks source link

Mav ignores "coordinate_frame" when using mavros_msgs/PositionTarget #594

Closed pryre closed 8 years ago

pryre commented 8 years ago

As a precursor, I can't figure out if this is a firmware side issue, or a mavros issue.

I have some code that is performing velocity control in the body frame of the mav, but I can only seem to get it to move with respect to the local frame. I am setting the coordinate frame as "FRAME_BODY_OFFSET_NED", and applying the type_mask as appropriate, but no matter what, the mav only moves in respect to the world NED, and not body frame NED.

The code is relatively basic, and doesn't perform rotations to account for yaw in the world frame. If I change "coordinate_frame" to any of the available options, the mav always flies in the "correct" path regardless of yaw. Basically I cannot command the UAV to fly forward with respect to its own heading.

Does anyone know what or where this issue is being caused?

vooon commented 8 years ago

As you can see in setpoint_raw.cpp L163, it's firmware side.

pryre commented 8 years ago

Thanks, was mainly after confirmation.