ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A, B, C and D should be set to the w, x, y, and z quaternion values, respectively.

I think the reason you haven't been able to solve this is because you may not be familiar with what a quaternion is: Quaternions are a method of representing orientation, and they are better than the usual roll/pitch/yaw approach for a handful of math reasons I won't get into here (but you may be interested in the wikipedia page on this). I recommend you read up on resources there to get a stronger understanding of what it is you're trying to do here.

To actually solve your problem, you'll need to take the data from the IMU and convert it from its current data representation into the Quaternion data representation. The tf2 library has some tools for this that should help.