How to get pitch and yaw angle from the raw IMU data?
Hello
Im using the IMU data for some orientation platform purpose. Im able to use the IMU in a ROS massagesses in the Callback like these
void imuCallback(const sensor_msgs::ImuConstPtr& msg)
{
tf::quaternionMsgToTF(msg->orientation, quat);
tf::Matrix3x3(quat).getRPY(r,p,y);
But I would like to check when for example some turn of the platforms occur if its exactly by that yaw and pitch.
For example I wonted to record the start time when my platform is start going up/down the ramp , like this condition
if(fabs(p-initial_pitch) >= ramp_ang)
{
ramp_pitch = fabs(p-initial_pitch)*57.3;
}
So I wont to check the IMU data if that is ok.
Any help? Thanks