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

How should RPY converted from an IMU look like? [closed]

asked 2015-06-25 04:18:30 -0600

What angles should be there?

0°-360° ?

-180° - 0° - 180° ?

Or something else?

I am for example using this code and I am getting weired results...

void cb_imu(const sensor_msgs::Imu::ConstPtr &msg)
{
    double roll, pitch, yaw;

    tf::Quaternion q;
    tf::quaternionMsgToTF(msg->orientation, q);
    tf::Matrix3x3(q).getRPY(roll, pitch, yaw);
}
ROS_INFO_STREAM("RPY: "<<roll*180.0/M_PI<<" "<<pitch*180.0/M_PI<<" "<<yaw*180.0/M_PI);

My Results of YAW show two times zero, for one half of the circle the values are negative (go up to -40°) and for the other half the same for positive values.

Regards,

Christian

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by cyborg-x1
close date 2015-06-26 04:04:19.513957

1 Answer

Sort by » oldest newest most voted
0

answered 2015-06-26 04:00:37 -0600

I tried around and got a suitable calibration for it.

Now I think it should be -180° - 0° 180° degree.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-06-25 04:18:30 -0600

Seen: 1,326 times

Last updated: Jun 26 '15