Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yaw seems to be North-zero. #3

Closed
kylerlaird opened this issue Mar 9, 2018 · 3 comments
Closed

Yaw seems to be North-zero. #3

kylerlaird opened this issue Mar 9, 2018 · 3 comments

Comments

@kylerlaird
Copy link

My Spatial Dual works great with the Java interface; position and orientation are rock-solid. However, when I use the ROS driver, I get an orientation that seems to be mis-referenced. With my Spatial pointed (roughly) East, I get this from the Imu message:

orientation:
x: -0.010506070219
y: -0.012533034198
z: 0.665283083916
w: 0.746412038803

However, given that quaternion, I get 83 degrees.

In [1]: x = -0.010506070219
...: y = -0.012533034198
...: z = 0.665283083916
...: w = 0.746412038803
...:
...: import tf.transformations
...: import math
...:
...: print(map(math.degrees, tf.transformations.euler_from_quaternion([x, y, z, w])))
...:
[-1.8544214172334526, -0.27104406900104283, 83.42613987606788]

That would normally make sense to me, except that East should be 0 degrees in ROS.

http://www.ros.org/reps/rep-0103.html
"By the right hand rule, the yaw component of orientation increases as the child frame rotates counter-clockwise, and for geographic poses, yaw is zero when pointing east."

@an-scott
Copy link
Contributor

Spatial Dual always outputs data with North equal to zero degrees. You will need to do a translation within your software if necessary.

@mikepurvis
Copy link
Member

Per REP 103, ROS messages use the east-north-up convention: http://www.ros.org/reps/rep-0103.html#coordinate-frame-conventions

To maximize compatibility between components, the native data from the device should ideally be translated in the driver to the ROS convention before being published. However, obviously it's up to individual maintainers to decide what they want to do.

kylerlaird added a commit to kylerlaird/advanced_navigation_driver that referenced this issue Mar 12, 2018
Yaw has been corrected to conform with REP 103.
ros-drivers#3

RTCM corrections can be passed from a topic (as Strings).

A UTM-based transform can be generated.
@kylerlaird
Copy link
Author

cosama added a commit to cosama/advanced_navigation_driver that referenced this issue Jun 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants