Incorrect yaw data in mavros

Hello, everybody,
I’m currently trying to capture the roll, pitch and yaw data through mavros, but I can’t get the right value for yaw. Using directly Mavlink as well as QGC, the received data is correct. Does anyone have any idea what the problem might be? I have recalibrated Pixhawk’s IMU several times, but there is no change in mavros. On Pixhawk I use Ardusub Firmware.

Hi,

Which topic are you using ? Can you compare the QGC yaw value from the one in the topic ?

Hi Patrick, Thanks for the answer! The mavros topic I use is /mavros/imu/data. Compared to QGC there are 90 degrees yaw difference and I think it is due to the orientation of the frame. PX4 uses the NED convention (north, east, down) and ROS uses ENU (east, north, up). Maybe that’s the problem.

Hi,

Check the global_position or any position topic, it may provide attitude information from vehicle frame.