Robotics StackExchange | Archived questions

Get course from odom data

Hey,

I am simulating a Pioneer model. I want to know the current course of the bot i.e the direction of the trajectory. How can I get this data from the odom topic that is being published?

Thanks in advance.

Asked by trishantroy on 2018-11-21 10:00:55 UTC

Comments

Answers

Solved. It was a very easy task. I messed up with the order of quaternion angles (sad!).

 pioneer_yaw=180/pi*atan2(2*msg->pose.pose.orientation.z*msg->pose.pose.orientation.w,1-2*msg->pose.pose.orientation.z*msg->pose.pose.orientation.z);

This is for a planar surface.

Asked by trishantroy on 2018-11-21 14:08:20 UTC

Comments