tu-darmstadt-ros-pkg / hector_slam

hector_slam contains ROS packages related to performing SLAM in unstructed environments like those encountered in the Urban Search and Rescue (USAR) scenarios of the RoboCup Rescue competition.
http://wiki.ros.org/hector_slam
646 stars 453 forks source link

rostopic echo /map get all field.data equal to -1 #78

Closed robbiedood closed 4 years ago

robbiedood commented 4 years ago

Dear tu-darmstadt-ros-pkg,

Thanks for your hector_slam work, I've successfully ran and visualized /map, /trajetory, /slam_out_pose via RViz. It looks very nice.

Now I'd like to 'see' numerical data of these topics and check if it makes numerical sense, so I did rostopic echo /map, and printed it out to a .bag and .csv file.

However, it shows all "-1" in field.data# (# is fom 0 to 1008). I think field.data(s) is int8[] data, gives probabilities in the range [0,100], and Unknown is set to -1. Then all "-1" contradicts to the visualization of OccupancyGrid in RViz.

Maybe I miss something, hope to hear your expertise on the data structure and definition.

Thank you.

Martin-Oehler commented 4 years ago

The message documentation can be found here.

robbiedood commented 4 years ago

Problem solved~!

The map size is default to set 2048, but my occupancy area is too small (~1%) when compared to the map area. So it is almost invisible by eyes. (but I don't know why echo > csv doesn't print entire array out)

After playing the map size to a smaller value, I could see data within [0, 100] range.