Revision history [back]

Rotate the coordinates of IMU

Hey, I'm using a imu but the problem is that the coordinate frame is wrong. y/roll is pointing to north, x/pitch is pointing to east and z is down. But I have to rotate it 180° to the positive side by roll. I know I have to do something like this:

  tf::Transform transform;
transform.setOrigin( tf::Vector3(0.0, 0.0, 0.0) );
transform.setRotation( tf::createQuaternionFromRPY(0,0,M_PI/2) );