Gazebo | Ignition | Community
Ask Your Question
0

Get course from odom data [closed]

asked 2018-11-21 09:00:55 -0500

trishantroy gravatar image

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.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by trishantroy
close date 2018-11-21 13:08:39.965534

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-11-21 13:08:20 -0500

trishantroy gravatar image

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-11-21 09:00:55 -0500

Seen: 353 times

Last updated: Nov 21 '18