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

how to obtain declination data in turtlebot3?

asked 2019-10-24 03:50:56 -0600

thangvip5432 gravatar image

I'm running roscore (kinetic) on turtlebot3 burger (using openCR i think). when launching turtlebot3_robot.launch, i only see /imu. However, the imu_compass driver(link here ) need /imu/declination, which i can't find anywhere in rostopic.

How can i obtain the data /imu/declination?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-10-24 07:44:18 -0600

mjcarroll gravatar image

In the case of that sensor driver, declination can be passed in via parameter, see, where it defaults to 0.0 if the parameter is not present.

Declination is a function of your location on earth. There are a couple online tools for computing your current declination based on your location such as:

If you want to compute declination online based on your location, you can use a software package such as to parse the magnetic model and get the declination for your area.

In general, using the value computed via the website is sufficient unless your robot travels over long enough distances to see changes in the declination.

edit flag offensive delete link more


Thank you, but what exactly is "long enough distance"?

thangvip5432 gravatar image thangvip5432  ( 2019-10-24 09:48:50 -0600 )edit

At least the website reports declination accuracy to 30 minutes of arc (or 0.5 degrees). Since 1 degree of latitude is about 110km apart, that means that the data is accurate to about 55 km (30ish miles). In that case, I would say that "far enough distance" is at least that far, but in practice probably much further. Where I live, moving a whole degree latitude North or South yields a change in declination of about 0.1 degrees.

30 miles would take quite some time to cover on the turtlebot platform :)

mjcarroll gravatar image mjcarroll  ( 2019-10-24 13:54:06 -0600 )edit

Question Tools


Asked: 2019-10-24 03:41:19 -0600

Seen: 316 times

Last updated: Oct 24 '19