ZJU-Robotics-Lab / GEM

GEM: Online Globally consistent dense elevation mapping for unstructured terrain.
219 stars 32 forks source link

the question about costmap !! #12

Closed roslidog closed 2 years ago

roslidog commented 2 years ago

i run the code about create_globalmap.launch file and the read the code .but i have two questions about it . 1.elevationMap_layer.cpp bool is_obstacle = (data(gindex(0), gindex(1)) <0.7); the value in the data is elevation ? what is the value and index the correspondence relationship ? and index[0],index[1] corresponding what ?

  1. why the data is <0.7 ? the high value of elevation should obstacles?
MaverickPeter commented 2 years ago

Hi @xiaowei520-lwl

  1. the data here is defined before "data = elevationmap["traver"]", the data stores the traversability value of a gridmap. The index here is related to the gridmap index, you can refer to the repo https://github.com/ANYbotics/grid_map.
  2. the 0.7 is a traversability threshold, I move it to the parameter yaml file in the newest version.
roslidog commented 2 years ago

the 2 question is that i want to know about why is < the threshold.it should be > the threshold? because, i think the high value of elevation the low traversability ? Am i understanding correctly?Thank you very much!

MaverickPeter commented 2 years ago

@xiaowei520-lwl The data here represents traversability calculated by elevation but not the original elevation, so the threshold is the original threshold. One can easily get different attributes by this operation, "data = elevationmap["xxx"]", here we get traver means the traversability, you can change it to "data = elevationmap["elevation"]" or "data = elevationmap["slope"]" to get other information in the gridmap.