TixiaoShan/LIO-SAM

GPS data format matching

QCL-Virgo opened this issue · 2 comments

An error message appears when I run bag:
[ERROR] [1701932176.859127476]: Client [/lio_sam_mapOptmization] wants topic /gps/fix to have datatype/md5sum [nav_msgs/Odometry/cd5e73d190d741a2f92e81eda573aca7], but our version has [sensor_msgs/NavSatFix/2d3a8cd499b9b4a0249fb98fd05cfa48]. Dropping connection.

The error shows that the GPS data to be accepted does not match the GPS data type in the bag. How should I solve this problem?

in ros, a topic has a publisher and subscriber. In this topic exist one type of msg who is the same for pub and sub. So in your problem, the msg in your topic is "nav_msgs/Odometry" and the sub of that (the slam who is the sub) read and understand only "nav_msgs/Odometry". But you send like msg "sensor_msgs/NavSatFix/" who is a msg for GPS. The solution for that is maybe to change the topic (because you send GPS point in a topic for Odometrie). In the ReadMe for this slam it said "To enable the GPS function, change "gpsTopic" in "params.yaml" to "odometry/gps"." you test it ? If this solution don't work, you can create a node for read the "sensor_msgs/NavSatFix/" and translation it on "nav_msgs/Odometry".