carla icon indicating copy to clipboard operation
carla copied to clipboard

Grid map

Open johnren-code opened this issue 1 year ago • 3 comments

How to get the grid map of carla map?

johnren-code avatar Sep 23 '24 04:09 johnren-code

Hi, if you want the Road data of a Map, you can get it with

client = carla.Client("127.0.0.1",  2000) 
world = client.get_world()
map = world.get_map()
opendrive_string = map.to_opendrive()

If you want something else, I would need more information of the kind of Grid you want.

PatrickPromitzer avatar Sep 26 '24 13:09 PatrickPromitzer

It is the raster map used for path planning that contains the map possessed or not possessed

johnren-code avatar Sep 26 '24 14:09 johnren-code

I didn't find something fitting, but with the Semantic LIDAR sensor you should be able to crate one yourself. https://carla.readthedocs.io/en/latest/ref_sensors/#semantic-lidar-sensor

Set the Semantic Lidar to different places of the map, and use the "tag" to find roads, ground, buildings, ....

raw_data (bytes) 	

- Array containing the point cloud with instance and semantic information. 
  For each point, four 32-bits floats are stored. XYZ coordinates.
- cosine of the incident angle.
- Unsigned int containing the index of the object hit.
- Unsigned int containing the semantic tag of the object it.

PatrickPromitzer avatar Sep 26 '24 15:09 PatrickPromitzer

Are we okay to close this?

Blyron avatar Apr 01 '25 14:04 Blyron