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

how to specify yaw-offset and magnetic declination radiance in robot_localization package???

asked 2021-12-06 17:22:20 -0600

Delbina gravatar image

updated 2022-01-14 04:17:58 -0600

Tom Moore gravatar image

hi

I want to know the meaning of yaw-offset! I want to use robot-localization pkg and I need to identify yaw-offset and magnetic declination radiance, I have checked robot-localization ros wiki, but I cannot understand what does the parameter w (omega), mean in the following formula: http://docs.ros.org/en/melodic/api/ro...

yaw-imu=−ω−offsetyaw+θ
θ=yaw-imu+ω+offsetyaw

jwould you please guide me, how can i specify yaw-offset and magnetic declination radiance. The IMU model is gx5-25 which provides orientation in quaternion format, angular acceleration and linear velocity.

@tom Moore , would you please help me to find the correct solution?

Kind Regards

edit retag flag offensive close merge delete

Comments

Does anybody have any idea about this question?

Delbina gravatar image Delbina  ( 2021-12-14 11:35:52 -0600 )edit

@tom Moore Would you please help me to find the answer of this question?

Delbina gravatar image Delbina  ( 2022-01-06 03:36:29 -0600 )edit

I found out that magnetic declination radiance can be calculated from: https://www.ngdc.noaa.gov/geomag/calc... But what about YAW-OFFSET, I really need to know how to calculate/ specify that!? Do we need to calculate these two parameters for each new environment that we want to do the test? thanks

Delbina gravatar image Delbina  ( 2022-01-07 05:09:01 -0600 )edit

in the robot-loccalization ros wiki, it is mentioned that if IMU faces east, the heading should report 0. How can i find out that the heading shows 0?? Should I use any other tools? or from the imu output, i can identify? Would you please help me to find the solution?

Delbina gravatar image Delbina  ( 2022-01-14 03:48:15 -0600 )edit

Hi,

I have a followup question, didn't know if I can post it here but just to avoid confusion, I made a separate question, would really appreciate if I could get some guidance

Sid05 gravatar image Sid05  ( 2022-05-06 06:09:05 -0600 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2022-01-14 04:42:06 -0600

Tom Moore gravatar image

updated 2022-01-14 04:42:59 -0600

Your IMU probably reads 0 at magnetic north. But we need a heading reference that aligns with the UTM grid, where +X points east, and +Y points north. That means we need our heading from the IMU to read 0 when the robot is facing east. So we have two parameters (technically we have 3, but one, the UTM meridian convergence, is accounted for automatically in the code):

  1. If we adjust for magnetic declination (using the magnetic_declination_radians parameter), we can get the IMU data to read 0 at true north, rather than magnetic north. But that means we have a heading of 0 when we face north, but we need it to be 0 when we face east, so...
  2. ...we need to adjust for that 90 degrees (pi/2 radians). That's what yaw_offset is for.

Here's where it gets used:

https://github.com/cra-ros-pkg/robot_...

Here's an example. In this case, we'll imagine our IMU is in Boston, MA, USA. Here's where an IMU would read 0:

image description

But we need it to be 0 when facing east. So when it's facing magnetic north, we'd want the data from it to read

pi/2 + magnetic_declination_radians

So we need to add pi/2 + magnetic_declination_radians to every IMU reading before we can use it. In other words, yaw_offset here (and in most applications) would be pi/2.

edit flag offensive delete link more

Comments

Thanks a lot for responding to this question @Tom Moore

1) from which parameter from the IMU output, I can specify that it reads 0 when facing east!? orientation? angular_velocity? or linear_acceleration? OR all these outputs?

2) about the value that magnetic-declination radiance shows: (0° 39' E ± 0° 23' ), should I consider just 0° 39' E ? should i ignore ± 0° 23'??

Delbina gravatar image Delbina  ( 2022-01-14 05:16:51 -0600 )edit

You're interested in orientation, but you need to convert it to Euler angles first (ROS uses quaternions), and then you want the yaw angle.

Tom Moore gravatar image Tom Moore  ( 2022-01-14 05:20:05 -0600 )edit

Hi,

Just wondering if it the yaw-offset should be -(pi/2) i.e -1.57 considering a clockwise rotation from north to east ?

And from the convention, it mentions

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.
Sid05 gravatar image Sid05  ( 2022-05-20 07:46:56 -0600 )edit

The offset is the value you add to the reading to get the "correct" value. In the example above, if the IMU was aligned with magnetic north, then it would read 0 without any correction, but the REP says that 0 radians faces east, so we would _want_ the IMU to read pi/2 + declination radians. So we have to add that to it.

Tom Moore gravatar image Tom Moore  ( 2022-05-23 11:24:48 -0600 )edit

Thanks @Tom Moore I have been trying to resolve issue with dual_ekf and navsat_transform for GPS based navigation in one of my other questions and its been weeks now. I would really appreciate if you could guide me there as well

Sid05 gravatar image Sid05  ( 2022-05-24 07:54:54 -0600 )edit

Yes, I can only work on this package in my spare time (we don't use it at Locus), and my spare time is extremely limited. I'll get to your question as soon as I can.

Tom Moore gravatar image Tom Moore  ( 2022-05-24 09:14:13 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2021-12-06 17:22:20 -0600

Seen: 707 times

Last updated: Jan 14 '22