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

How to interpret robot's quaternion?

asked 2018-07-31 18:58:41 -0600

xjman530 gravatar image

updated 2018-07-31 18:59:30 -0600

Hello Again! (Using Indigo/Rospy)

Is there a way, using the robot's quaternion (using slam_out_pose orientation), to determine if its going towards, or away, from the center of the global map (the origin, 2D). The origin is, I'm assuming, where the robot initial started up its mapping procedure. This is not the same as determining if the robot is going forwards or backwards. This is probably due to my poor understanding of quaternions, especially in the robot's reference frame in conjunction with the static reference frame of the global map. Thank you in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-07-31 19:35:25 -0600

I think this issue arises from a lack of context on Quaternions. I would recommend looking into resources to better your knowledge of them before attempting what you're trying to do (this is a good learning experience!). What you likely want to do is convert the quaternion to RPY with TF or another equivalent tool and base your logic for your application based on them to give yourself a physical understanding of what's going on.

After that, I would just make a quaternion of the map frame orientation and compare against the robot's to determine the relative difference to know if "to" or "away" from the origin.

https://en.wikipedia.org/wiki/Quatern...

edit flag offensive delete link more

Comments

1
jayess gravatar image jayess  ( 2018-07-31 19:56:37 -0600 )edit

Worth noting that http://wiki.ros.org/tf_conversions is one of the best inbuilt tools for this.

fvd gravatar image fvd  ( 2018-07-31 21:55:42 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2018-07-31 18:58:41 -0600

Seen: 292 times

Last updated: Jul 31 '18