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) );
tf_broadcast->sendTransform(tf::StampedTransform(transform, ros::Time::now(), "/base_link", "imu_frame"));
But instead of using pi/2 I have to use pi? And it has to be (PI,0,0)?