Carla使用OpenStretMap自动生成地图与制作用于插件的全新存储库
OpenStreetMap integration
Warning! This feature is still in experimental phase.
OpenStreetMap is an open license map of the world developed by contributors. Sections of these map can be exported to an XML file in .osm
format. CARLA can convert this file to OpenDRIVE format, and ingest it as any other OpenDRIVE map using the OpenDRIVE Standalone Mode. The process is detailed in the documentation, but here is a summary.
1. Obtain a map with OpenStreetMap — Go to OpenStreetMap, and export the XML file containing the map information.
2. Convert to OpenDRIVE format — To do the conversion from .osm
to .xodr
format, two classes have been added to the Python API.
- carla.Osm2Odr – The class that does the conversion. It takes the content of the
.osm
parsed as string, and returns a string containing the resulting.xodr
.osm_file
— The content of the initial.osm
file parsed as string.settings
— A carla.Osm2OdrSettings object containing the settings for the conversion.
- carla.Osm2OdrSettings – Helper class that contains different parameters used during the conversion.
use_offsets
(default False) — Determines whereas the map should be generated with an offset, thus moving the origin from the center according to that offset.offset_x
(default 0.0) — Offset in the X axis.offset_y
(default 0.0) — Offset in the Y axis.default_lane_width
(default 4.0) — Determines the width that lanes should have in the resulting XODR file.elevation_layer_height
(default 0.0) — Determines the height separating elements in different layers, used for overlapping elements. Read more on layers for a better understanding of this.
3. Import into CARLA – The OpenDRIVE file can be automatically ingested in CARLA using the OpenDRIVE Standalone Mode. Use either a customized script or the config.py
example provided in CARLA.
Here is an example of the feature at work. The image on the left belongs to the OpenStreetMap page. The image on the right is a fragment of that map area ingested in CARLA.
Warning! The roads generated end abruptly in the borders of the map. This will cause the TM to crash when vehicles are not able to find the next waypoint. To avoid this, the OSM mode is set to True by default. This will show a warning, and destroy vehicles when necessary.
相关文章
- 开源应用中心 | KodExplorer高效流畅云端存储&协同办公新体验
- 实现Oracle定时自动执行存储过程(oracle定时存储过程)
- JAVA分包下项目部分代码存储详解编程语言
- Oracle列自动增长:优化存储运行效率(oracle列自动增长)
- PHP 操作 Redis:实现强大的数据存储 (php操作redis)
- MySQL存储过程返回表:实现高效数据处理(mysql存储过程返回表)
- MySQL的存储引擎:强大的数据库功能(mysql的存储引擎)
- MySQL浮点类型数据存储与使用方法(c mysql浮点类型)
- 支付数据存储在Redis中(支付写在redis)
- 妙用Oracle主分区子分区分解存储难题(oracle主分区子分区)
- 抉择存储数据的最佳选择 ES 还是 Redis(存es还是redis)
- 商品图片高效存储利用Redis(商品图片放redis)
- 使用SQLMail收发和自动处理邮件中的扩展存储过程简介
- ThinkPHP自动转义存储富文本编辑器内容导致读取出错的解决方法