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:
header:
seq: 6
stamp:
secs: 1629125221
nsecs: 984599828
frame_id: "gps"
status:
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" />
</node>
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!
Originally posted by GiacomoDario on ROS Answers with karma: 1 on 2021-08-16
Post score: 0
Original comments
Comment by Fetullah Atas on 2021-08-16:
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
Comment by GiacomoDario on 2021-08-16:
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:
<launch>
<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>
</launch>
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!
Comment by GiacomoDario on 2021-09-29:
Thank you for your reply! Not using wait_for_datum
was my duct tape solution but it was enough for my project!