Ask Your Question

Revision history [back]

In imu_callback try


You need to use the message variable passed into your callback function (which you have named data), not the message type.

Be careful though, the orientation is represented as a quaternion, so if you are thinking that the z component is yaw you are going to have issues. See this answer for ways to convert rotations in rospy.