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

navsat_transform_node geographicErr

asked 2021-08-16 10:12:51 -0500

GiacomoDario gravatar image

updated 2021-08-17 01:36:49 -0500

Hello, I am usinf the robot_localization_package to localize a differential drive robot. In my setup, I follow the guidelines of the package documentation about fusing the GPS with dead reckoning and IMU in a second instance. I am using a ublox neo-6m GPS module and the nmea_navsat_driver to read from serial port anf publish into /fix topic. I'm in Helsinki (60.188 deg N) and I receive the following error when launching the robot_localization nodes:

terminate called after throwing an instance of 'GeographicLib::GeographicErr'
  what():  Latitude 60.1901d more than 20d from N pole
[navsat_transform-8] process has died [pid 32400, exit code -6, cmd /opt/ros/noetic/lib/robot_localization/navsat_transform_node /odometry/filtered:=/odometry/filtered_map /gps/fix:=/fix __name:=navsat_transform __log:=/root/.ros/log/940a0462-fea0-11eb-9a12-00044bf84a37/navsat_transform-8.log].
log file: /root/.ros/log/940a0462-fea0-11eb-9a12-00044bf84a37/navsat_transform-8*.log

Checkin out the GeographicLib documentation, at line 97, I found the error raised by the node. Now, I don't understand if the error is in the way I am using the node, or if at some latitudes the node fails (which I believe is probably not the case, but if so, I guess I should modify the source code of the node). The navsat_serial_driver works and here is a typical sensor_msgs/NavSatFix that I get when echoing the /fix topic:

  seq: 6
    secs: 1629125221
    nsecs: 984599828
  frame_id: "gps"
  status: 0
  service: 1
latitude: 60.18832833333333
longitude: 24.********
altitude: 56.7
position_covariance: [13.249600000000001, 0.0, 0.0, 0.0, 13.249600000000001, 0.0, 0.0, 0.0, 211.99360000000001]
position_covariance_type: 1

The section of the launchfile that runs the navsat_transform_node is:

<!-- Navsat transform node -->
  <node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform" respawn="true" >

    <param name="frequency" value="30"/>

    <param name="delay" value="3"/>

    <param name="magnetic_declination_radians" value="0,1689479"/>

    <param name="yaw_offset" value="1.5707963"/>

    <param name="zero_altitude" value="true"/>

    <param name="broadcast_utm_transform" value="true"/>

    <param name="publish_filtered_gps" value="true"/>

    <param name="use_odometry_yaw" value="true"/>

    <param name="wait_for_datum" value="true"/>

    <remap from="/odometry/filtered" to="/odometry/filtered_map" />
    <remap from="/gps/fix" to ="/fix" />

I'm running ROS Noetic in a Ubuntu 20.04 docker container, that runs on Jetson TX2 (arm architecture). t's my first question in the forum so I hope I added all the relevant information to help me out, if not let me know and I I will integrate. Thank you!

edit retag flag offensive close merge delete



You have set wait for datum parameter to true but you don’t provide a datum, can you set that to false or provide a datum and try

Fetullah Atas gravatar image Fetullah Atas  ( 2021-08-16 11:14:43 -0500 )edit

Thank you very much for your hint :) I am launching the localization launch file from another launch file I use to run all the nodes my robot uses, this is the idea:


    <node pkg="imu" type="imu_driver" name="imu_driver"/>
    <!-- ...... bunch of other nodes (sensors drivers) ........ -->

    <include file="$(find outdoor_localization)/launch/localization.launch" />

    <rosparam param="datum">[61.188, 24.77777, 0.0, map, base_link]</rosparam>


Your answer suggests that I am passing the datum parameter the wrong way, which is highly probable since reading through rosparam documentation I understand that I am supposed to load the parameter (not clear how to do it straight away from launch file though). I am not using any YAML file because I don't have many parameters and would not like to use a YAML for this single parameter, any tip is more than welcome!

GiacomoDario gravatar image GiacomoDario  ( 2021-08-16 13:56:56 -0500 )edit

Thank you for your reply! Not using wait_for_datum was my duct tape solution but it was enough for my project!

GiacomoDario gravatar image GiacomoDario  ( 2021-09-29 07:49:09 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2021-09-27 11:24:32 -0500

Tom Moore gravatar image

updated 2021-09-27 11:24:54 -0500

This is unrelated to your issue, but your magnetic_declination_radians has a comma instead of a decimal point:

<param name="magnetic_declination_radians" value="0,1689479"/>

What happens if you don't use wait_for_datum?

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2021-08-16 10:12:51 -0500

Seen: 440 times

Last updated: Aug 17 '21