Ask Your Question
0

Getting the position and the pose of robot using tf_listener [closed]

asked 2012-07-19 04:11:24 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I'm trying to get position and orientation of the robot calculated by gmapping.
I used this question link text and tutorial link text as a reference.

I can get the robot position using tf::Transform::getOrigin() which is /map -> /base_link transform.
However the robot angle obtained from tf::Transform::getRotation()::getAngle() is only from 0 to π.
To determine the angle of the robot from 0 to 2π, What should I do?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Procópio
close date 2015-05-20 10:32:39.298191

1 Answer

Sort by » oldest newest most voted
11

answered 2012-07-19 04:52:53 -0500

Lorenz gravatar image

Use tf::getYaw:

tf::getYaw(transform.getRotation());
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2012-07-19 04:11:24 -0500

Seen: 5,291 times

Last updated: Jan 28 '14