diff --git a/Docs/python_api.md b/Docs/python_api.md
index 72d20ce79..32f4ebf1d 100644
--- a/Docs/python_api.md
+++ b/Docs/python_api.md
@@ -1634,9 +1634,9 @@ Width of the lanes described in the resulting XODR map. Default value is __4.0__
- **elevation_layer_height** (_float – meters_)
Defines the height separating two different [OpenStreetMap layers](https://wiki.openstreetmap.org/wiki/Key:layer). Default value is __0.0__.
- **proj_string** (_str_)
-Defines the proj4 string (https://github.com/OSGeo/proj.4) that will be used to compute the projection from geocoordinates to cartesian coordinates. This string will be written in the resulting OpenDRIVE unless the options `use_offsets` or `center_map` are enabled as these options override some of the definitions in the string.
+Defines the [proj4](https://github.com/OSGeo/proj.4) string that will be used to compute the projection from geocoordinates to cartesian coordinates. This string will be written in the resulting OpenDRIVE unless the options `use_offsets` or `center_map` are enabled as these options override some of the definitions in the string.
- **generate_traffic_lights** (_bool_)
-Indicates wether to generate traffic light data in the OpenDRIVE. road types defined by `set_traffic_light_excluded_way_types(way_types)` will not generate traffic lights.
+Indicates wether to generate traffic light data in the OpenDRIVE. Road types defined by `set_traffic_light_excluded_way_types(way_types)` will not generate traffic lights.
- **all_junctions_with_traffic_lights** (_bool_)
When disabled, the converter will generate traffic light data from the OpenStreetMaps data only. When enabled, all junctions will generate traffic lights.
@@ -1644,7 +1644,7 @@ When disabled, the converter will generate traffic light data from the OpenStree
##### Setters
- **set_osm_way_types**(**self**, **way_types**)
-Defines the OpenStreetMaps road types that will be imported to OpenDRIVE. By default the road types imported are `motorway, motorway_link, trunk, trunk_link, primary, primary_link, secondary, secondary_link, tertiary, tertiary_link, unclassified, residential`. For a full list of road types check https://wiki.openstreetmap.org/wiki/Main_Page .
+Defines the OpenStreetMaps road types that will be imported to OpenDRIVE. By default the road types imported are `motorway, motorway_link, trunk, trunk_link, primary, primary_link, secondary, secondary_link, tertiary, tertiary_link, unclassified, residential`. For a full list of road types check [here](https://wiki.openstreetmap.org/wiki/Main_Page).
- **Parameters:**
- `way_types` (_list(str)_) – The list of road types.
- **set_traffic_light_excluded_way_types**(**self**, **way_types**)
@@ -3515,34 +3515,6 @@ document.getElementById("snipets-container").innerHTML = null;
}
-
-
-Snippet for carla.World.load_map_layer
-
-
-
-```py
-
-# This recipe toggles on several layers in our "_Opt" maps
-
-# Load town one with only minimum layout (roads, sidewalks, traffic lights and traffic signs)
-world = client.load_world('Town01_Opt', carla.MapLayer.None)
-
-# Toggle all buildings on
-world.load_map_layer(carla.MapLayer.Buildings)
-
-# Toggle all foliage on
-world.load_map_layer(carla.MapLayer.Foliage)
-
-# Toggle all parked vehicles on
-world.load_map_layer(carla.MapLayer.ParkedVehicles)
-
-
-```
-
-
-
-
Snippet for carla.ActorBlueprint.set_attribute
@@ -3650,27 +3622,79 @@ for i in range(0, len(all_actors), 2):
-
+
-Snippet for carla.WalkerAIController.stop
+Snippet for carla.Client.__init__
-
+
```py
-#To destroy the pedestrians, stop them from the navigation, and then destroy the objects (actor and controller).
+# This recipe shows in every script provided in PythonAPI/Examples
+# and it is used to parse the client creation arguments when running the script.
-# stop pedestrians (list is [controller, actor, controller, actor ...])
-for i in range(0, len(all_id), 2):
- all_actors[i].stop()
+ argparser = argparse.ArgumentParser(
+ description=__doc__)
+ argparser.add_argument(
+ '--host',
+ metavar='H',
+ default='127.0.0.1',
+ help='IP of the host server (default: 127.0.0.1)')
+ argparser.add_argument(
+ '-p', '--port',
+ metavar='P',
+ default=2000,
+ type=int,
+ help='TCP port to listen to (default: 2000)')
+ argparser.add_argument(
+ '-s', '--speed',
+ metavar='FACTOR',
+ default=1.0,
+ type=float,
+ help='rate at which the weather changes (default: 1.0)')
+ args = argparser.parse_args()
+
+ speed_factor = args.speed
+ update_freq = 0.1 / speed_factor
+
+ client = carla.Client(args.host, args.port)
-# destroy pedestrian (actor and controller)
-client.apply_batch([carla.command.DestroyActor(x) for x in all_id])
```
-
+
+
+
+
+
+
+Snippet for carla.DebugHelper.draw_box
+
+
+
+```py
+
+
+# This recipe shows how to draw traffic light actor bounding boxes from a world snapshot.
+
+# ....
+debug = world.debug
+world_snapshot = world.get_snapshot()
+
+for actor_snapshot in world_snapshot:
+ actual_actor = world.get_actor(actor_snapshot.id)
+ if actual_actor.type_id == 'traffic.traffic_light':
+ debug.draw_box(carla.BoundingBox(actor_snapshot.get_transform().location,carla.Vector3D(0.5,0.5,2)),actor_snapshot.get_transform().rotation, 0.05, carla.Color(255,0,0,0),0)
+# ...
+
+
+
+```
+
+
+```py
+
+
+# This recipe applies a color conversion to the image taken by a camera sensor,
+# so it is converted to a semantic segmentation image.
+
+# ...
+camera_bp = world.get_blueprint_library().filter('sensor.camera.semantic_segmentation')
+# ...
+cc = carla.ColorConverter.CityScapesPalette
+camera.listen(lambda image: image.save_to_disk('output/%06d.png' % image.frame, cc))
+# ...
+
+
+```
+
+
+
+
Snippet for carla.TrafficLight.set_state
@@ -3792,108 +3841,6 @@ if vehicle_actor.is_at_traffic_light():
-
-
-Snippet for carla.World.unload_map_layer
-
-
-
-```py
-
-# This recipe toggles off several layers in our "_Opt" maps
-
-# Load town one with minimum layout (roads, sidewalks, traffic lights and traffic signs)
-# as well as buildings and parked vehicles
-world = client.load_world('Town01_Opt', carla.MapLayer.Buildings | carla.MapLayer.ParkedVehicles)
-
-# Toggle all buildings off
-world.unload_map_layer(carla.MapLayer.Buildings)
-
-# Toggle all parked vehicles off
-world.unload_map_layer(carla.MapLayer.ParkedVehicles)
-
-
-```
-
-
-
-
-
-
-Snippet for carla.DebugHelper.draw_box
-
-
-
-```py
-
-
-# This recipe shows how to draw traffic light actor bounding boxes from a world snapshot.
-
-# ....
-debug = world.debug
-world_snapshot = world.get_snapshot()
-
-for actor_snapshot in world_snapshot:
- actual_actor = world.get_actor(actor_snapshot.id)
- if actual_actor.type_id == 'traffic.traffic_light':
- debug.draw_box(carla.BoundingBox(actor_snapshot.get_transform().location,carla.Vector3D(0.5,0.5,2)),actor_snapshot.get_transform().rotation, 0.05, carla.Color(255,0,0,0),0)
-# ...
-
-
-
-```
-
-
-
-
-
-
-
-
-
-Snippet for carla.Client.__init__
-
-
-
-```py
-
-
-# This recipe shows in every script provided in PythonAPI/Examples
-# and it is used to parse the client creation arguments when running the script.
-
- argparser = argparse.ArgumentParser(
- description=__doc__)
- argparser.add_argument(
- '--host',
- metavar='H',
- default='127.0.0.1',
- help='IP of the host server (default: 127.0.0.1)')
- argparser.add_argument(
- '-p', '--port',
- metavar='P',
- default=2000,
- type=int,
- help='TCP port to listen to (default: 2000)')
- argparser.add_argument(
- '-s', '--speed',
- metavar='FACTOR',
- default=1.0,
- type=float,
- help='rate at which the weather changes (default: 1.0)')
- args = argparser.parse_args()
-
- speed_factor = args.speed
- update_freq = 0.1 / speed_factor
-
- client = carla.Client(args.host, args.port)
-
-
-
-```
-
-
-
-
Snippet for carla.Vehicle.set_wheel_steer_direction
@@ -3913,28 +3860,27 @@ vehicle.set_wheel_steer_direction(carla.VehicleWheelLocation.FL_Wheel, 40.0)
-
+
-Snippet for carla.Sensor.listen
+Snippet for carla.WalkerAIController.stop
-
+
```py
-# This recipe applies a color conversion to the image taken by a camera sensor,
-# so it is converted to a semantic segmentation image.
+#To destroy the pedestrians, stop them from the navigation, and then destroy the objects (actor and controller).
-# ...
-camera_bp = world.get_blueprint_library().filter('sensor.camera.semantic_segmentation')
-# ...
-cc = carla.ColorConverter.CityScapesPalette
-camera.listen(lambda image: image.save_to_disk('output/%06d.png' % image.frame, cc))
-# ...
+# stop pedestrians (list is [controller, actor, controller, actor ...])
+for i in range(0, len(all_id), 2):
+ all_actors[i].stop()
+
+# destroy pedestrian (actor and controller)
+client.apply_batch([carla.command.DestroyActor(x) for x in all_id])
```
-
-
-```py
-
-
-# This recipe attaches different camera / sensors to a vehicle with different attachments.
-
-# ...
-camera = world.spawn_actor(rgb_camera_bp, transform, attach_to=vehicle, attachment_type=Attachment.Rigid)
-# Default attachment: Attachment.Rigid
-gnss_sensor = world.spawn_actor(sensor_gnss_bp, transform, attach_to=vehicle)
-collision_sensor = world.spawn_actor(sensor_collision_bp, transform, attach_to=vehicle)
-lane_invasion_sensor = world.spawn_actor(sensor_lane_invasion_bp, transform, attach_to=vehicle)
-# ...
-
-
-```
-
-
-
-
Snippet for carla.World.get_spectator
@@ -4028,6 +3949,85 @@ spectator.set_transform(actor_snapshot.get_transform())
+
+
+Snippet for carla.World.load_map_layer
+
+
+
+```py
+
+# This recipe toggles on several layers in our "_Opt" maps
+
+# Load town one with only minimum layout (roads, sidewalks, traffic lights and traffic signs)
+world = client.load_world('Town01_Opt', carla.MapLayer.None)
+
+# Toggle all buildings on
+world.load_map_layer(carla.MapLayer.Buildings)
+
+# Toggle all foliage on
+world.load_map_layer(carla.MapLayer.Foliage)
+
+# Toggle all parked vehicles on
+world.load_map_layer(carla.MapLayer.ParkedVehicles)
+
+
+```
+
+
+
+
+
+
+Snippet for carla.World.spawn_actor
+
+
+
+```py
+
+
+# This recipe attaches different camera / sensors to a vehicle with different attachments.
+
+# ...
+camera = world.spawn_actor(rgb_camera_bp, transform, attach_to=vehicle, attachment_type=Attachment.Rigid)
+# Default attachment: Attachment.Rigid
+gnss_sensor = world.spawn_actor(sensor_gnss_bp, transform, attach_to=vehicle)
+collision_sensor = world.spawn_actor(sensor_collision_bp, transform, attach_to=vehicle)
+lane_invasion_sensor = world.spawn_actor(sensor_lane_invasion_bp, transform, attach_to=vehicle)
+# ...
+
+
+```
+
+
+
+
+
+
+Snippet for carla.World.unload_map_layer
+
+
+
+```py
+
+# This recipe toggles off several layers in our "_Opt" maps
+
+# Load town one with minimum layout (roads, sidewalks, traffic lights and traffic signs)
+# as well as buildings and parked vehicles
+world = client.load_world('Town01_Opt', carla.MapLayer.Buildings | carla.MapLayer.ParkedVehicles)
+
+# Toggle all buildings off
+world.unload_map_layer(carla.MapLayer.Buildings)
+
+# Toggle all parked vehicles off
+world.unload_map_layer(carla.MapLayer.ParkedVehicles)
+
+
+```
+
+
+
+
diff --git a/PythonAPI/docs/osm2odr.yml b/PythonAPI/docs/osm2odr.yml
index 65f2eaceb..432f1f963 100644
--- a/PythonAPI/docs/osm2odr.yml
+++ b/PythonAPI/docs/osm2odr.yml
@@ -61,11 +61,11 @@
- var_name: proj_string
type: str
doc: >
- Defines the proj4 string (https://github.com/OSGeo/proj.4) that will be used to compute the projection from geocoordinates to cartesian coordinates. This string will be written in the resulting OpenDRIVE unless the options `use_offsets` or `center_map` are enabled as these options override some of the definitions in the string.
+ Defines the [proj4](https://github.com/OSGeo/proj.4) string that will be used to compute the projection from geocoordinates to cartesian coordinates. This string will be written in the resulting OpenDRIVE unless the options `use_offsets` or `center_map` are enabled as these options override some of the definitions in the string.
- var_name: generate_traffic_lights
type: bool
doc: >
- Indicates wether to generate traffic light data in the OpenDRIVE. road types defined by `set_traffic_light_excluded_way_types(way_types)` will not generate traffic lights.
+ Indicates wether to generate traffic light data in the OpenDRIVE. Road types defined by `set_traffic_light_excluded_way_types(way_types)` will not generate traffic lights.
- var_name: all_junctions_with_traffic_lights
type: bool
doc: >
@@ -73,7 +73,7 @@
methods:
- def_name: set_osm_way_types
doc: >
- Defines the OpenStreetMaps road types that will be imported to OpenDRIVE. By default the road types imported are `motorway, motorway_link, trunk, trunk_link, primary, primary_link, secondary, secondary_link, tertiary, tertiary_link, unclassified, residential`. For a full list of road types check https://wiki.openstreetmap.org/wiki/Main_Page .
+ Defines the OpenStreetMaps road types that will be imported to OpenDRIVE. By default the road types imported are `motorway, motorway_link, trunk, trunk_link, primary, primary_link, secondary, secondary_link, tertiary, tertiary_link, unclassified, residential`. For a full list of road types check [here](https://wiki.openstreetmap.org/wiki/Main_Page).
params:
- param_name: way_types
type: list(str)