diff --git a/Docs/python_api.md b/Docs/python_api.md index 5d16a799f..c196aca09 100644 --- a/Docs/python_api.md +++ b/Docs/python_api.md @@ -1367,36 +1367,6 @@ Returns a waypoint if all the parameters passed are correct. Otherwise, returns --- -## carla.OSM2ODR -Class that performs the conversion of Open Street Maps data to OpenDRIVE. - -

Methods

-- **convert_to_odr**(**osm_file**, **settings**) -Converts a Open Street Maps file to OpenDRIVE format using the settings provided by the second argument. - - **Parameters:** - - `osm_file` (_str_) – The input Open Street Maps xml data. - - `settings` (_[carla.OSM2ODRSettings](#carla.OSM2ODRSettings)_) – The settings used for the conversion. - - **Return:** _str_ - ---- - -## carla.OSM2ODRSettings -Class containing settings to perform the conversion of Open Street Map data to OpenDRIVE. - -

Instance Variables

-- **use_offsets** (_bool_) -Enables the use of offset to position the map. -- **offset_x** (_float_) -Offset in the x axis. -- **offset_y** (_float_) -Offset in the y axis. -- **default_lane_width** (_float_) -Defines the default width of lanes. -- **elevation_layer_height** (_float_) -Defines the height of the different layers defined in Open Street Map data (see https://wiki.openstreetmap.org/wiki/Key:layer). - ---- - ## carla.ObstacleDetectionEvent
Inherited from _[carla.SensorData](#carla.SensorData)_

Class that defines the obstacle data for sensor.other.obstacle. Learn more about this [here](ref_sensors.md#obstacle-detector). @@ -1436,6 +1406,23 @@ If __True__, Pedestrian navigation will be enabled using Recast tool. For very l --- +## carla.Osm2OdrSettings +Class containing settings to perform the conversion of Open Street Map data to OpenDRIVE. + +

Instance Variables

+- **use_offsets** (_bool_) +Enables the use of offset to position the map. +- **offset_x** (_float_) +Offset in the x axis. +- **offset_y** (_float_) +Offset in the y axis. +- **default_lane_width** (_float_) +Defines the default width of lanes. +- **elevation_layer_height** (_float_) +Defines the height of the different layers defined in Open Street Map data (see https://wiki.openstreetmap.org/wiki/Key:layer). + +--- + ## carla.RadarDetection Data contained inside a [carla.RadarMeasurement](#carla.RadarMeasurement). Each of these represents one of the points in the cloud that a sensor.other.radar registers and contains the distance, angle and velocity in relation to the radar. @@ -2790,6 +2777,19 @@ Returns True if both **timestamp** are diffe --- +## carla.osm2odr +Class that performs the conversion of Open Street Maps data to OpenDRIVE. + +

Methods

+- **convert**(**osm_file**, **settings**) +Converts a Open Street Maps file to OpenDRIVE format using the settings provided by the second argument. + - **Parameters:** + - `osm_file` (_str_) – The input Open Street Maps xml data. + - `settings` (_[carla.OSM2ODRSettings](#carla.OSM2ODRSettings)_) – The settings used for the conversion. + - **Return:** _str_ + +--- + ## command.ApplyAngularImpulse Command adaptation of **add_angular_impulse()** in [carla.Actor](#carla.Actor). Adds angular impulse to an actor. diff --git a/PythonAPI/carla/source/libcarla/OSM2ODR.cpp b/PythonAPI/carla/source/libcarla/OSM2ODR.cpp index ef05b77b1..8757264a1 100644 --- a/PythonAPI/carla/source/libcarla/OSM2ODR.cpp +++ b/PythonAPI/carla/source/libcarla/OSM2ODR.cpp @@ -23,7 +23,7 @@ void export_osm2odr() { using namespace osm2odr; using namespace boost::python; - class_("Osm2odrSettings", init<>()) + class_("Osm2OdrSettings", init<>()) .add_property("use_offsets", &OSM2ODRSettings::use_offsets, &OSM2ODRSettings::use_offsets) .add_property("offset_x", &OSM2ODRSettings::offset_x, &OSM2ODRSettings::offset_x) .add_property("offset_y", &OSM2ODRSettings::offset_y, &OSM2ODRSettings::offset_y) @@ -33,7 +33,7 @@ void export_osm2odr() { ; class_("osm2odr", no_init) - .def("convert", &ConvertOSMToOpenDRIVE, (arg("osm_file"), arg("osm2odr_settings") = OSM2ODRSettings())) + .def("convert", &ConvertOSMToOpenDRIVE, (arg("osm_file"), arg("settings") = OSM2ODRSettings())) .staticmethod("convert") ; } diff --git a/PythonAPI/docs/osm2odr.yml b/PythonAPI/docs/osm2odr.yml index 7987b83bd..fcf581c8b 100644 --- a/PythonAPI/docs/osm2odr.yml +++ b/PythonAPI/docs/osm2odr.yml @@ -3,13 +3,13 @@ # - CLASSES ------------------------------ classes: - - class_name: OSM2ODR + - class_name: osm2odr # - DESCRIPTION ------------------------ doc: > Class that performs the conversion of Open Street Maps data to OpenDRIVE. # - METHODS ---------------------------- methods: - - def_name: convert_to_odr + - def_name: convert static: True return: str @@ -27,7 +27,7 @@ doc: > Converts a Open Street Maps file to OpenDRIVE format using the settings provided by the second argument. # -------------------------------------- - - class_name: OSM2ODRSettings + - class_name: Osm2OdrSettings # - DESCRIPTION ------------------------ doc: > Class containing settings to perform the conversion of Open Street Map data to OpenDRIVE.