Fdomf/docs (#2049)

* Updated CARLA video link (README)

* Updated API reference - deleted overview

* Added css to docs

* Added documentation standard section

* Updated API docs

* Updated documentation following the standard

* Updated How to create map and import docs + documentation related standard + improvements

* Word change

* Updated importing assests from RR

* Fixes and new section for pedestrian navigation

* Changed image position

* Updated
This commit is contained in:
Francesc Domene 2019-09-06 11:07:21 +02:00 committed by manishthani
parent 4c1c34fd1f
commit 7e7f989606
59 changed files with 1001 additions and 972 deletions

View File

@ -5,10 +5,10 @@ We are more than happy to accept contributions!
How can I contribute?
* Reporting bugs
* Feature requests
* Improving documentation
* Code contributions
* Reporting bugs
* Feature requests
* Improving documentation
* Code contributions
Reporting bugs
--------------
@ -41,13 +41,20 @@ We build our documentation with [MkDocs](http://www.mkdocs.org/) based on the
Markdown files inside the `Docs` folder. You can either directly modify them on
GitHub or locally in your machine.
To update Python API docs, instead of directly modifying the Markdown you need to edit the corresponding YAML files inside `PythonAPI/docs` and run `doc_gen.py` (Python 2) subsequently. This will re-generate the respective Markdown files inside `Docs/`, which can then be fed into `mkdocs`.
To update Python API docs, instead of directly modifying the Markdown you need to edit the
corresponding YAML files inside [`carla/PythonAPI/docs/`][fileslink] and run [`doc_gen.py`][scriptlink]
or `make PythonAPI.docs`.
This will re-generate the respective Markdown files inside `carla/Docs/`,
which can then be fed into `mkdocs`.
[fileslink]: https://github.com/carla-simulator/carla/tree/master/PythonAPI/docs
[scriptlink]: https://github.com/carla-simulator/carla/blob/master/PythonAPI/docs/doc_gen.py
Once you are done with your changes, please submit a pull-request.
!!! tip
You can build and serve it locally by running `mkdocs` in the project's
main folder
You can build and serve it locally (at <http://127.0.0.1:8000>) by running `mkdocs`
in the project's main folder.
```sh
> sudo pip install mkdocs
@ -57,7 +64,7 @@ Once you are done with your changes, please submit a pull-request.
Code contributions
------------------
So you are considering making a code contribution, great! we love to have
So you are considering making a code contribution, great! We love to have
contributions from the community.
Before starting hands-on on coding, please check out our

View File

@ -2,12 +2,17 @@
*Please note that we will use the term *assets* for referring to **props** and also **maps**.*
The main objective for importing and exporting assets is to reduce the size of the distribution build. This is possible since these assets will be imported as independent packages that can be plugged in anytime inside Carla and also exported.
The main objective for importing and exporting assets is to reduce the size of
the distribution build. This is possible since these assets will be imported as
independent packages that can be plugged in anytime inside Carla and also exported.
How to import assets inside Unreal Engine
-----------------------------------------
The first step is to create an empty folder inside the Carla `Import` folder and rename it with any folder name desired. For simplifying this newly created folder structure, we recommend having as many subfolders as maps to import and one single subfolder containing all the props to import. Inside each subfolder, we will place all the files needed for importing.
The first step is to create an empty folder inside the Carla `Import` folder and rename it with any
folder name desired. For simplifying this newly created folder structure, we recommend having
as many subfolders as maps to import and one single subfolder containing all the props to import.
Inside each subfolder, we will place all the files needed for importing.<br>
So basically, for a **map** subfolder, we will need to place the following files:
* The map itself in `.FBX` format.
@ -19,7 +24,10 @@ And for the **props** folder, we will need the following files:
* The prop itself in `.FBX` format.
* Optionally, the textures required by the prop.
Additionally, we have to create a **JSON file inside the package** that will contain information about its assets. The file extension must be `.json`. We recommend the JSON file to have the same name as the package name in order to keep it organized. **Please, keep in mind that the name of this file will used as the name of the distribution package**.
Additionally, we have to create a **JSON file inside the package** that will contain information
about its assets. The file extension must be `.json`. We recommend the JSON file to have the same
name as the package name in order to keep it organized.
**Please, keep in mind that the name of this file will used as the name of the distribution package**.
The content of this JSON file should be similar to the following:
@ -58,14 +66,16 @@ As you can observe in the JSON file content, we have defined a JSON array of **m
Each item inside the **maps** array has the following parameters:
* **name**: The name of the map. It is possible to import the same map mesh but with a different name and, if so, it will create separate mesh files inside Unreal for each different name.
* **name**: The name of the map. It is possible to import the same map mesh but with a different
name and, if so, it will create separate mesh files inside Unreal for each different name.
* **source**: Source path of the map inside the package folder.
* **use_carla_materials**: If true, we will use Carla materials, otherwise, we will use RoadRunner materials.
* **xodr**: Path to the `.xodr` Opendrive file for that map.
And each item inside the **props** array has the following parameters:
* **name**: The name of the prop. It is possible to import the same prop mesh but with different name and, if so, it will create separate mesh files inside Unreal for each different name.
* **name**: The name of the prop. It is possible to import the same prop mesh but with different
name and, if so, it will create separate mesh files inside Unreal for each different name.
* **source**: Source path of the prop inside the package folder.
* **size**: Size of the prop, possible values are:
@ -93,8 +103,8 @@ And each item inside the **props** array has the following parameters:
Note that if the tag is not spelled correctly, it will interpret it as `None` value by default.
To sum up, the `Import` folder should have this similar structure:
```
Import
|
@ -132,7 +142,18 @@ Import
└── Package2.json
```
*Please note that the maps exported from **RoadRunner** are also supported for importing them inside Carla. So, basically, once created your **RoadRunner** map, you just need to export it, take the required files and place them following the structure listed above.*
_Maps exported from **RoadRunner** are also supported for importing them inside_
_Carla. So, basically, once created your **RoadRunner** map, you just need to export it, take the_
_required files and place them following the structure listed above._
!!! note
**RoadRunner's** imported assets will be classified for **semantic segmentation** based on
the asset's name (`RoadNode`, `Terrain`, `MarkingNode`) and moved to `Roads`, `Terrain`
and `RoadLines` respectively, under `Content/Carla/PackageName/Static`.<br>
_If the process doesn't work due to different names or other issues, you can always move the assets_
_manually, check this [`tutorial`][importtutorial]_.
[importtutorial]: /how_to_make_a_new_map/#32-importing-from-the-files
Now we have everything ready for importing assets. To do so, you just need to run the command:
@ -140,15 +161,25 @@ Now we have everything ready for importing assets. To do so, you just need to ru
make import
```
This command will read the JSON file and take each asset and place it inside the Content in Unreal Engine. Furthermore, it will create a `Package1.Package.json` file inside the package's `Config` folder that will be used for **defining** its props in the Carla blueprint library, **exposing** them in the `PythonAPI` and also for **exporting** those assets if needed. If a package was already imported before, it will overwrite it.
This command will read the JSON file and take each asset and place it inside the Content
in Unreal Engine. Furthermore, it will create a `Package1.Package.json` file inside the package's
`Config` folder that will be used for **defining** its props in the Carla blueprint library,
**exposing** them in the `PythonAPI` and also for **exporting** those assets if needed.
If a package was already imported before, it will overwrite it.
How to export assets
--------------------
Once imported all the packages inside Unreal, users could also generate a **cooked package** for each of them. This last step is important in order to have all packages ready to add for distribution versions of Carla and for any supported platform. To export the packages, simply run the command:
Once imported all the packages inside Unreal, users could also generate a **cooked package**
for each of them. This last step is important in order to have all packages ready to add for
distribution versions of Carla and for any supported platform. To export the packages,
simply run the command:
```sh
make package ARGS="--packages=Package1,Package2"
```
This command will create the distribution package compressed in a `.tar.gz` file for **each** cooked package and place it in the Carla `Dist` folder. Finally, you could import these packages in a Carla distribution by simply moving them in the Carla `Import` folder and executing the `ImportAssets.sh` script.
This command will create the distribution package compressed in a `.tar.gz` file for **each**
cooked package and place it in the Carla `Dist` folder. Finally, you could import these packages
in a Carla distribution by simply moving them in the Carla `Import` folder and executing
the `ImportAssets.sh` script.

View File

@ -483,15 +483,37 @@ Check out our [blueprint tutorial](../python_api_tutorial/#blueprints).
- `role_name` (String) Modifiable
- **<font color="#498efc">sensor.camera.rgb</font>**
- **Attributes:**
- `tint` (Float) Modifiable
- `white_clip` (Float) Modifiable
- `shoulder` (Float) Modifiable
- `toe` (Float) Modifiable
- `slope` (Float) Modifiable
- `focal_distance` (Float) Modifiable
- `calibration_constant` (Float) Modifiable
- `exposure_min_bright` (Float) Modifiable
- `motion_blur_max_distortion` (Float) Modifiable
- `motion_blur_intensity` (Float) Modifiable
- `gamma` (Float) Modifiable
- `enable_postprocess_effects` (Bool) Modifiable
- `fov` (Float) Modifiable
- `image_size_y` (Int) Modifiable
- `image_size_x` (Int) Modifiable
- `motion_blur_min_object_screen_size` (Float) Modifiable
- `enable_postprocess_effects` (Bool) Modifiable
- `blur_radius` (Float) Modifiable
- `fstop` (Float) Modifiable
- `iso` (Float) Modifiable
- `shutter_speed` (Float) Modifiable
- `exposure_speed_down` (Float) Modifiable
- `exposure_compensation` (Float) Modifiable
- `min_fstop` (Float) Modifiable
- `exposure_speed_up` (Float) Modifiable
- `exposure_mode` (String) Modifiable
- `blade_count` (Int) Modifiable
- `fov` (Float) Modifiable
- `temp` (Float) Modifiable
- `image_size_x` (Int) Modifiable
- `black_clip` (Float) Modifiable
- `blur_amount` (Float) Modifiable
- `image_size_y` (Int) Modifiable
- `sensor_tick` (Float) Modifiable
- `exposure_max_bright` (Float) Modifiable
- `role_name` (String) Modifiable
- **<font color="#498efc">sensor.camera.semantic_segmentation</font>**
- **Attributes:**

View File

@ -3,10 +3,10 @@
![Client window](img/client_window.png)
Sensors are a special type of actor able to measure and stream data. All the
sensors have a [`listen`](python_api.md#carla.Sensor.listen) method that registers the callback function that will
be called each time the sensor produces a new measurement. Sensors are typically
attached to vehicles and produce data either each simulation update, or when a
certain event is registered.
sensors have a [`listen`](python_api.md#carla.Sensor.listen) method that registers the
callback function that will be called each time the sensor produces a new measurement.
Sensors are typically attached to vehicles and produce data either each simulation update,
or when a certain event is registered.
The following Python excerpt shows how you would typically attach a sensor to a
vehicle, in this case we are adding a dashboard HD camera to a vehicle.
@ -51,7 +51,8 @@ This is the list of sensors currently available
* [sensor.other.lane_invasion](#sensorotherlane_invasion)
* [sensor.other.obstacle](#sensorotherobstacle)
Camera sensors use [`carla.colorConverter`](python_api.md#carla.ColorConverter) in order to convert the pixels of the original image.
Camera sensors use [`carla.colorConverter`](python_api.md#carla.ColorConverter) in order to
convert the pixels of the original image.
sensor.camera.rgb
-----------------
@ -70,9 +71,49 @@ The "RGB" camera acts as a regular camera capturing images from the scene.
| `gamma` | float | 2.2 | Target gamma value of the camera |
| `motion_blur_intensity` | float | 0.45 | Strength of motion blur. 1 is max and 0 is off |
| `motion_blur_max_distortion` | float | 0.35 | Max distortion caused by motion blur, in percent of the screen width, 0 is off |
| `motion_blur_min_object_screen_size` | float | 0.1 | Percentage of screen width objects must have for motion blur, lower value means less draw calls
| `motion_blur_min_object_screen_size` | float | 0.1 | Percentage of screen width objects must have for motion blur, lower value means less draw calls |
`sensor_tick` tells how fast we want the sensor to capture the data. A value of 1.5 means that we want the sensor to capture data each second and a half. By default a value of 0.0 means as fast as possible.
Other handy attributes:
| Blueprint attribute | Type | Default | Description |
| ------------------- | ---- | ------- | ----------- |
| `shutter_speed` | float | 60.0 | The camera shutter speed in seconds |
| `iso` | float | 1200.0 | The camera sensor sensitivity |
| `fstop` | float | 1.4 | Defines the size of the opening for the camera lens. Aperture is 1.0 / fstop |
| `min_fstop` | float | 1.2 | Defines the maximum opening of the camera lens to control the curvature of the diaphragm. Set this to 0 to get straight blades |
| `blade_count` | int | 5 | Defines the number of blades of the diaphragm within the lens. Values between 4 and 16 can be used |
| `exposure_mode` | str | manual | Mode of exposure. Manual by default or histogram (under construction) |
| `exposure_compensation` | float | 3.0 | Logarithmic adjustment for the exposure |
| `exposure_min_bright` | float | 0.1 | The minimum brightness for auto exposure that limits the lower brightness the eye can adapt within |
| `exposure_max_bright` | float | 2.0 | The maximum brightness for auto exposure that limits the upper brightness the eye can adapt within |
| `exposure_speed_up` | float | 3.0 | The speed at which the adaptation occurs from a dark environment to a bright environment |
| `exposure_speed_down` | float | 1.0 | The speed at which the adaptation occurs from a bright environment to a dark environment |
| `calibration_constant` | float | 16.0 | Calibration constant for 18% Albedo |
| `focal_distance` | float | 1000.0 | The distance in which the depth of field effect should be sharp |
| `blur_amount` | float | 1.0 | Strength/intensity of motion blur |
| `blur_radius` | float | 0.0 | Radius in pixels at 1080p resolution to apply according to distance from camera to emulate atmospheric scattering |
| `slope` | float | 0.88 | This will adjust the steepness of the S-curve used for the tonemapper |
| `toe` | float | 0.55 | This will adjust the dark color in the tonemapper|
| `shoulder` | float | 0.26 | This will adjust the bright color in the tonemapper|
| `back_clip` | float | 0.0 | This will set where the crossover happens where black's start to cut off their value. In general, this value should NOT be adjusted |
| `white_clip` | float | 0.04 | This will set where the crossover happens where white's start to cut off their values |
| `temp` | float | 6500.0 | This will adjust the white balance in relation to the temperature of the light in the scene |
| `tint` | float | 0.0 | This will adjust the white balance temperature tint for the scene by adjusting the cyan and magenta color ranges |
!!! note
Using histogram exposure mode will enable the exposure's and calibration parameters.
More information about these attributes can be found in the UE4 official docs:<br>
[Automatic Exposure][autoexplink]<br>
[Cinematic DOF Methods][cinematiclink]<br>
[Color Grading][gradinglink]
[autoexplink]: https://docs.unrealengine.com/en-US/Engine/Rendering/PostProcessEffects/AutomaticExposure/index.html
[cinematiclink]: https://docs.unrealengine.com/en-US/Engine/Rendering/PostProcessEffects/DepthOfField/CinematicDOFMethods/index.html
[gradinglink]: https://docs.unrealengine.com/en-US/Engine/Rendering/PostProcessEffects/ColorGrading/index.html
The `sensor_tick` tells how fast we want the sensor to capture the data.
A value of 1.5 means that we want the sensor to capture data each second and a half.
By default a value of 0.0 means as fast as possible.
If `enable_postprocess_effects` is enabled, a set of post-process effects is
applied to the image to create a more realistic feel
@ -259,7 +300,8 @@ actor collisions against something in the world. This sensor does not have any
configurable attribute.
!!! note
This sensor creates "fake" actors when it collides with something that is not an actor, this is so we can retrieve the semantic tags of the object we hit.
This sensor creates "fake" actors when it collides with something that is not an actor,
this is so we can retrieve the semantic tags of the object we hit.
This sensor produces a
[`carla.CollisionEvent`](python_api.md#carla.CollisionEvent)
@ -331,7 +373,8 @@ sensor.other.obstacle
This sensor, when attached to an actor, reports if there is obstacles ahead.
!!! note
This sensor creates "fake" actors when it detects obstacles with something that is not an actor, this is so we can retrieve the semantic tags of the object we hit.
This sensor creates "fake" actors when it detects obstacles with something that is not an actor,
this is so we can retrieve the semantic tags of the object we hit.
| Blueprint attribute | Type | Default | Description |
| -------------------- | ---- | ------- | ----------- |

View File

@ -1,7 +1,5 @@
<h1>Running CARLA in a Docker </h1>
This tutorial is designed for:
* People that want to run CARLA without needing to install all dependencies.
@ -20,42 +18,44 @@ This method requires a version of NVIDIA drivers >=390.
### Docker CE
For our tests we used the Docker CE version.
To install Docker CE we recommend using [this tutorial](https://docs.docker.com/install/linux/docker-ce/ubuntu/#extra-steps-for-aufs)
To install Docker CE we recommend using [this tutorial][tutoriallink]
[tutoriallink]: https://docs.docker.com/install/linux/docker-ce/ubuntu/#extra-steps-for-aufs
### NVIDIA-Docker2
To install nvidia-docker-2 we recommend using the "Quick Start"
section from the [nvidia-dockers github](https://github.com/NVIDIA/nvidia-docker).
## Getting it Running
Pull the CARLA image.
docker pull carlasim/carla:version
```sh
docker pull carlasim/carla:version
```
For selecting a version, for instance, version 0.8.2 (stable), do:
docker pull carlasim/carla:0.8.2
```sh
docker pull carlasim/carla:0.8.2
```
Running CARLA under docker:
docker run -p 2000-2002:2000-2002 --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 carlasim/carla:0.8.4
```sh
docker run -p 2000-2002:2000-2002 --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 carlasim/carla:0.8.4
```
The "-p 2000-2002:2000-2002" argument is to redirect host ports for the docker container.
Use "NVIDIA_VISIBLE_DEVICES=<gpu_number>" to select the GPU.
The `-p 2000-2002:2000-2002` argument is to redirect host ports for the docker container.
Use `NVIDIA_VISIBLE_DEVICES=<gpu_number>` to select the GPU.
You can also pass parameters to the CARLA executable. With this you can chose the town and
select the port that is going to be used:
docker run -p 2000-2002:2000-2002 --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 carlasim/carla:0.8.4 /bin/bash CarlaUE4.sh < Your list of parameters >
At the list of parameters do not forget to add "-world-port=<port_number>" so that CARLA runs on server mode
listening to the "<port_number>"
```sh
docker run -p 2000-2002:2000-2002 --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 carlasim/carla:0.8.4 /bin/bash CarlaUE4.sh < Your list of parameters >
```
At the list of parameters do not forget to add `-world-port=<port_number>` so that CARLA runs on server mode
listening to the `<port_number>`

View File

@ -49,8 +49,9 @@ Follow this tutorial and install vgl:
Follow the tutorial below to install TurboVNC 2.11:
[Installing TurboVNC](https://cdn.rawgit.com/TurboVNC/turbovnc/2.1.1/doc/index.html#hd005001)
WARNING: Take care on which VNC you install as it may not be compatible with
Unreal. The one above was the only one that worked for me.
!!! warning
Take care on which VNC you install as it may not be compatible with
Unreal. The one above was the only one that worked for me.
<h4>Extra Packages</h4>
@ -85,7 +86,7 @@ the GPU 0 on your machine. To run on other GPU, such as GPU 1 run:
DISPLAY=:8 vglrun -d :7.1 glxinfo
<h4>Extra</h4>
<h3> Extra </h3>
If you want disable the need of sudo when creating the 'nohup Xorg' go to the
'/etc/X11/Xwrapper.config' file and change 'allowed_users=console' to

View File

@ -1,9 +1,7 @@
<h1>Coding standard</h1>
> _This document is a work in progress and might be incomplete._
General
-------
=======
* Use spaces, not tabs.
* Avoid adding trailing whitespace as it creates noise in the diffs.

View File

@ -46,7 +46,9 @@ OpenGL API can be selected with the flag `-opengl`.
<h4>Quality levels</h4>
Currently, there are two levels of quality, `Low` and `Epic` _(default)_. The image below shows how the simulator has to be started with the appropiate flag in order to set a quality level and the difference between qualities.
Currently, there are two levels of quality, `Low` and `Epic` _(default)_. The image below shows
how the simulator has to be started with the appropiate flag in order to set a quality level
and the difference between qualities.
![](img/epic_quality_capture.png) | ![](img/low_quality_capture.png)
:-------------------------:|:-------------------------:
@ -187,8 +189,8 @@ Command-line options
--------------------------
!!! important
Some of the command-line options are not available in `Linux` due to the "Shipping" build. Therefore, the use of
[`config.py`][configlink] script is needed to configure the simulation.
Some of the command-line options are not available in `Linux` due to the "Shipping" build.
Therefore, the use of [`config.py`][configlink] script is needed to configure the simulation.
[configlink]: https://github.com/carla-simulator/carla/blob/master/PythonAPI/util/config.py

29
Docs/doc_standard.md Normal file
View File

@ -0,0 +1,29 @@
<h1>Documentation Standard</h1>
This document will serve as a guide and example of some rules that need to be
followed in order to contribute to the documentation.
We use a mix of markdown and HTML tags to customize the documentation along with an
[`extra.css`](https://github.com/carla-simulator/carla/tree/master/Docs/extra.css) file.
Rules
-----
* Leave always an empty line between sections and at the end of the document.
* Writting should not exceed `100` columns, except for HTML related content, markdown tables,
code snipets and referenced links.
* If an inline link exceeds the limit, use referenced `[name][reference_link]` markdown notation
`[reference_link]: https://` rather than `[name](https://)`.
* Use `<br>` to make inline jumps rather than leaving two spaces at the end of a line.
* Use `<h1>Title</h1>` at the beggining of a new page in order to make a Title or
`<hx>Heading<hx>` to make a heading that **won't show** on the navigation bar.
* Use `------` underlining a Heading or `#` hierarchy to make headings and show them in the
navigation bar.
<h3>Exceptions:</h3>
* Documentation generated via python scripts like PythonAPI reference
Handy markdown [cheatsheet][cheatlink].
[cheatlink]: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet

View File

@ -36,12 +36,12 @@
All the versions are also available to pull from DockerHub
```
```sh
docker pull carlasim/carla:X.X.X
```
use tag "latest" for the nightly build
Use tag "latest" for the nightly build
```
```sh
docker pull carlasim/carla:latest
```

View File

@ -21,7 +21,8 @@ free from the Unreal Engine Marketplace.
1. Install Epic Games Launcher from [www.unrealengine.com](https://www.unrealengine.com).
2. Buy the [Automotive Materials][automatlink] package for $0.
3. Create a new dummy project and add the Automotive Materials package to it.
4. Inside the "Content" folder of the newly created project, you can find the "AutomotiveMaterials" folder. Copy this folder to the CARLA project
4. Inside the "Content" folder of the newly created project, you can find the
"AutomotiveMaterials" folder. Copy this folder to the CARLA project
- `{NewProject}/Content/AutomotiveMaterials` --> `{CARLA}/Unreal/CarlaUE4/Content/AutomotiveMaterials`
[automatlink]: https://www.unrealengine.com/marketplace/automotive-material-pack

13
Docs/extra.css Normal file
View File

@ -0,0 +1,13 @@
.build-buttons{
text-align: center;
}
.build-buttons > p {
display: inline-block;
vertical-align: top;
padding: 5px;
}
.vector-zero {
text-align: center;
}

View File

@ -1,6 +1,7 @@
<h1>CARLA F.A.Q.</h1>
For more issues related to F.A.Q. see [question list](https://github.com/carla-simulator/carla/issues?utf8=%E2%9C%93&q=label%3Aquestion+).
For more issues related to F.A.Q. see [question list][issuelink].
[issuelink]: https://github.com/carla-simulator/carla/issues?utf8=%E2%9C%93&q=label%3Aquestion+
<!-- ======================================================================= -->
<details>

View File

@ -27,11 +27,19 @@ accessible from our Python API, and more will be in future releases.
First of all, download the latest release from our GitHub page and extract all
the contents of the package in a folder of your choice.
<div class="build-buttons">
<!-- Latest release button -->
<p align="middle"><a href="https://github.com/carla-simulator/carla/blob/master/Docs/download.md" target="_blank" class="btn btn-neutral" title="Go to the latest CARLA release"><span class="icon icon-github"></span> Get the latest release</a></p>
<p>
<a href="https://github.com/carla-simulator/carla/blob/master/Docs/download.md" target="_blank" class="btn btn-neutral" title="Go to the latest CARLA release">
<span class="icon icon-github"></span> Get the latest release</a>
</p>
<!-- Nightly build button -->
<p align="middle"><a href="http://carla-assets-internal.s3.amazonaws.com/Releases/Linux/Dev/CARLA_Latest.tar.gz" target="_blank" class="btn btn-neutral" title="Go to the nightly CARLA release"><span class="icon icon-github"></span> Get the nightly build</a></p>
<p>
<a href="http://carla-assets-internal.s3.amazonaws.com/Releases/Linux/Dev/CARLA_Latest.tar.gz" target="_blank" class="btn btn-neutral" title="Go to the nightly CARLA build">
<span class="icon fa-cloud-download"></span> Get the nightly build</a>
</p>
</div>
The release package contains a precompiled version of the simulator, the Python
API module, and some Python scripts with usage examples. In order to run our

View File

@ -1,43 +1,66 @@
<h1>How to add assets</h1>
> _This document is a work in progress and might be incomplete._
Adding a vehicle
----------------
Follow
[Art Guide](https://docs.unrealengine.com/latest/INT/Engine/Physics/Vehicles/VehcileContentCreation/index.html)
for creating the Skeletal Mesh and Physics Asset. And
[Vehicles User Guide](https://docs.unrealengine.com/latest/INT/Engine/Physics/Vehicles/VehicleUserGuide/)
for the rest.
Follow [Art Guide][artlink] for creating the Skeletal Mesh and Physics Asset. And
[Vehicles User Guide][userguide] for the rest.
[artlink]: https://docs.unrealengine.com/latest/INT/Engine/Physics/Vehicles/VehcileContentCreation/index.html
[userguide]: https://docs.unrealengine.com/latest/INT/Engine/Physics/Vehicles/VehicleUserGuide/
!!! important
If you want a simpler way you might copy our "General4wheeledSkeleton" from our project, either by
exporting it and copying it into your model or by creating your skelleton using the same bone names and orientation.
If you want a simpler way you might copy our "General4wheeledSkeleton" from our project,
either by exporting it and copying it into your model or by creating your skelleton using
the same bone names and orientation.<br>
Bind it to your vehicle model and choose it when importing your vehicle into the editor.
This way you won't need to configure the animation, you might just use "General4wheeledAnimation" (step 3)
You also won't need to configure the bone names for your wheels (Step 7. Be carefull, you'll still need to asign the wheel blueprints).
This way you won't need to configure the animation, you might just use
"General4wheeledAnimation" (step 3)<br>
You also won't need to configure the bone names for your wheels
(Step 7. Be carefull, you'll still need to asign the wheel blueprints).
1. Import fbx as Skelletal Mesh to its own folder inside `Content/Carla/Static/Vehicles`.
A Physics asset and a Skeleton should be automatically created and linked the three together.
* Import fbx as Skelletal Mesh to its own folder inside `Content/Carla/Static/Vehicles`. A Physics asset and a Skeleton should be automatically created and linked the three together.
* Tune the Physics asset. Delete the automatically created ones and add boxes to the `Vehicle_Base` bone matching the shape, make sure generate hit events is enabled. Add a sphere for each wheel and set their "Physics Type" to "Kinematic".
* Inside that folder create an "Animation Blueprint", while creating select "VehicleAnimInstance" as parent class and the skeleton of this car model as the target skeleton. Add the animation graph as shown in the links given above (or look for it in other cars' animation, like Mustang).
* Create folder `Content/Blueprints/Vehicles/<vehicle-model>`
* Inside that folder create two blueprint classes derived from "VehicleWheel" class. Call them `<vehicle-model>_FrontWheel` and `<vehicle-model>_RearWheel`. Set their "Shape Radius" to exactly match the mesh wheel radius (careful, radius not diameter). Set their "Tire Config" to "CommonTireConfig". On the front wheel uncheck "Affected by Handbrake" and on the rear wheel set "Steer Angle" to zero.
* Inside the same folder create a blueprint class derived from `BaseVehiclePawn` call it `<vehicle-model>`. Open it for edit and select component "Mesh", setup the "Skeletal Mesh" and the "Anim Class" to the corresponding ones. Then select the VehicleBounds component and set the size to cover vehicle's volume as close as possible.
* Select component "VehicleMovement", under "Vehicle Setup" expand "Wheel Setups", setup each wheel
2. Tune the Physics asset. Delete the automatically created ones and add boxes to the
`Vehicle_Base` bone matching the shape, make sure generate hit events is enabled.
Add a sphere for each wheel and set their "Physics Type" to "Kinematic".
3. Inside that folder create an "Animation Blueprint", while creating select "VehicleAnimInstance"
as parent class and the skeleton of this car model as the target skeleton.
Add the animation graph as shown in the links given above
(or look for it in other cars' animation, like Mustang).
4. Create folder `Content/Blueprints/Vehicles/<vehicle-model>`
5. Inside that folder create two blueprint classes derived from "VehicleWheel" class.
Call them `<vehicle-model>_FrontWheel` and `<vehicle-model>_RearWheel`. Set their "Shape Radius"
to exactly match the mesh wheel radius (careful, radius not diameter). Set their "Tire Config" to
"CommonTireConfig". On the front wheel uncheck "Affected by Handbrake" and on the rear wheel
set "Steer Angle" to zero.
6. Inside the same folder create a blueprint class derived from `BaseVehiclePawn`
call it `<vehicle-model>`. Open it for edit and select component "Mesh", setup the "Skeletal Mesh"
and the "Anim Class" to the corresponding ones. Then select the VehicleBounds component and set
the size to cover vehicle's volume as close as possible.
7. Select component "VehicleMovement", under "Vehicle Setup" expand "Wheel Setups", setup each wheel
- 0 : Wheel Class=`<vehicle-model>_FrontWheel`, Bone Name=`Wheel_Front_Left`
- 1 : Wheel Class=`<vehicle-model>_FrontWheel`, Bone Name=`Wheel_Front_Right`
- 2 : Wheel Class=`<vehicle-model>_RearWheel`, Bone Name=`Wheel_Rear_Left`
- 3 : Wheel Class=`<vehicle-model>_RearWheel`, Bone Name=`Wheel_Rear_Right`
* Test it, go to CarlaGameMode blueprint and change "Default Pawn Class" to the newly created car blueprint
8. Test it, go to CarlaGameMode blueprint and change "Default Pawn Class" to the newly
created car blueprint.
Adding a 2 wheeled vehicle
--------------------------
Adding 2 wheeled vehicles is similar to adding a 4 wheeled one but due to the complexity of the animation you'll need to set up aditional bones to guide the driver's animation:
Adding 2 wheeled vehicles is similar to adding a 4 wheeled one but due to the complexity of the
animation you'll need to set up aditional bones to guide the driver's animation:
As with the 4 wheeled vehicles, orient the model towards positive "x" and every bone axis towards positive x and with the z axis facing upwards.
As with the 4 wheeled vehicles, orient the model towards positive "x" and every bone axis towards
positive x and with the z axis facing upwards.
```yaml
Bone Setup:
@ -59,20 +82,44 @@ Bone Setup:
- Seat: # Sets the position of the drivers hip bone. No need to bind it to anything but place it carefully.
```
* Import fbx as Skelletal Mesh to its own folder inside `Content/Carla/Static/Vehicles/2Wheeled`. When importing select "General2WheeledVehicleSkeleton" as skelleton A Physics asset should be automatically created and linked.
* Tune the Physics asset. Delete the automatically created ones and add boxes to the `BikeBody` bone trying to match the shape as possible, make sure generate hit events is enabled. Add a sphere for each wheel and set their "Physics Type" to "Kinematic".
* Create folder `Content/Blueprints/Vehicles/<vehicle-model>`
* Inside that folder create two blueprint classes derived from "VehicleWheel" class. Call them `<vehicle-model>_FrontWheel` and `<vehicle-model>_RearWheel`. Set their "Shape Radius" to exactly match the mesh wheel radius (careful, radius not diameter). Set their "Tire Config" to "CommonTireConfig". On the front wheel uncheck "Affected by Handbrake" and on the rear wheel set "Steer Angle" to zero.
* Inside the same folder create a blueprint class derived from `Base2WheeledVehicle` call it `<vehicle-model>`. Open it for edit and select component "Mesh", setup the "Skeletal Mesh" and the "Anim Class" to the corresponding ones. Then select the VehicleBounds component and set the size to cover vehicle's area as seen from above.
* Select component "VehicleMovement", under "Vehicle Setup" expand "Wheel Setups", setup each wheel
1. Import fbx as Skelletal Mesh to its own folder inside `Content/Carla/Static/Vehicles/2Wheeled`.
When importing select "General2WheeledVehicleSkeleton" as skelleton A Physics asset should be
automatically created and linked.
2. Tune the Physics asset. Delete the automatically created ones and add boxes to the `BikeBody`
bone trying to match the shape as possible, make sure generate hit events is enabled.
Add a sphere for each wheel and set their "Physics Type" to "Kinematic".
3. Create folder `Content/Blueprints/Vehicles/<vehicle-model>`
4. Inside that folder create two blueprint classes derived from "VehicleWheel" class. Call them
`<vehicle-model>_FrontWheel` and `<vehicle-model>_RearWheel`. Set their "Shape Radius" to exactly
match the mesh wheel radius (careful, radius not diameter).
Set their "Tire Config" to "CommonTireConfig". On the front wheel uncheck "Affected by Handbrake"
and on the rear wheel set "Steer Angle" to zero.
5. Inside the same folder create a blueprint class derived from `Base2WheeledVehicle`
call it `<vehicle-model>`. Open it for edit and select component "Mesh", setup the "Skeletal Mesh"
and the "Anim Class" to the corresponding ones. Then select the VehicleBounds component and set
the size to cover vehicle's area as seen from above.
6. Select component "VehicleMovement", under "Vehicle Setup" expand "Wheel Setups", setup each wheel
- 0 : Wheel Class=`<vehicle-model>_FrontWheel`, Bone Name=`FrontWheel`
- 1 : Wheel Class=`<vehicle-model>_FrontWheel`, Bone Name=`FrontWheel`
- 2 : Wheel Class=`<vehicle-model>_RearWheel`, Bone Name=`RearWheel`
- 3 : Wheel Class=`<vehicle-model>_RearWheel`, Bone Name=`RearWheel`
(You'll notice that we are basically placing two wheels in each bone. The vehicle class unreal provides does not support vehicles with wheel numbers different from 4 so we had to make it believe the vehicle has 4 wheels)
* Select the variable "is bike" and tick it if your model is a bike. This will activate the pedalier rotation. Leave unmarked if you are setting up a motorbike.
* Find the variable back Rotation and set it as it fit better select the component SkeletalMesh (The driver) and move it along x axis until its in the seat position.
* Test it, go to CarlaGameMode blueprint and change "Default Pawn Class" to the newly created bike blueprint.
(You'll notice that we are basically placing two wheels in each bone.
The vehicle class unreal provides does not support vehicles with wheel numbers different
from 4 so we had to make it believe the vehicle has 4 wheels)
7. Select the variable "is bike" and tick it if your model is a bike. This will activate the
pedalier rotation. Leave unmarked if you are setting up a motorbike.
8. Find the variable back Rotation and set it as it fit better select the component SkeletalMesh
(The driver) and move it along x axis until its in the seat position.
9. Test it, go to CarlaGameMode blueprint and change "Default Pawn Class" to the newly
created bike blueprint.
Map generation
--------------

View File

@ -1,15 +1,21 @@
<h1>How to add friction triggers</h1>
*Friction Triggers* are box triggers that can be added on runtime and let users define a different friction of the vehicles' wheels when being inside those type of triggers. For example, this could be useful for making slippery surfaces in certain regions of a map dynamically.
*Friction Triggers* are box triggers that can be added on runtime and let users define
a different friction of the vehicles' wheels when being inside those type of triggers.
For example, this could be useful for making slippery surfaces in certain regions of
a map dynamically.
In order to spawn a friction trigger using PythonAPI, users must first get the `static.trigger.friction` blueprint definition, and then set the following necessary attributes to that blueprint definition:
In order to spawn a friction trigger using PythonAPI, users must first get the
`static.trigger.friction` blueprint definition, and then set the following necessary
attributes to that blueprint definition:
- *friction*: The friction of the trigger box when vehicles are inside it.
- *extent_x*: The extent of the bounding box in the X coordinate in centimeters.
- *extent_y*: The extent of the bounding box in the Y coordinate in centimeters.
- *extent_z*: The extent of the bounding box in the Z coordinate in centimeters.
Once done that, define a transform to specify the location and rotation for the friction trigger and spawn it.
Once done that, define a transform to specify the location and rotation for the friction
trigger and spawn it.
##### Example

View File

@ -1,11 +1,12 @@
<h1>How to build CARLA on Linux</h1>
---
!!! note
CARLA requires Ubuntu 16.04 or later.
Install the build tools and dependencies
```
```sh
sudo apt-get update
sudo apt-get install wget software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
@ -30,6 +31,7 @@ sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-7/bin/clan
Build Unreal Engine
-------------------
---
!!! note
Unreal Engine repositories are set to private. In order to gain access you
@ -37,7 +39,7 @@ Build Unreal Engine
[www.unrealengine.com](https://www.unrealengine.com).
Download and compile Unreal Engine 4.22. Here we will assume you install it at
`~/UnrealEngine_4.22", but you can install it anywhere, just replace the path
`~/UnrealEngine_4.22`, but you can install it anywhere, just replace the path
where necessary.
```sh
@ -46,15 +48,14 @@ cd ~/UnrealEngine_4.22
./Setup.sh && ./GenerateProjectFiles.sh && make
```
Check Unreal's documentation
["Building On Linux"](https://wiki.unrealengine.com/Building_On_Linux) if any of
the steps above fail.
Check Unreal's documentation ["Building On Linux"](https://wiki.unrealengine.com/Building_On_Linux)
if any of the steps above fail.
Build CARLA
-----------
---
Clone or download the project from our
[GitHub repository](https://github.com/carla-simulator/carla)
Clone or download the project from our [GitHub repository](https://github.com/carla-simulator/carla)
```sh
git clone https://github.com/carla-simulator/carla
@ -96,6 +97,7 @@ make help # Print all available commands.
Updating CARLA
--------------
---
Every new release of CARLA, we release too a new package with the latest changes
in the CARLA assets. To download the latest version and recompile CARLA, run
@ -109,7 +111,8 @@ make launch
- - -
<h2>Assets repository (development only)</h2>
Assets repository (development only)
------------------------------------
Our 3D assets, models, and maps have also a
[publicly available git repository][contentrepolink]. We regularly push latest

View File

@ -2,16 +2,20 @@
---
<h3>Necessary software</h3>
- [Git](https://git-scm.com/downloads)
- [Make](http://gnuwin32.sourceforge.net/packages/make.htm)
- [CMake](https://cmake.org/download/)
- [Python3 x64](https://www.python.org/downloads/)
!!! important
Be sure that these programs are added to your environment path, so you can use them from your command prompt.
Be sure that these programs are added to your environment path, so you can use them from
your command prompt.
!!! important
If make complains about missing libintl3.dll or/and libiconv2.dll please donwload the [dependencies](http://gnuwin32.sourceforge.net/downlinks/make-dep-zip.php) and extract the bin contento into the make installation path.
If make complains about missing libintl3.dll or/and libiconv2.dll please donwload the
[dependencies](http://gnuwin32.sourceforge.net/downlinks/make-dep-zip.php) and extract the
bin contento into the make installation path.
Also:
@ -21,15 +25,26 @@ Also:
Make sure all the modules of the **requirements.txt** files are installed.
<h3>Environment Setup</h3>
In order to build CARLA you must **enable the x64 Visual C++ Toolset**. The Windows 8.1 SDK is also required for installation.
I recommend to use this environment for everything you do in this tutorial.
In order to build CARLA you must **enable the x64 Visual C++ Toolset**.
The Windows 8.1 SDK is also required for installation.
We recommend to use this environment for everything you do in this tutorial.
You have different options:
- **Recomended:** Use [`Visual Studio x64 Native Tools Command Prompt`](https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs). Just press the `Win` button and search for `x64` (be careful to not **unintentionally open a `x86_x64` prompt**), because the name of this Command Prompt can change depending on the lenguage you have Visual Studio installed.
- [Enable a 64-Bit Visual C++ Toolset on the Command Line](https://msdn.microsoft.com/en-us/library/x4d2c09s.aspx) (the instructions will depend on the version of VS that you have).
- **Recomended:** Use [`Visual Studio x64 Native Tools Command Prompt`][recommendedlink].
Just press the `Win` button and search for `x64`
(be careful to not **unintentionally open a `x86_x64` prompt**), because the name of this
Command Prompt can change depending on the lenguage you have Visual Studio installed.
- [Enable a 64-Bit Visual C++ Toolset on the Command Line][toolsetlink]
(the instructions will depend on the version of VS that you have).
[recommendedlink]: https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs
[toolsetlink]: https://msdn.microsoft.com/en-us/library/x4d2c09s.aspx
<h3>Clone the repository</h3>
Go to the path you want to install CARLA and use git to download the project using the following command:
Go to the path you want to install CARLA and use git to download the project
using the following command:
```cmd
git clone https://github.com/carla-simulator/carla.git
@ -42,12 +57,20 @@ cd carla
```
<h3>Download CARLA contents</h3>
Depending on the Carla version that you are unsing download one of the links that you can find in `\Util\ContentVersions.txt` and extract the content to `Unreal\CarlaUE4\Content\Carla`, if the path doesn't exist, create it.
Depending on the Carla version that you are unsing download one of the links that you can find
in `\Util\ContentVersions.txt` and extract the content to `Unreal\CarlaUE4\Content\Carla`,
if the path doesn't exist, create it.
# Build CARLA
---
Once you have downloaded the repo and extract the Carla contents you can start with the automatic build. The process may take a while, it will download and install the necessary libraries (Boost, RPCLib and googletest). Expect 20-40 minutes, depending on your hardware and internet connection. If you get any error comment on [GitHub #647](https://github.com/carla-simulator/carla/issues/647) issue or just ask on the [Windows Discord channel](https://discord.gg/42KJdRj).
Once you have downloaded the repo and extract the Carla contents you can start with
the automatic build. The process may take a while, it will download and install the
necessary libraries (Boost, RPCLib and googletest). Expect 20-40 minutes,
depending on your hardware and internet connection.
If you get any error comment on [GitHub #647](https://github.com/carla-simulator/carla/issues/647)
issue or just ask on the [Windows Discord channel](https://discord.gg/42KJdRj).
<h3>Build commands</h3>
@ -60,9 +83,12 @@ Once you have downloaded the repo and extract the Carla contents you can start w
| `make rebuild` | Rebuilds Carla project, dependencies not build |
If you build Carla for the first time or after you clean the project it will probably ask you to build the `UE4Editor-CarlaUE4.dll` and `UE4Editor-Carla.dll` also (as is needed for coocking the content for launch Carla), agree and the project will be opened in the Unreal Engine in a few minutes.
If you build Carla for the first time or after you clean the project it will probably ask you to
build the `UE4Editor-CarlaUE4.dll` and `UE4Editor-Carla.dll` also (as is needed for coocking the
content for launch Carla), agree and the project will be opened in the Unreal Engine in a few minutes.
Example of building Carla 0.9.0 for first time:
```cmd
1) git clone https://github.com/carla-simulator/carla.git
2) Download https://drive.google.com/uc?id=1FtC00CrDb7Kz5StBAwb6vqOGbzZtpROx&export=download
@ -73,7 +99,8 @@ Example of building Carla 0.9.0 for first time:
# Update CARLA
---
Every new release of CARLA we release a new package with the latest changes in the CARLA assets. To download the latest version and recompile CARLA, run:
Every new release of CARLA we release a new package with the latest changes in the CARLA assets.
To download the latest version and recompile CARLA, run:
```cmd
1) make clean # Deletes all the binaries and temporals generated by the build system
@ -85,11 +112,14 @@ Every new release of CARLA we release a new package with the latest changes in t
# Possible build errors
---
If you also have installed other version of Visual Studio or Microsoft Compiler and get any error during the build as C2440 or C2672 this is probably because is not using the 2017 compiler, so try first to uninstall the other ones and rebuild again.
If you also have installed other version of Visual Studio or Microsoft Compiler and get any error
during the build as C2440 or C2672 this is probably because is not using the 2017 compiler,
so try first to uninstall the other ones and rebuild again.
If you would like to keep the other version of Visual Studio edit ```%appdata%\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml``` adding the following lines:
If you would like to keep the other version of Visual Studio edit
```%appdata%\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml``` adding the following lines:
```
```xml
<VCProjectFileGenerator>
<Version>VisualStudio2017</Version>
</VCProjectFileGenerator>

View File

@ -1,10 +1,15 @@
<h1>How to control vehicle physics</h1>
Physics properties can be tuned for vehicles and its wheels. These changes are applied **only** on runtime, and values are set back to default ones when the execution ends.
Physics properties can be tuned for vehicles and its wheels.
These changes are applied **only** on runtime, and values are set back to default ones when
the execution ends.
These properties are controlled through a [carla.VehiclePhysicsControl](/python_api/#carla.VehiclePhysicsControl) object, which also provides the control of each wheel's physics through a [carla.WheelPhysicsControl](/python_api/#carla.WheelPhysicsControl) object.
These properties are controlled through a
[carla.VehiclePhysicsControl](/python_api/#carla.VehiclePhysicsControl) object,
which also provides the control of each wheel's physics through a
[carla.WheelPhysicsControl](/python_api/#carla.WheelPhysicsControl) object.
##### Example
## Example
```py
import carla

View File

@ -1,185 +1,381 @@
<h1>How to make a new map with RoadRunner</h1>
<h1>How to create and import a new map</h1>
![Town03](img/create_map_01.jpg)
<h2>RoadRunner</h2>
## 1 Create a new map
RoadRunner is a powerful software from Vector Zero to create 3D scenes. Using RoadRunner is easy, in a few steps you will be able to create an impressive scene. You can download
a trial of RoadRunner at:
Files needed:
![vectorzero](img/logo_vectorzero.jpg) [https://www.vectorzero.io/](https://www.vectorzero.io/)
* Binaries `.fbx` - All meshes you need to build the map, i.e., roads, lanemarking, sidewalk, ect.
* OpenDRIVE `.xodr` - Road network information that cars need to circulate on the map.
<h2>Step 1 - Create your map in RoadRunner:</h2>
It is possible to modify an existing CARLA map, check out the [map customization][custommaplink]
tutorial.
* Start by becoming familiar with the RoadRunner editor. Play with the controllers to define roads, sidewalks, etc. Please, keep in mind the following rules:
* Create your maps centered arround (0,0). This is required to maintain compatibility with CARLA maps.
* At the beginning of the map creation select Tools/TransformScene and aply a 180º rotation.
Currently OpenDrive appears rotated 180 degrees by default --We are working on fixing that.
[custommaplink]: /dev/map_customization
![Roadrunner180](img/roadrunner180.jpg)
The following steps will introduce the RoadRunner software for map creation. If the map is
created by other software, go to this [section](#3-importing-into-unreal).
* Check that all conections and geometries seem correct.
## 2 Create a new map with RoadRunner
![CheckGeometry](img/check_geometry.jpg)
RoadRunner is a powerful software from Vector Zero to create 3D scenes. Using RoadRunner is easy,
in a few steps you will be able to create an impressive scene. You can download
a trial of RoadRunner at VectorZero's web page.
* Visualize the OpenDrive road network by clicking on the "OpenDrivePrevewTool" button.
<div class="vector-zero">
<a href="https://www.vectorzero.io/"><img src="/img/VectorZeroAndIcon.webp"/></a>
</div> <br>
![checkopen](img/check_open.jpg)
Read VectorZero's RoadRunner [documentation][rr_docs] to install it and get started.
They also have very useful [tutorials][rr_tutorials] on how to use RoadRunner, check them out!
[rr_docs]: https://tracetransit.atlassian.net/wiki/spaces/VS/pages/740622413/Getting+Started
[rr_tutorials]: https://www.youtube.com/channel/UCAIXf4TT8zFbzcFdozuFEDg/playlists
!!! important
Create the map centered arround (0, 0).
## 2.1 Validate the map
* Check that all connections and geometries seem correct.
![CheckGeometry](img/check_geometry.jpg)
* Visualize the OpenDRIVE road network by clicking on the `OpenDRIVE Preview Tool`
button and export.
![checkopen](img/check_open.jpg)
!!! note
During the creation of the map, junctions (the union between two roads) might yield
some errors when building the OpenDrive file. Clicking on the
"OpenDrivePreviewTool" button lets you test the integrity of the current map. If
errors happen you shoud click on the "ManouverRoadsTool" button and then within the
details window, under junction, click on the "RebuildManouverRoads" button.
Even if nothing seems to happen the road should be fixed.
The _OpenDrive Preview Tool_ button lets you test the integrity of the current map.
If there is any error with map junctions, click on `Maneuver Tool`
and `Rebuild Maneuver Roads` buttons.
![maneuverroad](img/maneuver_road.jpg)
!!! important
Apply a 180 degree rotation before exporting `Tools > Transform Scene ... > Rotation`
<h3>Exporting:</h3>
## 2.2 Export the map
After verifying that everything is correct it is time to export the map to Unreal. You need export two files to create a map in Unreal.
After verifying that everything is correct, it is time to export the map to CARLA.
* OpendDrive (.xodr) Information that cars need to circulate on the
map.
1. Export the scene using the CARLA option in the main menu:<br>
`File > Export > CARLA (.fbx + .xml + .xodr)`.
* Binaries (.fbx) All meshes you need to build the map, i.e., roads, lanemarking,
sidewalk, ect.
2. Leave `Export individual Tiles` _unchecked_, this will generate only one fbx
file with all the pieces making it easier to keep track of the map.
In order to export these files you need to follow these steps:
![rr_export](img/rr_export_view.png)
1. Select File - Export - OpenDrive (.xodr)
* Select File - Export - Filmbox (.fbx)
* Choose your export folder and Keep Merge Roads, Merge Marking and Merge
Terrain _Unchecked_.
* Under Options Check "ExportToTiles" to divide the map into chunks, this keeps
the render process a bit lighter. Be carefull though, subdividing the map too much
will also be inefficient. Some experimentation is needed here to get the
perfect point and it will depend on the map beeing created.
<br>
* Leave "Export individual Tiles" _Unchecked_, this will give you only one fbx
file with all the pieces, making easier to keep track of the map.
3. Click `Export`.
![Tutorial_RoadRunner](img/tutorial_roadrunner.jpg)
This will generate a `mapname.fbx` and `mapname.xodr` files within others.
<h2>Step 2 - Unreal</h2>
_For a more in-depth guide on how to use the exportation option,_
_check VectorZeros's [documentation][exportlink]._
<h2>Importing into Unreal:</h2>
[exportlink]: https://tracetransit.atlassian.net/wiki/spaces/VS/pages/752779356/Exporting+to+CARLA
* Start dragging your file from where it is saved to the "content browser" in
your unreal's project as you would do with any other asset.
* In the Import window make sure the following options are _unchecked_:
ForcefrontXAxis, Autogenerate collission, combine meshes.
* Make sure that ConvertSceneUnit is _checked_.
* You should Also _check_ "Import Materials" and "Import Textures" if you want
to use RoadRunner materials or use the method described at the end of the
next step to change them in batches.
## 3 Importing into Unreal
![Tutorial_Roadrunner_UE4](img/tutorial_roadrunner_ue4.jpg)
This section is divided into two. The first part shows how to import a map from RoadRunner
and the second part shows how to import a map from other software that generates `.fbx` and `.xodr` files.
<h2>Working with maps in Unreal:</h2>
!!! important
The `.xodr` OpenDRIVE file should have the same name as the binary file `.fbx`
i.e. `mapname.fbx` `mapname.xodr`.
First of all create a level with the Map name (this will be important later)
and save it inside Game/Carla/Maps/
We have also created a new way to import assets into Unreal,
check this [`guide`](../asset_packages_for_dist/)!
Once everything is loaded up you should end with several staticMeshes in the folder
you have selected. Drag them all to the level and you will have
your map in Unreal! Congratulations!.
### 3.1 Importing from RoadRunner
The time taken by the loading process will depend on how many pieces you cut the map into. Be patient! All the pieces share the same center pivot, so if they are positioned
in the same place they should fit as they did in the RoadRunner Editor. When
unreal finish loading the meshes must be centered at point (0, 0, 0).
#### 3.1.1 Plugin Installation
![Transform_Map](img/transform.jpg)
RoadRunner provides a series of plugins that make the importing simpler.
<h3>Semantic Segmentation Ground Truth</h3>
1. Locate the plugins under RoadRunner's installation folder:<br>
`/usr/bin/VectorZero/Tools/Unreal/Plugins`.
Once you have loaded the correct map and materials, we will prepare the semantic
segmantation ground truth. In order for the semantic segmentation to work, you will need to save the different pieces of the map in their corresponding folder. This
is a bit difficult today as with the current version there is no name
identification for the different pieces but this is a just temporal issue from
Roadrunner side. Typically you will need only 3 Folders: ../Content/Static/
1- Road, 2-Terrain, 3- RoadLines.
2. Copy those folders to the CarlaUE4 plugins directory: `/carla/Unreal/CarlaUE4/Plugins/`.
<h3>How to put meshes in the right folder</h3>
3. Rebuild the plugin.
Select the material of the items you want to change into a new folder. Importing the
assets creates a road material, a sidewalk material and so on.
##### Rebuild on Windows
1. Once selected rightclick and select "Asset Actions/Select actors Using this
asset". All actors using that material should be highlighted in the viewport.
1. Generate project files.
2. Rightclick on them in the world and select "Browse to asset". All assets
using the first material you have chosen should be selected in the Content
browser.
* Right-click the `.uproject` file and `Generate Visual Studio project files`.
3. Move them all to the corresponding folder and repeat for each category until
every road asset is clasified.
2. Open the project and build the plugins.
Roadrunner roads come with premade materials, but for CARLA weather to work
properly you will need to change the pavement materials to some of our own (Stored
under Carla/Static/GenericMaterials/WetPavement). To this end you can change the
materials one by one or you could remove the Roadrunner materials. This action will trigger the replace references window in which you can select and change the new material
for the meshes the last one was referencing.
##### Rebuild on Linux
<h2>Step 3 - Loading OpenDrive into CARLA</h2>
```sh
> UE4_ROOT/GenerateProjectFiles.sh -project="carla/Unreal/CarlaUE4/CarlaUE4.uproject" -game -engine
```
- In RoadRunner go into File/Export and choose OpenDrive(.xodr). In the Export
window choose the save folder and name the file with the same name as the map. Let everything else with the default values and press export.
Finally, restart Unreal Engine and make sure the checkbox is on for both plugins `Edit > Plugins`.
- Copy the .xodr file inside the Content/Carla/Maps/OpenDrive folder.
![rr_ue_plugins](img/rr-ue4_plugins.png)
- Open Your Unreal level and drag the OpenDriveActor inside the scene. This will
read the level name, search the Opendrive file with the same name and load
it.
#### 3.1.2 Importing
- If everything goes right you should have your road information loaded into
your map. Congratulations!
1. Import the _mapname.fbx_ file to a new folder under `/Content/Carla/Maps`
with the `Import` button.
!!! note
It is possible that the map that Opendrive generates is rotated. Maybe you did not rotate it in RoadRunner when you told you so? If this happens you only need to select all
map import from RoadRunner and rotate Z: by 180 degrees.
![ue_import](img/ue_import_mapname.png)
<h2>Setting up the traffic based on OpenDrive:</h2>
<br>
!!! Note
the current version of CARLA needs a CarlaMapGenerator spawned in order to use the server autopilot functionality. From the current version it is also to drive all vehicles using the new client nvaigation stack. However, if you still want to use the server autopilot you will need to create a CarlaMapGenerator for your city --never above or under it.
2. Set `Scene > Hierarchy Type` to _Create One Blueprint Asset_ (selected by default).
3. Set `Static Meshes > Normal Import Method` to _Import Normals_.
* You will need to place points for the vehicles to spawn. The actor that sets the
spawn position of the vehicles is called VehicleSpawnPoint. CARLA vehicles
must overlap with one of the RoutePlanner's trigger box for them to be
directed, otherwise they would drive straight until they find an obstacle. We
suggest placing the spawners 2 to 3 meters avobe each trigger box, not much
higher as if the spawn is too high it is not able to measure if there is any
vehicle under it before spawning and they would end up spawning on top of each
other. Spawning the vehicles a few meters behind the trigger boxes would also
work but that is a bit trickier.
![ue_import_options](img/ue_import_options.png)
* Spawners must always be oriented as the road dictates. This must be done by
hand but we will make some form of automation in the future.
<br>
* Traffic lights must be placed in every crossing in which vehicles might
conflict. These are the childs of "TrafficLightBase" and are stored inside
Game/Carla/Static/TrafficSigns/Streetlights_01.
4. Click `Import`.
Again, remember this is just needed to use the server autopilot. We recommend to start using new the client driving stack provided from 0.9.2 version.
5. Save the current level `File > Save Current As...` > _mapname_.
<h2>Working with BP_TrafficLight and BP_TrafficLightGroups:</h2>
The new map should now appear next to the others in the Unreal Engine _Content Browser_.
* One trafficlight must be placed at every entrance that needs regulation.
One TrafficLightGroup must be placed in every crossing that has street
lights. Adjust The triggerbox of each traffic light until it covers the roads
it affects.
![ue_level_content](img/ue_level_content.png)
* Once the actors of an Intersection are placed, open the corresponding group
and under TrafficLights store all TrafficLight actors involved.
And that's it! The map is ready!
* Trafficlight group works by Rotating whitch of the involved traffic light is
green each moment. You can configure the timing the Lights stays in green
(GreenTime), the time it stays yellow (YellowTime), and the time it takes
between one trafficlight goes red and the next one goes green (ChangeTime).
### 3.2 Importing from the files
* These last steps are in an early stage and may require a some trial and
error from users. VehicleSpawner placement, Street light timing and
Traffic light StopperBoxes might need some tweaking and testing to fit
perfectly into the built city.
This is the generic way to import maps into Unreal.
1. Create a new level with the **Map** name in Unreal `Add New > Level` under `Content/Carla/Maps`.
2. Copy the Illumination folder and its content from the BaseMap `Content/Carla/Maps/BaseMap`
and paste it in the new level, otherwise, the map will be in the dark.
![ue_illumination](img/ue_illumination.png)
#### 3.2.1 Binaries (.fbx)
1. Import the _mapname.fbx_ file to a new folder under `/Content/Carla/Maps`
with the `Import` button. Make sure the following options are unchecked:
* Auto Generate Collision
* Combine Meshes
* Force Front xAxis
* Normal Import Method - _Import Normals_
<br>
2. Check the following options:
* Convert Scene Unit
* _If you want to import materials and textures:_
* Material Import Method - _Create new materials_
* Import Textures
![ue_import_file](img/ue_import_file.png)
<br>
Once everything is loaded up, you should end with several static Meshes in the folder
you have selected.
3. Drag them all into the level.
![ue_meshes](img/ue_drag_meshes.png)
<br>
4. When Unreal Engine finishes loading, center the meshes at point (0, 0, 0) and you will have
your map in Unreal! Congratulations!
![Transform_Map](img/transform.jpg)
<br>
5. Generate collisions, so pedestrians and vehicles don't fall into the abyss.
* Select the meshes that will have collision.
* Right-click `Asset Actions > Bulk Edit via Property Matrix...`.
![ue_selectmesh_collision](img/ue_selectmesh_collision.png)
* Search for _collision_ in Property's Matrix search box.
* Change `Collision complexity` from `Project Default` to `Use Complex Collision As Simple`.
![ue_collision_complexity](img/ue_collision_complexity.png)
* Go to `File > Save All`.
6. Lastly, for the **semantic segmentation ground truth**, move the static meshes imported
under `Content/Carla/Maps/mapfolder` to `Carla/Static` subsequent folders:
* `Terrain/mapname`
* `Road/mapname`
* `RoadLines/mapname`
```sh
Content
└── Carla
├── Blueprints
├── Config
├── Exported Maps
├── HDMaps
├── Maps
└── Static
├── Terrain
│ └── mapname
│ └── Static Meshes
├── Road
│ └── mapname
│ └── Static Meshes
└── RoadLines
└── mapname
└── Static Meshes
```
![ue__semantic_segmentation](img/ue_ssgt.png)
#### 3.2.2 OpenDRIVE (.xodr)
1. Copy the `.xodr` file inside the `Content/Carla/Maps/OpenDrive` folder.
2. Open the Unreal level and drag the _Open Drive Actor_ inside the level.
It will read the level's name, search the Opendrive file with the same name and load it.
![ue_opendrive_actor](img/ue_opendrive_actor.png)
And that's it! Now the road network information is loaded into the map.
## 4. Setting up traffic behavior
Once everything is loaded into the level, it is time to create traffic behavior.
1. Click on the _Open Drive Actor_.
2. Check the following boxes in the same order:
* Add Spawners
* (Optional) On Intersections (For more spawn points)
* Generate Routes
This will generate a bunch of _RoutePlanner_ and _VehicleSpawnPoint_ actors that make
it possible for vehicles to spawn and go in autopilot mode.
## 4.1 Traffic lights and signs
To regulate the traffic, traffic lights and signs must be placed all over the map.
1. Drag _traffic light / sign actors_ into the level and place them.
2. Adjust the _[`trigger box`][triggerlink]_ of each traffic light / sign
until it covers the road it affects.
[triggerlink]: ../python_api/#carla.TrafficSign.trigger_volume
![ue_trafficlight](img/ue_trafficlight.png)
<br>
3. For traffic lights in junctions, drag a _traffic light group actor_ into the level and assign
all traffic lights involved.
![ue_tl_group](img/ue_tl_group.png)
These last steps may require some trial and error. _Traffic light timing_ and _traffic trigger boxes_
might need some tweaking and testing to fit perfectly into the city.
![ue_tlsigns_example](img/ue_tlsigns_example.png)
> _Example: Traffic Signs, Traffic lights and Turn based stop._
## 5 Adding pedestrian navigation zones
To make a navigable mesh for pedestrians, we use the _Recast & Detour_ library.<br>
<https://github.com/recastnavigation/recastnavigation>.
1. Clone or download _Recast & Detour_.
2. Before building RecastDemo you need to change `m_scale` variable from `1.0f` to `0.01f` in the
_MeshLoaderObj contructor_ in `RecastDemo/Source/MeshLoaderObj.cpp`.
```cpp
rcMeshLoaderObj::rcMeshLoaderObj() :
m_scale(0.01f),
m_verts(0),
m_tris(0),
m_normals(0),
m_vertCount(0),
m_triCount(0)
{
}
```
Then build RecastDemo. Follow their [instructions][buildrecastlink] on how to build it.
[buildrecastlink]: https://github.com/recastnavigation/recastnavigation#building-recastdemo
**Back to Unreal Engine**
1. Select the meshes you want the pedestrians to be able to spawn and walk on.
![ue_mesh_to_obj](img/ue_mesh_to_obj.png)
<br>
2. Export and save them as a `mapname.obj` file. `File > Export Selected...`.
3. Run RecastDemo `./RecastDemo`.
* Select `Solo Mesh` from the `Sample` parameter's box.
* Select the _mapname.obj_ file from the `Input Mesh` parameter's box.
![recast_example](img/recast_example.png)
<br>
4. First click on the `Build` button, then once the built has finished, click on the `Save` button.
5. Change the **filename** of the binary file generated at `RecastDemo/Bin` to `mapname.bin`.
6. Drag the _mapname.bin_ file into the `Nav` folder under `Content/Carla/Maps`.
Now pedestrians will be able to spawn randomly and walk on the selected meshes!
## Tips and Tricks
* Traffic light group controls wich traffic light is active (green state) at each moment.
You can configure the timing that the lights stay in green `GreenTime`, the time it stays yellow
`YellowTime`, and the time it takes between one traffic light goes red and the next one
goes green `ChangeTime`.
<div style="text-align:center"><img src="../img/ue_tl_group_times.png"/></div>
<br>
* You can add a vehicle spawn point. This should be placed 2 to 3 meters above a Route Planner's
trigger box and oriented as the route shows. When the vehicle falls, it will hit the trigger box
and the autopilot will take control of the vehicle.
![ue_vehicle_spawnpoint](img/ue_vehicle_spawnpoint.png)
* When you check `Generate Routes` in Open Drive Actor, it generates the road network but it won't
show individual planners. In order to show those points, please do the following:
1. Select all `RoutePlanner` actors.
2. Move them.
3. Press `ctr + z` and they will show up on the map.
![ue_route_points](img/ue_route_points.png)
* OpenDRIVE routes can be manually modified.
![ue_routeplanner_mod](img/ue_routeplanner_mod.png)
* In order to add the map to the Unreal packaging system, go to:<br>
`Edit > Project Settings > Project > Packaging > Show Advanced > List of maps to include...` <br>
Then add the level to the array.
![ue_maps_to_include](img/ue_maps_to_include.png)
* To change default materials and use the ones that come with CARLA at:<br>
`Content/Carla/Static/GenericMaterials`.
* Unreal shortcuts to find materials and assets:
* `Right-click on the Asset > Browse to Asset`
* `Right-click on the Material > Asset Actions > Select Actors Using This Asset`

View File

@ -1,8 +1,8 @@
<h1>How to model vehicles</h1>
## 4-Wheeled Vehicles
# 4-Wheeled Vehicles
<h3>Modelling</h3>
## Modelling
Vehicles must have a minimum of 10.000 and a maximum of 17.000 Tris
approximately. We model the vehicles using the size and scale of actual cars.
@ -35,9 +35,7 @@ The vehicle must be divided in 6 materials:
Put a rectangular plane with this size 29-12 cm, for the licence Plate.
We assign the license plate texture.
<h3>Nomenclature of Material</h3>
## Nomenclature of Material
* M(Material)_"CarName"_Bodywork(part of car)
@ -51,8 +49,7 @@ The vehicle must be divided in 6 materials:
* M_"CarName"_LicencePlate
<h3>Textures</h3>
## Textures
The size of the textures is 2048x2048.
@ -73,11 +70,7 @@ TEXTURES
MATERIAL
* M_Tesla3_BodyWork
<h3>RIG</h3>
## RIG
The easiest way is to copy the "General4WheeledVehicleSkeleton" present in our project,
either by exporting it and copying it to your model or by creating your skeleton
@ -98,7 +91,7 @@ Vhehicle_Base: The origin point of the mesh, place it in the point (0,0,0) of th
* Wheel_Rear_Left: Set the joint's position in the middle of the Wheel.
<h3>LODs</h3>
## LODs
All vehicle LODs must be made in Maya or other 3D software. Because Unreal does
not generate LODs automatically, you can adjust the number of Tris to make a

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

BIN
Docs/img/recast_example.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

BIN
Docs/img/rr-ue4_plugins.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

BIN
Docs/img/rr_export_view.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
Docs/img/ue_drag_meshes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
Docs/img/ue_import_file.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

BIN
Docs/img/ue_mesh_to_obj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 KiB

BIN
Docs/img/ue_new_level.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

BIN
Docs/img/ue_ssgt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 KiB

BIN
Docs/img/ue_tl_group.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 853 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 KiB

View File

@ -26,7 +26,7 @@
* [Blueprint Library](bp_library.md)
* [Running without display and selecting GPUs](carla_headless.md)
* [Running in a Docker](carla_docker.md)
* [How to make a new map with RoadRunner](how_to_make_a_new_map.md)
* [How to create and import a new map](how_to_make_a_new_map.md)
* [How to link Epic's Automotive Materials](epic_automotive_materials.md)
* [Creating standalone asset packages for distribution](asset_packages_for_dist.md)
* [How to add friction triggers](how_to_add_friction_triggers.md)
@ -39,6 +39,7 @@
* [Contribution guidelines](CONTRIBUTING.md)
* [Coding standard](coding_standard.md)
* [Documentation standard](doc_standard.md)
* [Code of conduct](CODE_OF_CONDUCT.md)
<h3>Development</h3>

View File

@ -1,545 +1,3 @@
### Overview
- [**carla**](#carla) <sub>_Module_</sub>
- [**ActorAttributeType**](#carla.ActorAttributeType) <sub>_Class_</sub>
- [**Bool**](#carla.ActorAttributeType.Bool) <sub>_Instance variable_</sub>
- [**Int**](#carla.ActorAttributeType.Int) <sub>_Instance variable_</sub>
- [**Float**](#carla.ActorAttributeType.Float) <sub>_Instance variable_</sub>
- [**String**](#carla.ActorAttributeType.String) <sub>_Instance variable_</sub>
- [**RGBColor**](#carla.ActorAttributeType.RGBColor) <sub>_Instance variable_</sub>
- [**ActorList**](#carla.ActorList) <sub>_Class_</sub>
- [**find**(**self**, **actor_id**)](#carla.ActorList.find) <sub>_Method_</sub>
- [**filter**(**self**, **wildcard_pattern**)](#carla.ActorList.filter) <sub>_Method_</sub>
- [**\__getitem__**(**self**, **pos**)](#carla.ActorList.__getitem__) <sub>_Method_</sub>
- [**\__len__**(**self**)](#carla.ActorList.__len__) <sub>_Method_</sub>
- [**\__iter__**(**self**)](#carla.ActorList.__iter__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.ActorList.__str__) <sub>_Method_</sub>
- [**AttachmentType**](#carla.AttachmentType) <sub>_Class_</sub>
- [**Rigid**](#carla.AttachmentType.Rigid) <sub>_Instance variable_</sub>
- [**SpringArm**](#carla.AttachmentType.SpringArm) <sub>_Instance variable_</sub>
- [**BlueprintLibrary**](#carla.BlueprintLibrary) <sub>_Class_</sub>
- [**find**(**self**, **id**)](#carla.BlueprintLibrary.find) <sub>_Method_</sub>
- [**filter**(**self**, **wildcard_pattern**)](#carla.BlueprintLibrary.filter) <sub>_Method_</sub>
- [**\__getitem__**(**self**, **pos**)](#carla.BlueprintLibrary.__getitem__) <sub>_Method_</sub>
- [**\__len__**(**self**)](#carla.BlueprintLibrary.__len__) <sub>_Method_</sub>
- [**\__iter__**(**self**)](#carla.BlueprintLibrary.__iter__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.BlueprintLibrary.__str__) <sub>_Method_</sub>
- [**ColorConverter**](#carla.ColorConverter) <sub>_Class_</sub>
- [**Raw**](#carla.ColorConverter.Raw) <sub>_Instance variable_</sub>
- [**Depth**](#carla.ColorConverter.Depth) <sub>_Instance variable_</sub>
- [**LogarithmicDepth**](#carla.ColorConverter.LogarithmicDepth) <sub>_Instance variable_</sub>
- [**CityScapesPalette**](#carla.ColorConverter.CityScapesPalette) <sub>_Instance variable_</sub>
- [**DebugHelper**](#carla.DebugHelper) <sub>_Class_</sub>
- [**draw_point**(**self**, **location**, **size**=0.1f, **color**=(255,0,0), **life_time**=-1.0f, **persistent_lines**=True)](#carla.DebugHelper.draw_point) <sub>_Method_</sub>
- [**draw_line**(**self**, **begin**, **end**, **thickness**=0.1f, **color**=(255,0,0), **life_time**=-1.0f, **persistent_lines**=True)](#carla.DebugHelper.draw_line) <sub>_Method_</sub>
- [**draw_arrow**(**self**, **begin**, **end**, **thickness**=0.1f, **arrow_size**=0.1f, **color**=(255,0,0), **life_time**=-1.0f, **persistent_lines**=True)](#carla.DebugHelper.draw_arrow) <sub>_Method_</sub>
- [**draw_box**(**self**, **box**, **rotation**, **thickness**=0.1f, **color**=(255,0,0), **life_time**=-1.0f, **persistent_lines**=True)](#carla.DebugHelper.draw_box) <sub>_Method_</sub>
- [**draw_string**(**self**, **location**, **text**, **draw_shadow**=False, **color**=(255,0,0), **life_time**=-1.0f, **persistent_lines**=True)](#carla.DebugHelper.draw_string) <sub>_Method_</sub>
- [**LaneChange**](#carla.LaneChange) <sub>_Class_</sub>
- [**NONE**](#carla.LaneChange.NONE) <sub>_Instance variable_</sub>
- [**Right**](#carla.LaneChange.Right) <sub>_Instance variable_</sub>
- [**Left**](#carla.LaneChange.Left) <sub>_Instance variable_</sub>
- [**Both**](#carla.LaneChange.Both) <sub>_Instance variable_</sub>
- [**LaneMarking**](#carla.LaneMarking) <sub>_Class_</sub>
- [**type**](#carla.LaneMarking.type) <sub>_Instance variable_</sub>
- [**color**](#carla.LaneMarking.color) <sub>_Instance variable_</sub>
- [**lane_change**](#carla.LaneMarking.lane_change) <sub>_Instance variable_</sub>
- [**width**](#carla.LaneMarking.width) <sub>_Instance variable_</sub>
- [**LaneMarkingColor**](#carla.LaneMarkingColor) <sub>_Class_</sub>
- [**Standard**](#carla.LaneMarkingColor.Standard) <sub>_Instance variable_</sub>
- [**Blue**](#carla.LaneMarkingColor.Blue) <sub>_Instance variable_</sub>
- [**Green**](#carla.LaneMarkingColor.Green) <sub>_Instance variable_</sub>
- [**Red**](#carla.LaneMarkingColor.Red) <sub>_Instance variable_</sub>
- [**White**](#carla.LaneMarkingColor.White) <sub>_Instance variable_</sub>
- [**Yellow**](#carla.LaneMarkingColor.Yellow) <sub>_Instance variable_</sub>
- [**Other**](#carla.LaneMarkingColor.Other) <sub>_Instance variable_</sub>
- [**LaneMarkingType**](#carla.LaneMarkingType) <sub>_Class_</sub>
- [**NONE**](#carla.LaneMarkingType.NONE) <sub>_Instance variable_</sub>
- [**Other**](#carla.LaneMarkingType.Other) <sub>_Instance variable_</sub>
- [**Broken**](#carla.LaneMarkingType.Broken) <sub>_Instance variable_</sub>
- [**Solid**](#carla.LaneMarkingType.Solid) <sub>_Instance variable_</sub>
- [**SolidSolid**](#carla.LaneMarkingType.SolidSolid) <sub>_Instance variable_</sub>
- [**SolidBroken**](#carla.LaneMarkingType.SolidBroken) <sub>_Instance variable_</sub>
- [**BrokenSolid**](#carla.LaneMarkingType.BrokenSolid) <sub>_Instance variable_</sub>
- [**BrokenBroken**](#carla.LaneMarkingType.BrokenBroken) <sub>_Instance variable_</sub>
- [**BottsDots**](#carla.LaneMarkingType.BottsDots) <sub>_Instance variable_</sub>
- [**Grass**](#carla.LaneMarkingType.Grass) <sub>_Instance variable_</sub>
- [**Curb**](#carla.LaneMarkingType.Curb) <sub>_Instance variable_</sub>
- [**LaneType**](#carla.LaneType) <sub>_Class_</sub>
- [**NONE**](#carla.LaneType.NONE) <sub>_Instance variable_</sub>
- [**Driving**](#carla.LaneType.Driving) <sub>_Instance variable_</sub>
- [**Stop**](#carla.LaneType.Stop) <sub>_Instance variable_</sub>
- [**Shoulder**](#carla.LaneType.Shoulder) <sub>_Instance variable_</sub>
- [**Biking**](#carla.LaneType.Biking) <sub>_Instance variable_</sub>
- [**Sidewalk**](#carla.LaneType.Sidewalk) <sub>_Instance variable_</sub>
- [**Border**](#carla.LaneType.Border) <sub>_Instance variable_</sub>
- [**Restricted**](#carla.LaneType.Restricted) <sub>_Instance variable_</sub>
- [**Parking**](#carla.LaneType.Parking) <sub>_Instance variable_</sub>
- [**Bidirectional**](#carla.LaneType.Bidirectional) <sub>_Instance variable_</sub>
- [**Median**](#carla.LaneType.Median) <sub>_Instance variable_</sub>
- [**Special1**](#carla.LaneType.Special1) <sub>_Instance variable_</sub>
- [**Special2**](#carla.LaneType.Special2) <sub>_Instance variable_</sub>
- [**Special3**](#carla.LaneType.Special3) <sub>_Instance variable_</sub>
- [**RoadWorks**](#carla.LaneType.RoadWorks) <sub>_Instance variable_</sub>
- [**Tram**](#carla.LaneType.Tram) <sub>_Instance variable_</sub>
- [**Rail**](#carla.LaneType.Rail) <sub>_Instance variable_</sub>
- [**Entry**](#carla.LaneType.Entry) <sub>_Instance variable_</sub>
- [**Exit**](#carla.LaneType.Exit) <sub>_Instance variable_</sub>
- [**OffRamp**](#carla.LaneType.OffRamp) <sub>_Instance variable_</sub>
- [**OnRamp**](#carla.LaneType.OnRamp) <sub>_Instance variable_</sub>
- [**Any**](#carla.LaneType.Any) <sub>_Instance variable_</sub>
- [**SensorData**](#carla.SensorData) <sub>_Class_</sub>
- [**frame**](#carla.SensorData.frame) <sub>_Instance variable_</sub>
- [**timestamp**](#carla.SensorData.timestamp) <sub>_Instance variable_</sub>
- [**transform**](#carla.SensorData.transform) <sub>_Instance variable_</sub>
- [**TrafficLightState**](#carla.TrafficLightState) <sub>_Class_</sub>
- [**Red**](#carla.TrafficLightState.Red) <sub>_Instance variable_</sub>
- [**Yellow**](#carla.TrafficLightState.Yellow) <sub>_Instance variable_</sub>
- [**Green**](#carla.TrafficLightState.Green) <sub>_Instance variable_</sub>
- [**Off**](#carla.TrafficLightState.Off) <sub>_Instance variable_</sub>
- [**Unknown**](#carla.TrafficLightState.Unknown) <sub>_Instance variable_</sub>
- [**Actor**](#carla.Actor) <sub>_Class_</sub>
- [**id**](#carla.Actor.id) <sub>_Instance variable_</sub>
- [**type_id**](#carla.Actor.type_id) <sub>_Instance variable_</sub>
- [**parent**](#carla.Actor.parent) <sub>_Instance variable_</sub>
- [**semantic_tags**](#carla.Actor.semantic_tags) <sub>_Instance variable_</sub>
- [**is_alive**](#carla.Actor.is_alive) <sub>_Instance variable_</sub>
- [**attributes**](#carla.Actor.attributes) <sub>_Instance variable_</sub>
- [**destroy**(**self**)](#carla.Actor.destroy) <sub>_Method_</sub>
- [**get_world**(**self**)](#carla.Actor.get_world) <sub>_Method_</sub>
- [**get_location**(**self**)](#carla.Actor.get_location) <sub>_Method_</sub>
- [**get_transform**(**self**)](#carla.Actor.get_transform) <sub>_Method_</sub>
- [**get_velocity**(**self**)](#carla.Actor.get_velocity) <sub>_Method_</sub>
- [**get_angular_velocity**(**self**)](#carla.Actor.get_angular_velocity) <sub>_Method_</sub>
- [**get_acceleration**(**self**)](#carla.Actor.get_acceleration) <sub>_Method_</sub>
- [**set_location**(**self**, **location**)](#carla.Actor.set_location) <sub>_Method_</sub>
- [**set_transform**(**self**, **transform**)](#carla.Actor.set_transform) <sub>_Method_</sub>
- [**set_velocity**(**self**, **velocity**)](#carla.Actor.set_velocity) <sub>_Method_</sub>
- [**set_angular_velocity**(**self**, **angular_velocity**)](#carla.Actor.set_angular_velocity) <sub>_Method_</sub>
- [**add_impulse**(**self**, **impulse**)](#carla.Actor.add_impulse) <sub>_Method_</sub>
- [**set_simulate_physics**(**self**, **enabled**=True)](#carla.Actor.set_simulate_physics) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.Actor.__str__) <sub>_Method_</sub>
- [**ActorAttribute**](#carla.ActorAttribute) <sub>_Class_</sub>
- [**id**](#carla.ActorAttribute.id) <sub>_Instance variable_</sub>
- [**type**](#carla.ActorAttribute.type) <sub>_Instance variable_</sub>
- [**recommended_values**](#carla.ActorAttribute.recommended_values) <sub>_Instance variable_</sub>
- [**is_modifiable**](#carla.ActorAttribute.is_modifiable) <sub>_Instance variable_</sub>
- [**as_bool**(**self**)](#carla.ActorAttribute.as_bool) <sub>_Method_</sub>
- [**as_int**(**self**)](#carla.ActorAttribute.as_int) <sub>_Method_</sub>
- [**as_float**(**self**)](#carla.ActorAttribute.as_float) <sub>_Method_</sub>
- [**as_str**(**self**)](#carla.ActorAttribute.as_str) <sub>_Method_</sub>
- [**as_color**(**self**)](#carla.ActorAttribute.as_color) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.ActorAttribute.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.ActorAttribute.__ne__) <sub>_Method_</sub>
- [**\__nonzero__**(**self**)](#carla.ActorAttribute.__nonzero__) <sub>_Method_</sub>
- [**\__bool__**(**self**)](#carla.ActorAttribute.__bool__) <sub>_Method_</sub>
- [**\__int__**(**self**)](#carla.ActorAttribute.__int__) <sub>_Method_</sub>
- [**\__float__**(**self**)](#carla.ActorAttribute.__float__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.ActorAttribute.__str__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.ActorAttribute.__str__) <sub>_Method_</sub>
- [**ActorBlueprint**](#carla.ActorBlueprint) <sub>_Class_</sub>
- [**id**](#carla.ActorBlueprint.id) <sub>_Instance variable_</sub>
- [**tags**](#carla.ActorBlueprint.tags) <sub>_Instance variable_</sub>
- [**has_tag**(**self**, **tag**)](#carla.ActorBlueprint.has_tag) <sub>_Method_</sub>
- [**match_tags**(**self**, **wildcard_pattern**)](#carla.ActorBlueprint.match_tags) <sub>_Method_</sub>
- [**has_attribute**(**self**, **id**)](#carla.ActorBlueprint.has_attribute) <sub>_Method_</sub>
- [**get_attribute**(**self**, **id**)](#carla.ActorBlueprint.get_attribute) <sub>_Method_</sub>
- [**set_attribute**(**self**, **id**, **value**)](#carla.ActorBlueprint.set_attribute) <sub>_Method_</sub>
- [**\__len__**(**self**)](#carla.ActorBlueprint.__len__) <sub>_Method_</sub>
- [**\__iter__**(**self**)](#carla.ActorBlueprint.__iter__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.ActorBlueprint.__str__) <sub>_Method_</sub>
- [**ActorSnapshot**](#carla.ActorSnapshot) <sub>_Class_</sub>
- [**id**](#carla.ActorSnapshot.id) <sub>_Instance variable_</sub>
- [**get_transform**(**self**)](#carla.ActorSnapshot.get_transform) <sub>_Method_</sub>
- [**get_velocity**(**self**)](#carla.ActorSnapshot.get_velocity) <sub>_Method_</sub>
- [**get_angular_velocity**(**self**)](#carla.ActorSnapshot.get_angular_velocity) <sub>_Method_</sub>
- [**get_acceleration**(**self**)](#carla.ActorSnapshot.get_acceleration) <sub>_Method_</sub>
- [**\__self__**(**self**)](#carla.ActorSnapshot.__self__) <sub>_Method_</sub>
- [**BoundingBox**](#carla.BoundingBox) <sub>_Class_</sub>
- [**location**](#carla.BoundingBox.location) <sub>_Instance variable_</sub>
- [**extent**](#carla.BoundingBox.extent) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **location**, **extent**)](#carla.BoundingBox.__init__) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.BoundingBox.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.BoundingBox.__ne__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.BoundingBox.__str__) <sub>_Method_</sub>
- [**Client**](#carla.Client) <sub>_Class_</sub>
- [**\__init__**(**self**, **host**, **port**, **worker_threads**=0)](#carla.Client.__init__) <sub>_Method_</sub>
- [**set_timeout**(**self**, **seconds**)](#carla.Client.set_timeout) <sub>_Method_</sub>
- [**get_client_version**(**self**)](#carla.Client.get_client_version) <sub>_Method_</sub>
- [**get_server_version**(**self**)](#carla.Client.get_server_version) <sub>_Method_</sub>
- [**get_world**(**self**)](#carla.Client.get_world) <sub>_Method_</sub>
- [**get_available_maps**(**self**)](#carla.Client.get_available_maps) <sub>_Method_</sub>
- [**reload_world**(**self**)](#carla.Client.reload_world) <sub>_Method_</sub>
- [**load_world**(**self**, **map_name**)](#carla.Client.load_world) <sub>_Method_</sub>
- [**start_recorder**(**self**, **filename**)](#carla.Client.start_recorder) <sub>_Method_</sub>
- [**stop_recorder**(**self**)](#carla.Client.stop_recorder) <sub>_Method_</sub>
- [**show_recorder_file_info**(**self**, **filename**, **show_all**)](#carla.Client.show_recorder_file_info) <sub>_Method_</sub>
- [**show_recorder_collisions**(**self**, **filename**, **category1**, **category2**)](#carla.Client.show_recorder_collisions) <sub>_Method_</sub>
- [**show_recorder_actors_blocked**(**self**, **filename**, **min_time**, **min_distance**)](#carla.Client.show_recorder_actors_blocked) <sub>_Method_</sub>
- [**replay_file**(**self**, **name**, **start**, **duration**, **follow_id**)](#carla.Client.replay_file) <sub>_Method_</sub>
- [**set_replayer_time_factor**(**self**, **time_factor**)](#carla.Client.set_replayer_time_factor) <sub>_Method_</sub>
- [**apply_batch**(**self**, **commands**)](#carla.Client.apply_batch) <sub>_Method_</sub>
- [**apply_batch_sync**(**self**, **commands**)](#carla.Client.apply_batch_sync) <sub>_Method_</sub>
- [**CollisionEvent**](#carla.CollisionEvent) <sub>_Class_</sub>
- [**actor**](#carla.CollisionEvent.actor) <sub>_Instance variable_</sub>
- [**other_actor**](#carla.CollisionEvent.other_actor) <sub>_Instance variable_</sub>
- [**normal_impulse**](#carla.CollisionEvent.normal_impulse) <sub>_Instance variable_</sub>
- [**Color**](#carla.Color) <sub>_Class_</sub>
- [**r**](#carla.Color.r) <sub>_Instance variable_</sub>
- [**g**](#carla.Color.g) <sub>_Instance variable_</sub>
- [**b**](#carla.Color.b) <sub>_Instance variable_</sub>
- [**a**](#carla.Color.a) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **r**=0, **g**=0, **b**=0, **a**=255)](#carla.Color.__init__) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.Color.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.Color.__ne__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.Color.__str__) <sub>_Method_</sub>
- [**GearPhysicsControl**](#carla.GearPhysicsControl) <sub>_Class_</sub>
- [**ratio**](#carla.GearPhysicsControl.ratio) <sub>_Instance variable_</sub>
- [**down_ratio**](#carla.GearPhysicsControl.down_ratio) <sub>_Instance variable_</sub>
- [**up_ratio**](#carla.GearPhysicsControl.up_ratio) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **ratio**=1.0, **down_ratio**=0.5, **up_ratio**=0.65)](#carla.GearPhysicsControl.__init__) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.GearPhysicsControl.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.GearPhysicsControl.__ne__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.GearPhysicsControl.__str__) <sub>_Method_</sub>
- [**GeoLocation**](#carla.GeoLocation) <sub>_Class_</sub>
- [**latitude**](#carla.GeoLocation.latitude) <sub>_Instance variable_</sub>
- [**longitude**](#carla.GeoLocation.longitude) <sub>_Instance variable_</sub>
- [**altitude**](#carla.GeoLocation.altitude) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **latitude**=0.0, **longitude**=0.0, **altitude**=0.0)](#carla.GeoLocation.__init__) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.GeoLocation.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.GeoLocation.__ne__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.GeoLocation.__str__) <sub>_Method_</sub>
- [**Map**](#carla.Map) <sub>_Class_</sub>
- [**name**](#carla.Map.name) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **name**, **xodr_content**)](#carla.Map.__init__) <sub>_Method_</sub>
- [**get_spawn_points**(**self**)](#carla.Map.get_spawn_points) <sub>_Method_</sub>
- [**get_waypoint**(**self**, **location**, **project_to_road**=True, **lane_type**=carla.LaneType.Driving)](#carla.Map.get_waypoint) <sub>_Method_</sub>
- [**get_topology**(**self**)](#carla.Map.get_topology) <sub>_Method_</sub>
- [**generate_waypoints**(**self**, **distance**)](#carla.Map.generate_waypoints) <sub>_Method_</sub>
- [**transform_to_geolocation**(**self**, **location**)](#carla.Map.transform_to_geolocation) <sub>_Method_</sub>
- [**to_opendrive**(**self**)](#carla.Map.to_opendrive) <sub>_Method_</sub>
- [**save_to_disk**(**self**, **path**)](#carla.Map.save_to_disk) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.Map.__str__) <sub>_Method_</sub>
- [**Rotation**](#carla.Rotation) <sub>_Class_</sub>
- [**pitch**](#carla.Rotation.pitch) <sub>_Instance variable_</sub>
- [**yaw**](#carla.Rotation.yaw) <sub>_Instance variable_</sub>
- [**roll**](#carla.Rotation.roll) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **pitch**=0.0, **yaw**=0.0, **roll**=0.0)](#carla.Rotation.__init__) <sub>_Method_</sub>
- [**get_forward_vector**(**self**)](#carla.Rotation.get_forward_vector) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.Rotation.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.Rotation.__ne__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.Rotation.__str__) <sub>_Method_</sub>
- [**Timestamp**](#carla.Timestamp) <sub>_Class_</sub>
- [**frame**](#carla.Timestamp.frame) <sub>_Instance variable_</sub>
- [**elapsed_seconds**](#carla.Timestamp.elapsed_seconds) <sub>_Instance variable_</sub>
- [**delta_seconds**](#carla.Timestamp.delta_seconds) <sub>_Instance variable_</sub>
- [**platform_timestamp**](#carla.Timestamp.platform_timestamp) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **frame**, **elapsed_seconds**, **delta_seconds**, **platform_timestamp**)](#carla.Timestamp.__init__) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.Timestamp.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.Timestamp.__ne__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.Timestamp.__str__) <sub>_Method_</sub>
- [**TrafficSign**](#carla.TrafficSign) <sub>_Class_</sub>
- [**trigger_volume**](#carla.TrafficSign.trigger_volume) <sub>_Instance variable_</sub>
- [**Transform**](#carla.Transform) <sub>_Class_</sub>
- [**location**](#carla.Transform.location) <sub>_Instance variable_</sub>
- [**rotation**](#carla.Transform.rotation) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **location**, **rotation**)](#carla.Transform.__init__) <sub>_Method_</sub>
- [**transform**(**self**, **in_point**)](#carla.Transform.transform) <sub>_Method_</sub>
- [**get_forward_vector**(**self**)](#carla.Transform.get_forward_vector) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.Transform.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.Transform.__ne__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.Transform.__str__) <sub>_Method_</sub>
- [**Vector2D**](#carla.Vector2D) <sub>_Class_</sub>
- [**x**](#carla.Vector2D.x) <sub>_Instance variable_</sub>
- [**y**](#carla.Vector2D.y) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **x**=0.0, **y**=0.0)](#carla.Vector2D.__init__) <sub>_Method_</sub>
- [**\__add__**(**self**, **other**)](#carla.Vector2D.__add__) <sub>_Method_</sub>
- [**\__mul__**(**self**, **other**)](#carla.Vector2D.__mul__) <sub>_Method_</sub>
- [**\__sub__**(**self**, **other**)](#carla.Vector2D.__sub__) <sub>_Method_</sub>
- [**\__truediv__**(**self**, **other**)](#carla.Vector2D.__truediv__) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.Vector2D.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.Vector2D.__ne__) <sub>_Method_</sub>
- [**\__self__**(**self**)](#carla.Vector2D.__self__) <sub>_Method_</sub>
- [**Vector3D**](#carla.Vector3D) <sub>_Class_</sub>
- [**x**](#carla.Vector3D.x) <sub>_Instance variable_</sub>
- [**y**](#carla.Vector3D.y) <sub>_Instance variable_</sub>
- [**z**](#carla.Vector3D.z) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **x**=0.0, **y**=0.0, **z**=0.0)](#carla.Vector3D.__init__) <sub>_Method_</sub>
- [**\__add__**(**self**, **other**)](#carla.Vector3D.__add__) <sub>_Method_</sub>
- [**\__mul__**(**self**, **other**)](#carla.Vector3D.__mul__) <sub>_Method_</sub>
- [**\__sub__**(**self**, **other**)](#carla.Vector3D.__sub__) <sub>_Method_</sub>
- [**\__truediv__**(**self**, **other**)](#carla.Vector3D.__truediv__) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.Vector3D.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.Vector3D.__ne__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.Vector3D.__str__) <sub>_Method_</sub>
- [**VehicleControl**](#carla.VehicleControl) <sub>_Class_</sub>
- [**throttle**](#carla.VehicleControl.throttle) <sub>_Instance variable_</sub>
- [**steer**](#carla.VehicleControl.steer) <sub>_Instance variable_</sub>
- [**brake**](#carla.VehicleControl.brake) <sub>_Instance variable_</sub>
- [**hand_brake**](#carla.VehicleControl.hand_brake) <sub>_Instance variable_</sub>
- [**reverse**](#carla.VehicleControl.reverse) <sub>_Instance variable_</sub>
- [**manual_gear_shift**](#carla.VehicleControl.manual_gear_shift) <sub>_Instance variable_</sub>
- [**gear**](#carla.VehicleControl.gear) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **throttle**=0.0, **steer**=0.0, **brake**=0.0, **hand_brake**=True, **reverse**=True, **manual_gear_shift**=True, **gear**=0)](#carla.VehicleControl.__init__) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.VehicleControl.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.VehicleControl.__ne__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.VehicleControl.__str__) <sub>_Method_</sub>
- [**VehiclePhysicsControl**](#carla.VehiclePhysicsControl) <sub>_Class_</sub>
- [**torque_curve**](#carla.VehiclePhysicsControl.torque_curve) <sub>_Instance variable_</sub>
- [**max_rpm**](#carla.VehiclePhysicsControl.max_rpm) <sub>_Instance variable_</sub>
- [**moi**](#carla.VehiclePhysicsControl.moi) <sub>_Instance variable_</sub>
- [**damping_rate_full_throttle**](#carla.VehiclePhysicsControl.damping_rate_full_throttle) <sub>_Instance variable_</sub>
- [**damping_rate_zero_throttle_clutch_engaged**](#carla.VehiclePhysicsControl.damping_rate_zero_throttle_clutch_engaged) <sub>_Instance variable_</sub>
- [**damping_rate_zero_throttle_clutch_disengaged**](#carla.VehiclePhysicsControl.damping_rate_zero_throttle_clutch_disengaged) <sub>_Instance variable_</sub>
- [**use_gear_autobox**](#carla.VehiclePhysicsControl.use_gear_autobox) <sub>_Instance variable_</sub>
- [**gear_switch_time**](#carla.VehiclePhysicsControl.gear_switch_time) <sub>_Instance variable_</sub>
- [**clutch_strength**](#carla.VehiclePhysicsControl.clutch_strength) <sub>_Instance variable_</sub>
- [**final_ratio**](#carla.VehiclePhysicsControl.final_ratio) <sub>_Instance variable_</sub>
- [**forward_gears**](#carla.VehiclePhysicsControl.forward_gears) <sub>_Instance variable_</sub>
- [**mass**](#carla.VehiclePhysicsControl.mass) <sub>_Instance variable_</sub>
- [**drag_coefficient**](#carla.VehiclePhysicsControl.drag_coefficient) <sub>_Instance variable_</sub>
- [**center_of_mass**](#carla.VehiclePhysicsControl.center_of_mass) <sub>_Instance variable_</sub>
- [**steering_curve**](#carla.VehiclePhysicsControl.steering_curve) <sub>_Instance variable_</sub>
- [**wheels**](#carla.VehiclePhysicsControl.wheels) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **torque_curve**=[[0.0, 500.0], [5000.0, 500.0]], **max_rpm**=5000.0, **moi**=1.0, **damping_rate_full_throttle**=0.15, **damping_rate_zero_throttle_clutch_engaged**=2.0, **damping_rate_zero_throttle_clutch_disengaged**=0.35, **use_gear_autobox**=True, **gear_switch_time**=0.5, **clutch_strength**=10.0, **final_ratio**=4.0, **forward_gears**=list(), **mass**=1000.0, **drag_coefficient**=0.3, **center_of_mass**=[0.0, 0.0, 0.0], **steering_curve**=[[0.0, 1.0], [10.0, 0.5]], **wheels**=list())](#carla.VehiclePhysicsControl.__init__) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.VehiclePhysicsControl.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.VehiclePhysicsControl.__ne__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.VehiclePhysicsControl.__str__) <sub>_Method_</sub>
- [**WalkerAIController**](#carla.WalkerAIController) <sub>_Class_</sub>
- [**start**(**self**)](#carla.WalkerAIController.start) <sub>_Method_</sub>
- [**stop**(**self**)](#carla.WalkerAIController.stop) <sub>_Method_</sub>
- [**go_to_location**(**self**, **destination**)](#carla.WalkerAIController.go_to_location) <sub>_Method_</sub>
- [**set_max_speed**(**self**, **speed**=1.4)](#carla.WalkerAIController.set_max_speed) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.WalkerAIController.__str__) <sub>_Method_</sub>
- [**WalkerBoneControl**](#carla.WalkerBoneControl) <sub>_Class_</sub>
- [**bone_transforms**](#carla.WalkerBoneControl.bone_transforms) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **list(name,transform)**)](#carla.WalkerBoneControl.__init__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.WalkerBoneControl.__str__) <sub>_Method_</sub>
- [**WalkerControl**](#carla.WalkerControl) <sub>_Class_</sub>
- [**direction**](#carla.WalkerControl.direction) <sub>_Instance variable_</sub>
- [**speed**](#carla.WalkerControl.speed) <sub>_Instance variable_</sub>
- [**jump**](#carla.WalkerControl.jump) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **direction**=[1.0, 0.0, 0.0], **speed**=0.0, **jump**=False)](#carla.WalkerControl.__init__) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.WalkerControl.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.WalkerControl.__ne__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.WalkerControl.__str__) <sub>_Method_</sub>
- [**Waypoint**](#carla.Waypoint) <sub>_Class_</sub>
- [**id**](#carla.Waypoint.id) <sub>_Instance variable_</sub>
- [**transform**](#carla.Waypoint.transform) <sub>_Instance variable_</sub>
- [**is_intersection**](#carla.Waypoint.is_intersection) <sub>_Instance variable_</sub>
- [**is_junction**](#carla.Waypoint.is_junction) <sub>_Instance variable_</sub>
- [**lane_width**](#carla.Waypoint.lane_width) <sub>_Instance variable_</sub>
- [**road_id**](#carla.Waypoint.road_id) <sub>_Instance variable_</sub>
- [**section_id**](#carla.Waypoint.section_id) <sub>_Instance variable_</sub>
- [**lane_id**](#carla.Waypoint.lane_id) <sub>_Instance variable_</sub>
- [**s**](#carla.Waypoint.s) <sub>_Instance variable_</sub>
- [**lane_change**](#carla.Waypoint.lane_change) <sub>_Instance variable_</sub>
- [**lane_type**](#carla.Waypoint.lane_type) <sub>_Instance variable_</sub>
- [**right_lane_marking**](#carla.Waypoint.right_lane_marking) <sub>_Instance variable_</sub>
- [**left_lane_marking**](#carla.Waypoint.left_lane_marking) <sub>_Instance variable_</sub>
- [**next**(**self**, **distance**)](#carla.Waypoint.next) <sub>_Method_</sub>
- [**get_right_lane**(**self**)](#carla.Waypoint.get_right_lane) <sub>_Method_</sub>
- [**get_left_lane**(**self**)](#carla.Waypoint.get_left_lane) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.Waypoint.__str__) <sub>_Method_</sub>
- [**WeatherParameters**](#carla.WeatherParameters) <sub>_Class_</sub>
- [**cloudiness**](#carla.WeatherParameters.cloudiness) <sub>_Instance variable_</sub>
- [**precipitation**](#carla.WeatherParameters.precipitation) <sub>_Instance variable_</sub>
- [**precipitation_deposits**](#carla.WeatherParameters.precipitation_deposits) <sub>_Instance variable_</sub>
- [**wind_intensity**](#carla.WeatherParameters.wind_intensity) <sub>_Instance variable_</sub>
- [**sun_azimuth_angle**](#carla.WeatherParameters.sun_azimuth_angle) <sub>_Instance variable_</sub>
- [**sun_altitude_angle**](#carla.WeatherParameters.sun_altitude_angle) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **cloudiness**=0.0, **precipitation**=0.0, **precipitation_deposits**=0.0, **wind_intensity**=0.0, **sun_azimuth_angle**=0.0, **sun_altitude_angle**=0.0)](#carla.WeatherParameters.__init__) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.WeatherParameters.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.WeatherParameters.__ne__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.WeatherParameters.__str__) <sub>_Method_</sub>
- [**WheelPhysicsControl**](#carla.WheelPhysicsControl) <sub>_Class_</sub>
- [**tire_friction**](#carla.WheelPhysicsControl.tire_friction) <sub>_Instance variable_</sub>
- [**damping_rate**](#carla.WheelPhysicsControl.damping_rate) <sub>_Instance variable_</sub>
- [**max_steer_angle**](#carla.WheelPhysicsControl.max_steer_angle) <sub>_Instance variable_</sub>
- [**radius**](#carla.WheelPhysicsControl.radius) <sub>_Instance variable_</sub>
- [**max_brake_torque**](#carla.WheelPhysicsControl.max_brake_torque) <sub>_Instance variable_</sub>
- [**max_handbrake_torque**](#carla.WheelPhysicsControl.max_handbrake_torque) <sub>_Instance variable_</sub>
- [**position**](#carla.WheelPhysicsControl.position) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **tire_friction**=2.0, **damping_rate**=0.25, **max_steer_angle**=70.0, **radius**=30.0, **max_brake_torque**=1500.0, **max_handbrake_torque**=3000.0, **position**=(0.0,0.0,0.0))](#carla.WheelPhysicsControl.__init__) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.WheelPhysicsControl.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.WheelPhysicsControl.__ne__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.WheelPhysicsControl.__str__) <sub>_Method_</sub>
- [**World**](#carla.World) <sub>_Class_</sub>
- [**id**](#carla.World.id) <sub>_Instance variable_</sub>
- [**debug**](#carla.World.debug) <sub>_Instance variable_</sub>
- [**get_blueprint_library**(**self**)](#carla.World.get_blueprint_library) <sub>_Method_</sub>
- [**get_map**(**self**)](#carla.World.get_map) <sub>_Method_</sub>
- [**get_spectator**(**self**)](#carla.World.get_spectator) <sub>_Method_</sub>
- [**get_settings**(**self**)](#carla.World.get_settings) <sub>_Method_</sub>
- [**apply_settings**(**self**, **world_settings**)](#carla.World.apply_settings) <sub>_Method_</sub>
- [**get_weather**(**self**)](#carla.World.get_weather) <sub>_Method_</sub>
- [**set_weather**(**self**, **weather**)](#carla.World.set_weather) <sub>_Method_</sub>
- [**get_snapshot**(**self**)](#carla.World.get_snapshot) <sub>_Method_</sub>
- [**get_actor**(**self**, **actor_id**)](#carla.World.get_actor) <sub>_Method_</sub>
- [**get_actors**(**self**)](#carla.World.get_actors) <sub>_Method_</sub>
- [**spawn_actor**(**self**, **blueprint**, **transform**, **attach_to**=None, **attachment**=Rigid)](#carla.World.spawn_actor) <sub>_Method_</sub>
- [**try_spawn_actor**(**self**, **blueprint**, **transform**, **attach_to**=None, **attachment**=Rigid)](#carla.World.try_spawn_actor) <sub>_Method_</sub>
- [**wait_for_tick**(**self**, **seconds**=10.0)](#carla.World.wait_for_tick) <sub>_Method_</sub>
- [**on_tick**(**self**, **callback**)](#carla.World.on_tick) <sub>_Method_</sub>
- [**remove_on_tick**(**self**, **callback_id**)](#carla.World.remove_on_tick) <sub>_Method_</sub>
- [**tick**(**self**)](#carla.World.tick) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.World.__str__) <sub>_Method_</sub>
- [**WorldSettings**](#carla.WorldSettings) <sub>_Class_</sub>
- [**synchronous_mode**](#carla.WorldSettings.synchronous_mode) <sub>_Instance variable_</sub>
- [**no_rendering_mode**](#carla.WorldSettings.no_rendering_mode) <sub>_Instance variable_</sub>
- [**fixed_delta_seconds**](#carla.WorldSettings.fixed_delta_seconds) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **synchronous_mode**=False, **no_rendering_mode**=False, **fixed_delta_seconds**=0.0)](#carla.WorldSettings.__init__) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.WorldSettings.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.WorldSettings.__ne__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.WorldSettings.__str__) <sub>_Method_</sub>
- [**WorldSnapshot**](#carla.WorldSnapshot) <sub>_Class_</sub>
- [**id**](#carla.WorldSnapshot.id) <sub>_Instance variable_</sub>
- [**frame**](#carla.WorldSnapshot.frame) <sub>_Instance variable_</sub>
- [**timestamp**](#carla.WorldSnapshot.timestamp) <sub>_Instance variable_</sub>
- [**has_actor**(**self**, **actor_id**)](#carla.WorldSnapshot.has_actor) <sub>_Method_</sub>
- [**find**(**self**, **actor_id**)](#carla.WorldSnapshot.find) <sub>_Method_</sub>
- [**\__len__**(**self**)](#carla.WorldSnapshot.__len__) <sub>_Method_</sub>
- [**\__iter__**(**self**)](#carla.WorldSnapshot.__iter__) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.WorldSnapshot.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.WorldSnapshot.__ne__) <sub>_Method_</sub>
- [**\__self__**(**self**)](#carla.WorldSnapshot.__self__) <sub>_Method_</sub>
- [**GnssEvent**](#carla.GnssEvent) <sub>_Class_</sub>
- [**latitude**](#carla.GnssEvent.latitude) <sub>_Instance variable_</sub>
- [**longitude**](#carla.GnssEvent.longitude) <sub>_Instance variable_</sub>
- [**altitude**](#carla.GnssEvent.altitude) <sub>_Instance variable_</sub>
- [**\__str__**(**self**)](#carla.GnssEvent.__str__) <sub>_Method_</sub>
- [**Image**](#carla.Image) <sub>_Class_</sub>
- [**width**](#carla.Image.width) <sub>_Instance variable_</sub>
- [**height**](#carla.Image.height) <sub>_Instance variable_</sub>
- [**fov**](#carla.Image.fov) <sub>_Instance variable_</sub>
- [**raw_data**](#carla.Image.raw_data) <sub>_Instance variable_</sub>
- [**convert**(**self**, **color_converter**)](#carla.Image.convert) <sub>_Method_</sub>
- [**save_to_disk**(**self**, **path**, **color_converter**=Raw)](#carla.Image.save_to_disk) <sub>_Method_</sub>
- [**\__len__**(**self**)](#carla.Image.__len__) <sub>_Method_</sub>
- [**\__iter__**(**self**)](#carla.Image.__iter__) <sub>_Method_</sub>
- [**\__getitem__**(**self**, **pos**)](#carla.Image.__getitem__) <sub>_Method_</sub>
- [**\__setitem__**(**self**, **pos**, **color**)](#carla.Image.__setitem__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.Image.__str__) <sub>_Method_</sub>
- [**LaneInvasionEvent**](#carla.LaneInvasionEvent) <sub>_Class_</sub>
- [**actor**](#carla.LaneInvasionEvent.actor) <sub>_Instance variable_</sub>
- [**crossed_lane_markings**](#carla.LaneInvasionEvent.crossed_lane_markings) <sub>_Instance variable_</sub>
- [**\__str__**(**self**)](#carla.LaneInvasionEvent.__str__) <sub>_Method_</sub>
- [**LidarMeasurement**](#carla.LidarMeasurement) <sub>_Class_</sub>
- [**horizontal_angle**](#carla.LidarMeasurement.horizontal_angle) <sub>_Instance variable_</sub>
- [**channels**](#carla.LidarMeasurement.channels) <sub>_Instance variable_</sub>
- [**raw_data**](#carla.LidarMeasurement.raw_data) <sub>_Instance variable_</sub>
- [**get_point_count**(**self**, **channel**)](#carla.LidarMeasurement.get_point_count) <sub>_Method_</sub>
- [**save_to_disk**(**self**, **path**)](#carla.LidarMeasurement.save_to_disk) <sub>_Method_</sub>
- [**\__len__**(**self**)](#carla.LidarMeasurement.__len__) <sub>_Method_</sub>
- [**\__iter__**(**self**)](#carla.LidarMeasurement.__iter__) <sub>_Method_</sub>
- [**\__getitem__**(**self**, **pos**)](#carla.LidarMeasurement.__getitem__) <sub>_Method_</sub>
- [**\__setitem__**(**self**, **pos**, **location**)](#carla.LidarMeasurement.__setitem__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.LidarMeasurement.__str__) <sub>_Method_</sub>
- [**Location**](#carla.Location) <sub>_Class_</sub>
- [**x**](#carla.Location.x) <sub>_Instance variable_</sub>
- [**y**](#carla.Location.y) <sub>_Instance variable_</sub>
- [**z**](#carla.Location.z) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **x**=0.0, **y**=0.0, **z**=0.0)](#carla.Location.__init__) <sub>_Method_</sub>
- [**distance**(**self**, **location**)](#carla.Location.distance) <sub>_Method_</sub>
- [**\__eq__**(**self**, **other**)](#carla.Location.__eq__) <sub>_Method_</sub>
- [**\__ne__**(**self**, **other**)](#carla.Location.__ne__) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.Location.__str__) <sub>_Method_</sub>
- [**ObstacleDetectionEvent**](#carla.ObstacleDetectionEvent) <sub>_Class_</sub>
- [**actor**](#carla.ObstacleDetectionEvent.actor) <sub>_Instance variable_</sub>
- [**other_actor**](#carla.ObstacleDetectionEvent.other_actor) <sub>_Instance variable_</sub>
- [**distance**](#carla.ObstacleDetectionEvent.distance) <sub>_Instance variable_</sub>
- [**\__str__**(**self**)](#carla.ObstacleDetectionEvent.__str__) <sub>_Method_</sub>
- [**Sensor**](#carla.Sensor) <sub>_Class_</sub>
- [**is_listening**](#carla.Sensor.is_listening) <sub>_Instance variable_</sub>
- [**listen**(**self**, **callback**)](#carla.Sensor.listen) <sub>_Method_</sub>
- [**stop**(**self**)](#carla.Sensor.stop) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.Sensor.__str__) <sub>_Method_</sub>
- [**TrafficLight**](#carla.TrafficLight) <sub>_Class_</sub>
- [**state**](#carla.TrafficLight.state) <sub>_Instance variable_</sub>
- [**set_state**(**self**, **state**)](#carla.TrafficLight.set_state) <sub>_Method_</sub>
- [**get_state**(**self**)](#carla.TrafficLight.get_state) <sub>_Method_</sub>
- [**set_green_time**(**self**, **green_time**)](#carla.TrafficLight.set_green_time) <sub>_Method_</sub>
- [**get_green_time**(**self**)](#carla.TrafficLight.get_green_time) <sub>_Method_</sub>
- [**set_yellow_time**(**self**, **yellow_time**)](#carla.TrafficLight.set_yellow_time) <sub>_Method_</sub>
- [**get_yellow_time**(**self**)](#carla.TrafficLight.get_yellow_time) <sub>_Method_</sub>
- [**set_red_time**(**self**, **red_time**)](#carla.TrafficLight.set_red_time) <sub>_Method_</sub>
- [**get_red_time**(**self**)](#carla.TrafficLight.get_red_time) <sub>_Method_</sub>
- [**get_elapsed_time**(**self**)](#carla.TrafficLight.get_elapsed_time) <sub>_Method_</sub>
- [**freeze**(**self**, **freeze**)](#carla.TrafficLight.freeze) <sub>_Method_</sub>
- [**is_frozen**(**self**)](#carla.TrafficLight.is_frozen) <sub>_Method_</sub>
- [**get_pole_index**(**self**)](#carla.TrafficLight.get_pole_index) <sub>_Method_</sub>
- [**get_group_traffic_lights**(**self**)](#carla.TrafficLight.get_group_traffic_lights) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.TrafficLight.__str__) <sub>_Method_</sub>
- [**Vehicle**](#carla.Vehicle) <sub>_Class_</sub>
- [**bounding_box**](#carla.Vehicle.bounding_box) <sub>_Instance variable_</sub>
- [**apply_control**(**self**, **control**)](#carla.Vehicle.apply_control) <sub>_Method_</sub>
- [**get_control**(**self**)](#carla.Vehicle.get_control) <sub>_Method_</sub>
- [**apply_physics_control**(**self**, **physics_control**)](#carla.Vehicle.apply_physics_control) <sub>_Method_</sub>
- [**get_physics_control**(**self**)](#carla.Vehicle.get_physics_control) <sub>_Method_</sub>
- [**set_autopilot**(**self**, **enabled**=True)](#carla.Vehicle.set_autopilot) <sub>_Method_</sub>
- [**get_speed_limit**(**self**)](#carla.Vehicle.get_speed_limit) <sub>_Method_</sub>
- [**get_traffic_light_state**(**self**)](#carla.Vehicle.get_traffic_light_state) <sub>_Method_</sub>
- [**is_at_traffic_light**(**self**)](#carla.Vehicle.is_at_traffic_light) <sub>_Method_</sub>
- [**get_traffic_light**(**self**)](#carla.Vehicle.get_traffic_light) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.Vehicle.__str__) <sub>_Method_</sub>
- [**Walker**](#carla.Walker) <sub>_Class_</sub>
- [**bounding_box**](#carla.Walker.bounding_box) <sub>_Instance variable_</sub>
- [**apply_control**(**self**, **control**)](#carla.Walker.apply_control) <sub>_Method_</sub>
- [**apply_control**(**self**, **control**)](#carla.Walker.apply_control) <sub>_Method_</sub>
- [**get_control**(**self**)](#carla.Walker.get_control) <sub>_Method_</sub>
- [**\__str__**(**self**)](#carla.Walker.__str__) <sub>_Method_</sub>
- [**command**](#command) <sub>_Module_</sub>
- [**ApplyAngularVelocity**](#command.ApplyAngularVelocity) <sub>_Class_</sub>
- [**actor_id**](#command.ApplyAngularVelocity.actor_id) <sub>_Instance variable_</sub>
- [**angular_velocity**](#command.ApplyAngularVelocity.angular_velocity) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **actor**, **angular_velocity**)](#command.ApplyAngularVelocity.__init__) <sub>_Method_</sub>
- [**ApplyImpulse**](#command.ApplyImpulse) <sub>_Class_</sub>
- [**actor_id**](#command.ApplyImpulse.actor_id) <sub>_Instance variable_</sub>
- [**impulse**](#command.ApplyImpulse.impulse) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **actor**, **impulse**)](#command.ApplyImpulse.__init__) <sub>_Method_</sub>
- [**ApplyTransform**](#command.ApplyTransform) <sub>_Class_</sub>
- [**actor_id**](#command.ApplyTransform.actor_id) <sub>_Instance variable_</sub>
- [**transform**](#command.ApplyTransform.transform) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **actor**, **transform**)](#command.ApplyTransform.__init__) <sub>_Method_</sub>
- [**ApplyVehicleControl**](#command.ApplyVehicleControl) <sub>_Class_</sub>
- [**actor_id**](#command.ApplyVehicleControl.actor_id) <sub>_Instance variable_</sub>
- [**control**](#command.ApplyVehicleControl.control) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **actor**, **control**)](#command.ApplyVehicleControl.__init__) <sub>_Method_</sub>
- [**ApplyVelocity**](#command.ApplyVelocity) <sub>_Class_</sub>
- [**actor_id**](#command.ApplyVelocity.actor_id) <sub>_Instance variable_</sub>
- [**velocity**](#command.ApplyVelocity.velocity) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **actor**, **velocity**)](#command.ApplyVelocity.__init__) <sub>_Method_</sub>
- [**ApplyWalkerControl**](#command.ApplyWalkerControl) <sub>_Class_</sub>
- [**actor_id**](#command.ApplyWalkerControl.actor_id) <sub>_Instance variable_</sub>
- [**control**](#command.ApplyWalkerControl.control) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **actor**, **control**)](#command.ApplyWalkerControl.__init__) <sub>_Method_</sub>
- [**ApplyWalkerState**](#command.ApplyWalkerState) <sub>_Class_</sub>
- [**actor_id**](#command.ApplyWalkerState.actor_id) <sub>_Instance variable_</sub>
- [**transform**](#command.ApplyWalkerState.transform) <sub>_Instance variable_</sub>
- [**speed**](#command.ApplyWalkerState.speed) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **actor**, **transform**, **speed**)](#command.ApplyWalkerState.__init__) <sub>_Method_</sub>
- [**DestroyActor**](#command.DestroyActor) <sub>_Class_</sub>
- [**actor_id**](#command.DestroyActor.actor_id) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **actor**)](#command.DestroyActor.__init__) <sub>_Method_</sub>
- [**Response**](#command.Response) <sub>_Class_</sub>
- [**actor_id**](#command.Response.actor_id) <sub>_Instance variable_</sub>
- [**error**](#command.Response.error) <sub>_Instance variable_</sub>
- [**has_error**(**self**)](#command.Response.has_error) <sub>_Method_</sub>
- [**SetAutopilot**](#command.SetAutopilot) <sub>_Class_</sub>
- [**actor_id**](#command.SetAutopilot.actor_id) <sub>_Instance variable_</sub>
- [**enabled**](#command.SetAutopilot.enabled) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **actor**, **enabled**)](#command.SetAutopilot.__init__) <sub>_Method_</sub>
- [**SetSimulatePhysics**](#command.SetSimulatePhysics) <sub>_Class_</sub>
- [**actor_id**](#command.SetSimulatePhysics.actor_id) <sub>_Instance variable_</sub>
- [**enabled**](#command.SetSimulatePhysics.enabled) <sub>_Instance variable_</sub>
- [**\__init__**(**self**, **actor**, **enabled**)](#command.SetSimulatePhysics.__init__) <sub>_Method_</sub>
- [**SpawnActor**](#command.SpawnActor) <sub>_Class_</sub>
- [**transform**](#command.SpawnActor.transform) <sub>_Instance variable_</sub>
- [**parent_id**](#command.SpawnActor.parent_id) <sub>_Instance variable_</sub>
- [**\__init__**(**self**)](#command.SpawnActor.__init__) <sub>_Method_</sub>
- [**\__init__**(**self**, **blueprint**, **transform**)](#command.SpawnActor.__init__) <sub>_Method_</sub>
- [**\__init__**(**self**, **blueprint**, **transform**, **parent**)](#command.SpawnActor.__init__) <sub>_Method_</sub>
- [**then**(**self**, **command**)](#command.SpawnActor.then) <sub>_Method_</sub>
## carla.ActorAttributeType<a name="carla.ActorAttributeType"></a> <sub><sup>_class_</sup></sub>
Class that defines the type of attribute of a [carla.ActorAttribute](#carla.ActorAttribute).
@ -827,25 +285,27 @@ _</font>
Returns the world this actor belongs to.
- **Return:** _[carla.World](#carla.World)_
- <a name="carla.Actor.get_location"></a>**<font color="#7fb800">get_location</font>**(<font color="#00a6ed">**self**</font>)
Returns the current location of the actor.
Returns the actor's current location.
- **Return:** _[carla.Location](#carla.Location)_
- **Note:** <font color="#8E8E8E">_This function does not call the simulator, it returns the location received in the last tick.
_</font>
- <a name="carla.Actor.get_transform"></a>**<font color="#7fb800">get_transform</font>**(<font color="#00a6ed">**self**</font>)
Returns the current transform of the actor.
Returns the actor's current transform.
- **Return:** _[carla.Transform](#carla.Transform)_
- **Note:** <font color="#8E8E8E">_This function does not call the simulator, it returns the transform received in the last tick.
_</font>
- <a name="carla.Actor.get_velocity"></a>**<font color="#7fb800">get_velocity</font>**(<font color="#00a6ed">**self**</font>)
Returns the current 3D velocity of the actor.
Returns the actor's current 3D velocity.
- **Return:** _[carla.Vector3D](#carla.Vector3D)_
- **Note:** <font color="#8E8E8E">_This function does not call the simulator, it returns the velocity received in the last tick.
_</font>
- <a name="carla.Actor.get_angular_velocity"></a>**<font color="#7fb800">get_angular_velocity</font>**(<font color="#00a6ed">**self**</font>)
Returns the current 3D angular velocity of the actor.
Returns the actor's current 3D angular velocity.
- **Return:** _[carla.Vector3D](#carla.Vector3D)_
- **Note:** <font color="#8E8E8E">_This function does not call the simulator, it returns the angular velocity received in the last tick.
_</font>
- <a name="carla.Actor.get_acceleration"></a>**<font color="#7fb800">get_acceleration</font>**(<font color="#00a6ed">**self**</font>)
Returns the current 3D acceleration of the actor.
Returns the actor's current 3D acceleration.
- **Return:** _[carla.Vector3D](#carla.Vector3D)_
- **Note:** <font color="#8E8E8E">_This function does not call the simulator, it returns the acceleration received in the last tick.
_</font>
@ -883,7 +343,7 @@ Class that defines an attribute of a [carla.ActorBlueprint](#carla.ActorBlueprin
<h3>Instance Variables</h3>
- <a name="carla.ActorAttribute.id"></a>**<font color="#f8805a">id</font>** (_str_)
String identifier of the attribute.
The attribute's identifier.
- <a name="carla.ActorAttribute.type"></a>**<font color="#f8805a">type</font>** (_[carla.ActorAttributeType](#carla.ActorAttributeType)_)
The attribute parameter type.
- <a name="carla.ActorAttribute.recommended_values"></a>**<font color="#f8805a">recommended_values</font>** (_list(str)_)
@ -962,20 +422,20 @@ Class that provides access to the data of a [carla.Actor](#carla.Actor) in a [ca
<h3>Instance Variables</h3>
- <a name="carla.ActorSnapshot.id"></a>**<font color="#f8805a">id</font>** (_int_)
Identifier of the actor snapshot.
The ActorSnapshot's identifier.
<h3>Methods</h3>
- <a name="carla.ActorSnapshot.get_transform"></a>**<font color="#7fb800">get_transform</font>**(<font color="#00a6ed">**self**</font>)
Returns the current transform of the actor.
Returns the actor's current transform.
- **Return:** _[carla.Transform](#carla.Transform)_
- <a name="carla.ActorSnapshot.get_velocity"></a>**<font color="#7fb800">get_velocity</font>**(<font color="#00a6ed">**self**</font>)
Returns the current 3D velocity of the actor.
Returns the actor's current 3D velocity.
- **Return:** _[carla.Vector3D](#carla.Vector3D)_
- <a name="carla.ActorSnapshot.get_angular_velocity"></a>**<font color="#7fb800">get_angular_velocity</font>**(<font color="#00a6ed">**self**</font>)
Returns the current 3D angular velocity of the actor.
Returns the actor's current 3D angular velocity.
- **Return:** _[carla.Vector3D](#carla.Vector3D)_
- <a name="carla.ActorSnapshot.get_acceleration"></a>**<font color="#7fb800">get_acceleration</font>**(<font color="#00a6ed">**self**</font>)
Returns the current 3D acceleration of the actor.
Returns the actor's current 3D acceleration.
- **Return:** _[carla.Vector3D](#carla.Vector3D)_
- <a name="carla.ActorSnapshot.__self__"></a>**<font color="#7fb800">\__self__</font>**(<font color="#00a6ed">**self**</font>)
@ -1828,7 +1288,7 @@ Class that represents the state of every actor in the simulation at a single fra
<h3>Instance Variables</h3>
- <a name="carla.WorldSnapshot.id"></a>**<font color="#f8805a">id</font>** (_int_)
Identifier of the WorldSnapshot.
The WorldSnapshot's identifier.
- <a name="carla.WorldSnapshot.frame"></a>**<font color="#f8805a">frame</font>** (_int_)
Frame number.
- <a name="carla.WorldSnapshot.timestamp"></a>**<font color="#f8805a">timestamp</font>** (_[carla.Timestamp](#carla.Timestamp)_)
@ -2093,7 +1553,7 @@ A vehicle actor.
<h3>Instance Variables</h3>
- <a name="carla.Vehicle.bounding_box"></a>**<font color="#f8805a">bounding_box</font>** (_[carla.BoundingBox](#carla.BoundingBox)_)
The bounding box of the vehicle.
The vehicle's bounding box.
<h3>Methods</h3>
- <a name="carla.Vehicle.apply_control"></a>**<font color="#7fb800">apply_control</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**control**</font>)
@ -2145,7 +1605,7 @@ A walking actor, pedestrian.
<h3>Instance Variables</h3>
- <a name="carla.Walker.bounding_box"></a>**<font color="#f8805a">bounding_box</font>** (_[carla.BoundingBox](#carla.BoundingBox)_)
The bounding box of the walker.
The walker's bounding box.
<h3>Methods</h3>
- <a name="carla.Walker.apply_control"></a>**<font color="#7fb800">apply_control</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**control**</font>)

View File

@ -108,8 +108,9 @@ actor = world.spawn_actor(blueprint, transform)
```
The spawn actor function comes in two flavours, [`spawn_actor`](python_api.md#carla.World.spawn_actor) and
[`try_spawn_actor`](python_api.md#carla.World.try_spawn_actor). The former will raise an exception if the actor could not be
spawned, the later will return `None` instead. The most typical cause of
[`try_spawn_actor`](python_api.md#carla.World.try_spawn_actor).
The former will raise an exception if the actor could not be spawned,
the later will return `None` instead. The most typical cause of
failure is collision at spawn point, meaning the actor does not fit at the spot
we chose; probably another vehicle is in that spot or we tried to spawn into a
static object.
@ -180,8 +181,8 @@ by providing throttle, break, and steer values
vehicle.apply_control(carla.VehicleControl(throttle=1.0, steer=-1.0))
```
These are all the parameters of the [`VehicleControl`](python_api.md#carla.VehicleControl) object and their default
values
These are all the parameters of the [`VehicleControl`](python_api.md#carla.VehicleControl)
object and their default values
```py
carla.VehicleControl(
@ -195,11 +196,15 @@ carla.VehicleControl(
```
Also, physics control properties can be tuned for vehicles and its wheels
```py
vehicle.apply_physics_control(carla.VehiclePhysicsControl(max_rpm = 5000.0, center_of_mass = carla.Vector3D(0.0, 0.0, 0.0), torque_curve=[[0,400],[5000,400]]))
```
These properties are controlled through a [`VehiclePhysicsControl`](python_api.md#carla.VehiclePhysicsControl) object, which also contains a property to control each wheel's physics through a [`WheelPhysicsControl`](python_api.md#carla.WheelPhysicsControl) object.
These properties are controlled through a
[`VehiclePhysicsControl`](python_api.md#carla.VehiclePhysicsControl) object,
which also contains a property to control each wheel's physics through a
[`WheelPhysicsControl`](python_api.md#carla.WheelPhysicsControl) object.
```py
carla.VehiclePhysicsControl(
@ -218,13 +223,18 @@ carla.VehiclePhysicsControl(
steering_curve,
wheels)
```
Where:
- *torque_curve*: Curve that indicates the torque measured in Nm for a specific revolutions per minute of the vehicle's engine
- *torque_curve*: Curve that indicates the torque measured in Nm for a specific revolutions
per minute of the vehicle's engine
- *max_rpm*: The maximum revolutions per minute of the vehicle's engine
- *moi*: The moment of inertia of the vehicle's engine
- *damping_rate_full_throttle*: Damping rate when the throttle is maximum.
- *damping_rate_zero_throttle_clutch_engaged*: Damping rate when the thottle is zero with clutch engaged
- *damping_rate_zero_throttle_clutch_disengaged*: Damping rate when the thottle is zero with clutch disengaged
- *damping_rate_zero_throttle_clutch_engaged*: Damping rate when the thottle is zero
with clutch engaged
- *damping_rate_zero_throttle_clutch_disengaged*: Damping rate when the thottle is zero
with clutch disengaged
- *use_gear_autobox*: If true, the vehicle will have automatic transmission
- *gear_switch_time*: Switching time between gears
@ -327,7 +337,8 @@ for speed_sign in actor_list.filter('traffic.speed_limit.*'):
Among the actors you can find in this list are
* **Traffic lights** with a [`state`](python_api.md#carla.TrafficLight.state) property to check the light's current state.
* **Traffic lights** with a [`state`](python_api.md#carla.TrafficLight.state) property
to check the light's current state.
* **Speed limit signs** with the speed codified in their type_id.
* The **Spectator** actor that can be used to move the view of the simulator window.
@ -359,7 +370,10 @@ The full list of presets can be found in the
### World Snapshot
A world snapshot represents the state of every actor in the simulation at a single frame, a sort of still image of the world with a timestamp. With this feature it is possible to record the location of every actor and make sure all of them were captured at the same frame without the need of using synchronous mode.
A world snapshot represents the state of every actor in the simulation at a single frame,
a sort of still image of the world with a timestamp. With this feature it is possible to
record the location of every actor and make sure all of them were captured at the same
frame without the need of using synchronous mode.
```py
# Retrieve a snapshot of the world at this point in time.
@ -372,7 +386,10 @@ world_snapshot = world.wait_for_tick()
world.on_tick(lambda world_snapshot: do_something(world_snapshot))
```
The world snapshot contains a timestamp and a list of actor snapshots. Actor snapshots do not allow to operate on the actor directly as they only contain data about the physical state of the actor, but you can use their id to retrieve the actual actor. And the other way around, you can look up snapshots by id (average O(1) complexity).
The world snapshot contains a timestamp and a list of actor snapshots. Actor snapshots do not
allow to operate on the actor directly as they only contain data about the physical state of
the actor, but you can use their id to retrieve the actual actor. And the other way around,
you can look up snapshots by id (average O(1) complexity).
```py
timestamp = world_snapshot.timestamp
@ -410,26 +427,28 @@ Let's start by getting the map of the current world
map = world.get_map()
```
For starters, the map has a [`name`](python_api.md#carla.Map.name) attribute that matches the name of the
currently loaded city, e.g. Town01. And, as we've seen before, we can also ask
For starters, the map has a [`name`](python_api.md#carla.Map.name) attribute that matches
the name of the currently loaded city, e.g. Town01. And, as we've seen before, we can also ask
the map to provide a list of recommended locations for spawning vehicles,
[`map.get_spawn_points()`](python_api.md#carla.Map.get_spawn_points).
However, the real power of this map API comes apparent when we introduce
[`waypoints`](python_api.md#carla.Waypoint). We can tell the map to give us a waypoint on the road closest to our
vehicle
[`waypoints`](python_api.md#carla.Waypoint). We can tell the map to give us a waypoint on
the road closest to our vehicle
```py
waypoint = map.get_waypoint(vehicle.get_location())
```
This waypoint's [`transform`](python_api.md#carla.Waypoint.transform) is located on a drivable lane, and it's oriented
according to the road direction at that point.
This waypoint's [`transform`](python_api.md#carla.Waypoint.transform) is located on a drivable lane,
and it's oriented according to the road direction at that point.
Waypoints have their unique identifier [`carla.Waypoint.id`](python_api.md#carla.Waypoint.id) based on the hash of its
[`road_id`](python_api.md#carla.Waypoint.road_id), [`section_id`](python_api.md#carla.Waypoint.section_id),
Waypoints have their unique identifier [`carla.Waypoint.id`](python_api.md#carla.Waypoint.id)
based on the hash of its [`road_id`](python_api.md#carla.Waypoint.road_id),
[`section_id`](python_api.md#carla.Waypoint.section_id),
[`lane_id`](python_api.md#carla.Waypoint.lane_id) and [`s`](python_api.md#carla.Waypoint.s).
They also provide more information about lanes, such as the [`lane_type`](python_api.md#carla.Waypoint.lane_type) of the current waypoint
They also provide more information about lanes, such as the
[`lane_type`](python_api.md#carla.Waypoint.lane_type) of the current waypoint
and if a [`lane_change`](python_api.md#carla.Waypoint.lane_change) is possible and in which direction.
```py
@ -441,8 +460,10 @@ lane_type = waypoint.lane_type
lane_change = waypoint.lane_change
```
Surrounding lane markings _(right / left)_ can also be accessed through the waypoint API. Therefore, it is possible to know all the information
provided by a [`carla.LaneMarking`](python_api.md#carla.LaneMarking), like the lane marking [`type`](python_api.md#carla.LaneMarkingType) and its
Surrounding lane markings _(right / left)_ can also be accessed through the waypoint API.
Therefore, it is possible to know all the information provided by a
[`carla.LaneMarking`](python_api.md#carla.LaneMarking),
like the lane marking [`type`](python_api.md#carla.LaneMarkingType) and its
[`lane_change`](python_api.md#carla.LaneChange) availability.
```py
@ -494,7 +515,10 @@ converted to OpenDrive format, and saved to disk as such.
### Recording and Replaying system
CARLA includes now a recording and replaying API, that allows to record a simulation in a file and later replay that simulation. The file is written on server side only, and it includes which **actors are created or destroyed** in the simulation, the **state of the traffic lights** and the **position** and **orientation** of all vehicles and pedestrians.
CARLA includes now a recording and replaying API, that allows to record a simulation in a file and
later replay that simulation. The file is written on server side only, and it includes which
**actors are created or destroyed** in the simulation, the **state of the traffic lights**
and the **position** and **orientation** of all vehicles and pedestrians.
To start recording we only need to supply a file name:
@ -530,7 +554,8 @@ blueprintsWalkers = world.get_blueprint_library().filter("walker.pedestrian.*")
walker_bp = random.choice(blueprintsWalkers)
```
We can **get a list of random points** where to spawn the pedestrians. Those points are always from the areas where the pedestrian can walk:
We can **get a list of random points** where to spawn the pedestrians. Those points are always
from the areas where the pedestrian can walk:
```py
# 1. take all the random locations to spawn
@ -561,7 +586,8 @@ for i in range(len(results)):
walkers_list.append({"id": results[i].actor_id})
```
We save the id of each walker from the results of the batch, in a dictionary because we will assign to them also a controller.
We save the id of each walker from the results of the batch, in a dictionary because we will
assign to them also a controller.
We need to **create the controller** that will manage the pedestrian automatically:
```py
@ -582,7 +608,9 @@ for i in range(len(results)):
We create the controller as child of the walker, so the location we pass is (0,0,0).
At this point we have a list of pedestrians with a controller each one, but we need to get the actual actor from the id. Because the controller is a child of the pedestrian, we need to **put all id in the same list** so the parent can find the child in the same list.
At this point we have a list of pedestrians with a controller each one, but we need to get
the actual actor from the id. Because the controller is a child of the pedestrian,
we need to **put all id in the same list** so the parent can find the child in the same list.
```py
# 4. we put altogether the walkers and controllers id to get the objects from their id
@ -591,14 +619,18 @@ for i in range(len(walkers_list)):
all_id.append(walkers_list[i]["id"])
all_actors = world.get_actors(all_id)
```
The list all_actors has now all the actor objects we created.
At this point is a good idea to **wait for a tick** on client, because then the server has time to send all new data about the new actors we just created (we need the transform of each one updated). So we can do a call like:
At this point is a good idea to **wait for a tick** on client, because then the server has
time to send all new data about the new actors we just created (we need the transform of
each one updated). So we can do a call like:
```py
# wait for a tick to ensure client receives the last transform of the walkers we have just created
world.wait_for_tick()
```
After that, our client has the data about the actors updated.
**Using the controller** we can set the locations where we want each pedestrian walk to:
@ -614,13 +646,15 @@ for i in range(0, len(all_actors), 2):
all_actors[i].set_max_speed(1 + random.random()) # max speed between 1 and 2 (default is 1.4 m/s)
```
There we have set at each pedestrian (through its controller) a random point and random speed. When they reach the target point then automatically walk to another random point.
There we have set at each pedestrian (through its controller) a random point and random speed.
When they reach the target point then automatically walk to another random point.
If the target point is not reachable, then they reach the closest point from the are where they are.
![pedestrian sample](img/pedestrians_shoot.png)
To **destroy the pedestrians**, we need to stop them from the navigation, and then destroy the objects (actor and controller):
To **destroy the pedestrians**, we need to stop them from the navigation,
and then destroy the objects (actor and controller):
```py
# stop pedestrians (list is [controller, actor, controller, actor ...])

View File

@ -1,11 +1,11 @@
<h1> Python Cookbook </h1>
This section contains a list of recipes that complement the [tutorial](../python_api_tutorial/) and are used to
illustrate the use of Python API methods.
This section contains a list of recipes that complement the [tutorial](../python_api_tutorial/)
and are used to illustrate the use of Python API methods.
Each recipe has a list of [python API classes](../python_api/), which is divided into those in which the recipe is centered,
and those that need to be used.
Each recipe has a list of [python API classes](../python_api/),
which is divided into those in which the recipe is centered, and those that need to be used.
There are more recipes to come!
@ -95,8 +95,8 @@ camera_bp.set_attribute('image_size_y', 600)
## Converted Image Recipe
This recipe applies a color conversion to the image taken by a camera sensor, so it is converted to a
semantic segmentation image.
This recipe applies a color conversion to the image taken by a camera sensor,
so it is converted to a semantic segmentation image.
Focused on:<br>
[`carla.ColorConverter`](../python_api/#carla.ColorConverter)<br>
@ -172,7 +172,8 @@ for actor_snapshot in world_snapshot:
## Debug Vehicle Trail Recipe
This recipe is a modification of [`lane_explorer.py`](https://github.com/carla-simulator/carla/blob/master/PythonAPI/util/lane_explorer.py) example.
This recipe is a modification of
[`lane_explorer.py`](https://github.com/carla-simulator/carla/blob/master/PythonAPI/util/lane_explorer.py) example.
It draws the path of an actor through the world, printing information at each waypoint.
Focused on:<br>
@ -183,6 +184,7 @@ Focused on:<br>
Used:<br>
[`carla.ActorSnapshot`](../python_api/#carla.ActorSnapshot)<br>
[`carla.Vector3D`](../python_api/#carla.Vector3D)<br>
[`carla.LaneType`](../python_api/#carla.LaneType)<br>
[`carla.Color`](../python_api/#carla.Color)<br>
[`carla.Map`](../python_api/#carla.Map)
@ -192,7 +194,7 @@ current_w = map.get_waypoint(vehicle.get_location())
while True:
next_w = map.get_waypoint(vehicle.get_location(), lane_type=carla.LaneType.Driving | carla.LaneType.Shoulder | carla.LaneType.Sidewalk )
# Check if vehicle is moving
# Check if the vehicle is moving
if next_w.id != current_w.id:
vector = vehicle.get_velocity()
# Check if the vehicle is on a sidewalk
@ -209,7 +211,8 @@ while True:
# ...
```
The image below shows how a vehicle loses control and drives on a sidewalk. The trail shows the path it was following and the speed at each waypoint.
The image below shows how a vehicle loses control and drives on a sidewalk. The trail shows the
path it was following and the speed at each waypoint.
![debug_trail_recipe](img/debug_trail_recipe.png)

View File

@ -1,12 +1,20 @@
### Recording and Replaying system
# Recording and Replaying system
CARLA includes now a recording and replaying API, that allows to record a simulation in a file and later replay that simulation. The file is written on the server side only, and it includes which **actors are created or destroyed** in the simulation, the **state of the traffic lights** and the **position** and **orientation** of all vehicles and pedestrians.
CARLA includes now a recording and replaying API, that allows to record a simulation in a file and
later replay that simulation. The file is written on the server side only, and it includes which
**actors are created or destroyed** in the simulation, the **state of the traffic lights** and
the **position** and **orientation** of all vehicles and pedestrians.
All data is written in a binary file on the server. We can use filenames with or without a path. If we specify a filename without any of `\`, `/` or `:` characters, then it is considered to be only a filename and will be saved on folder **CarlaUE4/Saved**. If we use any of the previous characters then the filename will be considered as an absolute filename with path (for example: `/home/carla/recording01.log` or `c:\records\recording01.log`).
All data is written in a binary file on the server. We can use filenames with or without a path.
If we specify a filename without any of `\`, `/` or `:` characters, then it is considered to be
only a filename and will be saved on folder **CarlaUE4/Saved**. If we use any of the previous
characters then the filename will be considered as an absolute filename with path
(for example: `/home/carla/recording01.log` or `c:\records\recording01.log`).
As an estimate, a simulation with about 150 actors (50 traffic lights, 100 vehicles) for 1h of recording takes around 200 MB in size.
As an estimate, a simulation with about 150 actors (50 traffic lights, 100 vehicles) for 1h
of recording takes around 200 MB in size.
#### Recording
## Recording
To start recording we only need to supply a file name:
```py
@ -18,7 +26,7 @@ To stop the recording, we need to call:
```py
client.stop_recorder()
```
#### Playback
## Playback
At any point we can replay a simulation, specifying the filename:
@ -38,30 +46,41 @@ client.replay_file("recording01.log", start, duration, camera)
E.g. a value of 10 will start the simulation at second 10.
* If the value is negative, it means the number of seconds starting from the end.
E.g. a value of -10 will replay only the last 10 seconds of the simulation.
* **duration**: Amount of seconds we want to play. When the simulation reaches the end, then all actors remaining will have autopilot enabled automatically. The purpose of this parameter is to allow users to replay a piece of a simulation and then let all actors start driving in autopilot again.
* **camera**: Id of an actor where the camera will focus on and follow. To obtain the Ids of the actors, please read right below.
* **duration**: Amount of seconds we want to play. When the simulation reaches the end,
then all actors remaining will have autopilot enabled automatically.
The purpose of this parameter is to allow users to replay a piece of a simulation and then let all
actors start driving in autopilot again.
* **camera**: Id of an actor where the camera will focus on and follow.
To obtain the Ids of the actors, please read right below.
Please note that all vehicles at the end of the playback will be set in autopilot to let them continue driving by themselves, and all pedestrians will be stopped at their current place (we plan to set autopilot for pedestrians also, to walk at random places). This behaviour let's you for example replay a piece of simulation and test how they continue after some changes in the environment.
Please note that all vehicles at the end of the playback will be set in autopilot to let them
continue driving by themselves, and all pedestrians will be stopped at their current place
(we plan to set autopilot for pedestrians also, to walk at random places). This behaviour let's
you for example replay a piece of simulation and test how they continue after some changes
in the environment.
#### Playback time factor (speed)
### Playback time factor (speed)
We can specify the time factor (speed) for the replayer at any moment, using the following API call:
```py
client.set_replayer_time_factor(2.0)
```
A value greater than 1.0 will play in fast motion, and a value below 1.0 will play in slow motion, being 1.0 the default value for normal playback.
A value greater than 1.0 will play in fast motion, and a value below 1.0 will play in slow motion,
being 1.0 the default value for normal playback.
As a performance trick, with values over 2.0 the interpolation of positions is disabled.
E.g. With a time factor of 20x we can see traffic flow:
![flow](img/RecorderFlow2.gif)
Pedestrians' animations will not be affected by this time factor and will remain at normal speed. Therefore, animations are not accurate yet.
Pedestrians' animations will not be affected by this time factor and will remain at normal speed.
Therefore, animations are not accurate yet.
This API call will not stop the replayer in course, it will just change the speed, so you can change that several times while the replayer is running.
This API call will not stop the replayer in course, it will just change the speed,
so you can change that several times while the replayer is running.
#### Info about the recorded file
### Info about the recorded file
We can get details about a recorded simulation, using this API call:
@ -130,13 +149,21 @@ Frame 2354 at 60.3753 seconds
Frames: 2354
Duration: 60.3753 seconds
```
From the previous log, we can retrieve the information regarding the **date** and the **map** where the simulation was recorded.
Each frame will display information about any event that could happen (create or destroy an actor, collisions). When creating actors, it outputs for each of them its corresponding **Id** together with some other additional information. This **Id** is the one we need to specify in the **camera** attribute when replaying if we want to follow that actor during the replay.
At the end, we can see as well the **total time** of the recording and also the number of **frames** that were recorded.
From the previous log, we can retrieve the information regarding the **date** and the **map**
where the simulation was recorded.
Each frame will display information about any event that could happen
(create or destroy an actor, collisions). When creating actors, it outputs for each of them its
corresponding **Id** together with some other additional information. This **Id** is the one we
need to specify in the **camera** attribute when replaying if we want to follow that actor
during the replay.
At the end, we can see as well the **total time** of the recording and also the number
of **frames** that were recorded.
#### Info about collisions
### Info about collisions
In simulations with a **hero actor**, the collisions are automatically saved, so we can query a recorded file to see if any **hero actor** had collisions with some other actor. Currently, the actor types we can use in the query are these:
In simulations with a **hero actor**, the collisions are automatically saved,
so we can query a recorded file to see if any **hero actor** had collisions with some other actor.
Currently, the actor types we can use in the query are these:
* **h** = Hero
* **v** = Vehicle
@ -145,7 +172,8 @@ In simulations with a **hero actor**, the collisions are automatically saved, so
* **o** = Other
* **a** = Any
The collision query needs to know the type of actors involved in the collision. If we do not want to specify it, we can specify **a** (any) for both. These are some examples:
The collision query needs to know the type of actors involved in the collision.
If we do not want to specify it, we can specify **a** (any) for both. These are some examples:
* **a** **a**: Will show all collisions recorded
* **v** **v**: Will show all collisions between vehicles
@ -154,7 +182,8 @@ The collision query needs to know the type of actors involved in the collision.
* **v** **o**: Will show all collisions between a vehicle and other actor, like static meshes
* **h** **w**: Will show all collisions between a hero and a walker
Currently, only **hero actors** record the collisions. Therefore, we have considered that the first actor will be the hero always.
Currently, only **hero actors** record the collisions. Therefore, we have considered that the first
actor will be the hero always.
The API call for querying the collisions is:
@ -177,33 +206,39 @@ Frames: 790
Duration: 46 seconds
```
We can see here that for each collision the **time** when happened, the **type** of the actors involved, and the **id and description** of each actor.
We can see here that for each collision the **time** when happened, the **type** of
the actors involved, and the **id and description** of each actor.
So, if we want to see what happened on that recording for the first collision where the hero actor was colliding with a vehicle, we could use this API call. So for example:
So, if we want to see what happened on that recording for the first collision where the hero
actor was colliding with a vehicle, we could use this API call. So for example:
```py
client.replay_file("col2.log", 13, 0, 122)
```
We have started the replayer just a bit before the time of the collision, so we can observe better how it happened.
We have started the replayer just a bit before the time of the collision, so we can observe
better how it happened.
Also, if the **duration** is set to 0, the entire file will be replayed.
The output result is similar to this:
![collision](img/collision1.gif)
#### Info about blocked actors
### Info about blocked actors
There is another API function to get information about actors that have been blocked by an obstacle, not letting them follow their way. That could be helpful for finding incidences. The API call is:
There is another API function to get information about actors that have been blocked by an obstacle,
not letting them follow their way. That could be helpful for finding incidences. The API call is:
```py
client.show_recorder_actors_blocked("recording01.log", min_time, min_distance)
```
The input parameters are:
* **min_time**: The minimum time that an actor needs to be stopped to be considered as blocked (in seconds, by default 30).
* **min_time**: The minimum time that an actor needs to be stopped to be considered as blocked
(in seconds, by default 30).
* **min_distance**: The minimum distance to consider an actor to be stopped (in cm, by default 10).
Let's say we want to know which actor is stopped (moving less than 1 meter during 60 seconds), we could do the following:
Let's say we want to know which actor is stopped (moving less than 1 meter during 60 seconds),
we could do the following:
```py
client.show_recorder_actors_blocked("col3.log", 60, 100)
@ -242,7 +277,8 @@ client.replay_file("col3.log", 302, 0, 143)
![actor blocked](img/actor_blocked1.png)
As we can observe, there is an obstacle that is actually blocking the actor (see red vehicle in the image).
As we can observe, there is an obstacle that is actually blocking the actor
(see red vehicle in the image).
Looking at another actor using:
```py
@ -251,9 +287,13 @@ client.replay_file("col3.log", 75, 0, 104)
![actor blocked](img/actor_blocked2.png)
It is worth noting that it is the same incident but with another vehicle involved in it (i.e. the police car in this case).
It is worth noting that it is the same incident but with another vehicle involved in it
(i.e. the police car in this case).
The result is sorted by duration, so the actor that is blocked for more time comes first. By checking the vehicle with Id 173 at time 36 seconds, it is evident that it stopped for 336 seconds. To check the cause of it , it would be useful to check how it arrived to that situation by replaying a few seconds before the second 36:
The result is sorted by duration, so the actor that is blocked for more time comes first.
By checking the vehicle with Id 173 at time 36 seconds, it is evident that it stopped for 336 seconds.
To check the cause of it , it would be useful to check how it arrived to that situation by replaying
a few seconds before the second 36:
```py
client.replay_file("col3.log", 34, 0, 173)
@ -263,18 +303,20 @@ client.replay_file("col3.log", 34, 0, 173)
And easily determine the responsible of that incident.
### Sample Python scripts
## Sample Python scripts
Here you can find a list of sample scripts you could use:
* **start_recording.py**: This will start recording, and optionally you can spawn several actors and define how much time you want to record.
* **start_recording.py**: This will start recording, and optionally you can spawn several actors and
define how much time you want to record.
+ `-f`: Filename to write
+ `-n`: Vehicles to spawn (optional, 10 by default)
+ `-t`: Duration of the recording (optional)
---
* **start_replaying.py**: This will start a replay of a file. We can define the starting time, duration and also an actor to follow.
* **start_replaying.py**: This will start a replay of a file. We can define the starting time,
duration and also an actor to follow.
+ `-f`: Filename
+ `-s`: Starting time (optional, by default from start)
+ `-d`: Duration (optional, by default all)
@ -282,13 +324,16 @@ Here you can find a list of sample scripts you could use:
---
* **show_recorder_file_info.py**: This will show all the information recorded in file. It has two modes of detail, by default it only shows the frames where some event is recorded, the second is showing info about all frames (all positions and trafficlight states).
* **show_recorder_file_info.py**: This will show all the information recorded in file.
It has two modes of detail, by default it only shows the frames where some event is recorded,
the second is showing info about all frames (all positions and trafficlight states).
+ `-f`: Filename
+ `-a`: Flag to show all details (optional)
---
* **show_recorder_collisions.py**: This will show all the collisions hapenned while recording (currently only involved by hero actors).
* **show_recorder_collisions.py**: This will show all the collisions hapenned while recording
(currently only involved by hero actors).
+ `-f`: Filename
+ `-t`: Two letters definning the types of the actors involved, for example: -t aa
- `h` = Hero
@ -300,7 +345,9 @@ Here you can find a list of sample scripts you could use:
---
* **show_recorder_actors_blocked.py**: This will show all the actors that are blocked or stopped in the recorder. We can define the *time* that an actor has not been moving and *travelled* distance by the actor thresholds to determine if a vehicle is considered as blocked or not.
* **show_recorder_actors_blocked.py**: This will show all the actors that are blocked or stopped
in the recorder. We can define the *time* that an actor has not been moving and *travelled* distance
by the actor thresholds to determine if a vehicle is considered as blocked or not.
+ `-f`: Filename
+ `-t`: Minimum seconds stopped to be considered as blocked (optional)
+ `-d`: Minimum distance to be considered stopped (optional)

View File

@ -1,24 +1,32 @@
## Recorder Binary File Format
# Recorder Binary File Format
The recorder system saves all the info needed to replay the simulation in a binary file, using little endian byte order for the multibyte values. In the next image representing the file format, we can get a quick view of all the detailed information. Each part that is visualized in the image will be explained in the following sections:
The recorder system saves all the info needed to replay the simulation in a binary file,
using little endian byte order for the multibyte values.
In the next image representing the file format, we can get a quick view of all the detailed
information. Each part that is visualized in the image will be explained in the following sections:
![file format 1](img/RecorderFileFormat1.png)
In summary, the file format has a small header with general info (version, magic string, date and the map used) and a collection of packets of different types (currently we use 10 types, but that will continue growing up in the future).
In summary, the file format has a small header with general info
(version, magic string, date and the map used) and a collection of packets of different types
(currently we use 10 types, but that will continue growing up in the future).
![global file format](img/RecorderFileFormat3.png)
### 1. Strings in binary
Strings are encoded first with the length of it, followed by its characters without null character ending. For example, the string 'Town06' will be saved as hex values: 06 00 54 6f 77 6e 30 36
## 1. Strings in binary
Strings are encoded first with the length of it, followed by its characters without null
character ending. For example, the string 'Town06' will be saved
as hex values: 06 00 54 6f 77 6e 30 36
![binary dynamic string](img/RecorderString.png)
### 2. Info header
## 2. Info header
The info header has general information about the recorded file. Basically, it contains the version and a magic string to identify the file as a recorder file. If the header changes then the version will change also. Furthermore, it contains a date timestamp, with the number of seconds from the Epoch 1900, and also it contains a string with the name of the map that has been used for recording.
The info header has general information about the recorded file. Basically, it contains the version
and a magic string to identify the file as a recorder file. If the header changes then the version
will change also. Furthermore, it contains a date timestamp, with the number of seconds from the
Epoch 1900, and also it contains a string with the name of the map that has been used for recording.
![info header](img/RecorderInfoHeader.png)
@ -26,8 +34,7 @@ A sample info header is:
![info header sample](img/RecorderHeader.png)
### 3. Packets
## 3. Packets
Each packet starts with a little header of two fields (5 bytes):
@ -38,9 +45,12 @@ Each packet starts with a little header of two fields (5 bytes):
Header information is then followed by the **data**.
The **data** is optional, a **size** of 0 means there is no **data** in the packet.
If the **size** is greater than 0 it means that the packet has **data** bytes. Therefore, the **data** needs to be reinterpreted depending on the type of the packet.
If the **size** is greater than 0 it means that the packet has **data** bytes. Therefore,
the **data** needs to be reinterpreted depending on the type of the packet.
The header of the packet is useful because we can just ignore those packets we are not interested in when doing playback. We only need to read the header (first 5 bytes) of the packet and jump to the next packet just skipping the data of the packet:
The header of the packet is useful because we can just ignore those packets we are not interested
in when doing playback. We only need to read the header (first 5 bytes) of the packet and jump to
the next packet just skipping the data of the packet:
![packets size](img/RecorderPackets.png)
@ -48,31 +58,35 @@ The types of packets are:
![packets type list](img/RecorderPacketsList.png)
We suggest to use **id** over 100 for user custom packets, because this list will keep growing in the future.
We suggest to use **id** over 100 for user custom packets, because this list will keep growing in
the future.
### 3.1 Packet 0: Frame Start
#### 3.1 Packet 0: Frame Start
This packet marks the start of a new frame, and it will be the first one to start each frame. All packets need to be placed between a **Frame Start** and a **Frame End**.
This packet marks the start of a new frame, and it will be the first one to start each frame.
All packets need to be placed between a **Frame Start** and a **Frame End**.
![frame start](img/RecorderFrameStart.png)
So, elapsed + durationThis = elapsed time for next frame
#### 3.2 Packet 1: Frame End
### 3.2 Packet 1: Frame End
This frame has no data and it only marks the end of the current frame. That helps the replayer to know the end of each frame just before the new one starts.
This frame has no data and it only marks the end of the current frame. That helps the replayer
to know the end of each frame just before the new one starts.
Usually, the next frame should be a Frame Start packet to start a new frame.
![frame end](img/RecorderFrameEnd.png)
#### 3.3 Packet 2: Event Add
### 3.3 Packet 2: Event Add
This packet says how many actors we need to create at current frame.
![event add](img/RecorderEventAdd.png)
The field **total** says how many records follow. Each record starts with the **id** field, that is the id the actor has when it was recorded (on playback that id could change internally, but we need to use this id ). The **type** of actor can have these possible values:
The field **total** says how many records follow. Each record starts with the **id** field,
that is the id the actor has when it was recorded (on playback that id could change internally,
but we need to use this id ). The **type** of actor can have these possible values:
* 0 = Other
* 1 = Vehicle
@ -82,16 +96,18 @@ The field **total** says how many records follow. Each record starts with the **
After that, the **location** and the **rotation** where we want to create the actor is proceeded.
Right after we have the **description** of the actor. The description **uid** is the numeric id of the description and the **id** is the textual id, like 'vehicle.seat.leon'.
Right after we have the **description** of the actor. The description **uid** is the numeric id of
the description and the **id** is the textual id, like 'vehicle.seat.leon'.
Then comes a collection of its **attributes** like color, number of wheels, role, etc. The number of attributes is variable and should look similar to this:
Then comes a collection of its **attributes** like color, number of wheels, role, etc.
The number of attributes is variable and should look similar to this:
* number_of_wheels = 4
* sticky_control = true
* color = 79,33,85
* role_name = autopilot
#### 3.4 Packet 3: Event Del
### 3.4 Packet 3: Event Del
This packet says how many actors need to be destroyed this frame.
@ -103,10 +119,13 @@ For example, this packet could be like this:
![event del](img/RecorderPacketSampleEventDel.png)
The number 3 identifies the packet as (Event Del). The number 16 is the size of the data of the packet (4 fields of 4 bytes each). So if we don't want to process this packet, we could skip the next 16 bytes and will be directly to the start of the next packet.
The next 3 says the total records that follows, and each record is the id of the actor to remove. So, we need to remove at this frame the actors 100, 101 and 120.
The number 3 identifies the packet as (Event Del). The number 16 is the size of the data of
the packet (4 fields of 4 bytes each). So if we don't want to process this packet, we could skip
the next 16 bytes and will be directly to the start of the next packet.
The next 3 says the total records that follows, and each record is the id of the actor to remove.
So, we need to remove at this frame the actors 100, 101 and 120.
#### 3.5 Packet 4: Event Parent
### 3.5 Packet 4: Event Parent
This packet says which actor is the child of another (the parent).
@ -114,63 +133,79 @@ This packet says which actor is the child of another (the parent).
The first id is the child actor, and the second one will be the parent actor.
#### 3.6 Packet 5: Event Collision
### 3.6 Packet 5: Event Collision
If a collision happens between two actors, it will be registered in this packet. Currently only actors with a collision sensor will report collisions, so currently only hero vehicles have that sensor attached automatically.
If a collision happens between two actors, it will be registered in this packet. Currently only
actors with a collision sensor will report collisions, so currently only hero vehicles have that
sensor attached automatically.
![event collision](img/RecorderCollision.png)
The **id** is just a sequence to identify each collision internally.
Several collisions between the same pair of actors can happen in the same frame, because physics frame rate is fixed and usually there are several physics substeps in the same rendered frame.
Several collisions between the same pair of actors can happen in the same frame, because physics
frame rate is fixed and usually there are several physics substeps in the same rendered frame.
#### 3.7 Packet 6: Position
### 3.7 Packet 6: Position
This packet records the position and orientation of all actors of type **vehicle** and **walker** that exist in the scene.
This packet records the position and orientation of all actors of type **vehicle** and
**walker** that exist in the scene.
![position](img/RecorderPosition.png)
#### 3.8 Packet 7: TrafficLight
### 3.8 Packet 7: TrafficLight
This packet records the state of all **traffic lights** in the scene. Which means that it stores the state (red, orange or green) and the time it is waiting to change to a new state.
This packet records the state of all **traffic lights** in the scene. Which means that it
stores the state (red, orange or green) and the time it is waiting to change to a new state.
![state](img/RecorderTrafficLight.png)
#### 3.9 Packet 8: Vehicle animation
### 3.9 Packet 8: Vehicle animation
This packet records the animation of the vehicles, bikes and cycles. This packet stores the **throttle**, **sterring**, **brake**, **handbrake** and **gear** inputs, and then set them at playback.
This packet records the animation of the vehicles, bikes and cycles. This packet stores the
**throttle**, **sterring**, **brake**, **handbrake** and **gear** inputs, and then set them at playback.
![state](img/RecorderVehicle.png)
#### 3.10 Packet 9: Walker animation
### 3.10 Packet 9: Walker animation
This packet records the animation of the walker. It just saves the **speed** of the walker that is used in the animation.
This packet records the animation of the walker. It just saves the **speed** of the walker
that is used in the animation.
![state](img/RecorderWalker.png)
### 4. Frame Layout
## 4. Frame Layout
A frame consists of several packets, where all of them are optional, except the ones that have the **start** and **end** in that frame, that must be there always.
A frame consists of several packets, where all of them are optional, except the ones that
have the **start** and **end** in that frame, that must be there always.
![layout](img/RecorderFrameLayout.png)
**Event** packets exist only in the frame where they happen.
**Position** and **traffic light** packets should exist in all frames, because they are required to move all actors and set the traffic lights to its state. They are optional but if they are not present then the replayer will not be able to move or set the state of traffic lights.
**Position** and **traffic light** packets should exist in all frames, because they are
required to move all actors and set the traffic lights to its state.
They are optional but if they are not present then the replayer will not be able to move
or set the state of traffic lights.
The **animation** packets are also optional, but by default they are recorded. That way the walkers are animated and also the vehicle wheels follow the direction of the vehicles.
The **animation** packets are also optional, but by default they are recorded. That way the walkers
are animated and also the vehicle wheels follow the direction of the vehicles.
### 5. File Layout
## 5. File Layout
The layout of the file starts with the **info header** and then follows a collection of packets in groups. The first in each group is the **Frame Start** packet, and the last in the group is the **Frame End** packet. In between, we can find the rest of packets as well.
The layout of the file starts with the **info header** and then follows a collection of packets in
groups. The first in each group is the **Frame Start** packet, and the last in the group is
the **Frame End** packet. In between, we can find the rest of packets as well.
![layout](img/RecorderLayout.png)
Usually, it is a good idea to have all packets regarding events first, and then the packets regarding position and state later.
Usually, it is a good idea to have all packets regarding events first, and then the packets
regarding position and state later.
The event packets are optional, since they appear when they happen, so we could have a layout like this one:
The event packets are optional, since they appear when they happen, so we could have a layout
like this one:
![layout](img/RecorderLayoutSample.png)
In **frame 1** some actors are created and reparented, so we can observe its events in the image. In **frame 2** there are no events. In **frame 3** some actors have collided so the collision event appears with that info. In **frame 4** the actors are destroyed.
In **frame 1** some actors are created and reparented, so we can observe its events in the image.
In **frame 2** there are no events. In **frame 3** some actors have collided so the collision event
appears with that info. In **frame 4** the actors are destroyed.

View File

@ -3,14 +3,16 @@ CARLA Simulator
Thanks for downloading CARLA!
http://carla.org/
<http://carla.org/>
How to run CARLA
----------------
Launch a terminal in this folder and execute the simulator by running
$ ./CarlaUE4.sh
```sh
./CarlaUE4.sh
```
this will launch a window with a view over the city. This is the "spectator"
view, you can fly around the city using the mouse and WASD keys, but you cannot
@ -20,7 +22,9 @@ waiting for a client app to connect and interact with the world.
Let's start by adding some live to the city, open a new terminal window and
execute
$ ./spawn_npc.py -n 80
```sh
./spawn_npc.py -n 80
```
This adds 80 vehicles to the world driving in "autopilot" mode. Back to the
simulator window we should see these vehicles driving around the city. They will
@ -32,15 +36,19 @@ and lighting conditions of the world. We'll launch now a script that dynamically
controls the weather and time of the day, open yet another terminal window and
execute
$ ./dynamic_weather.py
```sh
./dynamic_weather.py
```
The city is now ready for us to drive, we can finally run
$ ./manual_control.py
```sh
./manual_control.py
```
This should open a new window with a 3rd person view of a car, you can drive
this car with the WASD/arrow keys. Press 'h' to see all the options available.
For more details and running options please refer to our online documentation
http://carla.readthedocs.io
<http://carla.readthedocs.io>

View File

@ -64,7 +64,7 @@
- def_name: get_location
return: carla.Location
doc: >
Returns the current location of the actor.
Returns the actor's current location.
note: >
This function does not call the simulator, it returns the location
received in the last tick.
@ -72,12 +72,15 @@
- def_name: get_transform
return: carla.Transform
doc: >
Returns the current transform of the actor.
Returns the actor's current transform.
note: >
This function does not call the simulator, it returns the
transform received in the last tick.
# --------------------------------------
- def_name: get_velocity
return: carla.Vector3D
doc: >
Returns the current 3D velocity of the actor.
Returns the actor's current 3D velocity.
note: >
This function does not call the simulator, it returns the velocity
received in the last tick.
@ -85,7 +88,7 @@
- def_name: get_angular_velocity
return: carla.Vector3D
doc: >
Returns the current 3D angular velocity of the actor.
Returns the actor's current 3D angular velocity.
note: >
This function does not call the simulator, it returns the angular
velocity received in the last tick.
@ -93,7 +96,7 @@
- def_name: get_acceleration
return: carla.Vector3D
doc: >
Returns the current 3D acceleration of the actor.
Returns the actor's current 3D acceleration.
note: >
This function does not call the simulator, it returns the acceleration
received in the last tick.
@ -155,7 +158,7 @@
- var_name: bounding_box
type: carla.BoundingBox
doc: >
The bounding box of the vehicle.
The vehicle's bounding box
# - METHODS ----------------------------
methods:
- def_name: apply_control
@ -243,7 +246,7 @@
- var_name: bounding_box
type: carla.BoundingBox
doc: >
The bounding box of the walker.
The walker's bounding box.
# - METHODS ----------------------------
methods:
- def_name: apply_control

View File

@ -90,7 +90,7 @@
- var_name: id
type: str
doc: >
String identifier of the attribute
The attribute's identifier
- var_name: type
type: carla.ActorAttributeType
doc: >

View File

@ -468,7 +468,7 @@ class Documentation:
def gen_markdown(self):
"""Generates the whole markdown file"""
return join([self.gen_overview(), self.gen_body()], '\n').strip()
return join([self.gen_body()], '\n').strip()
def main():

View File

@ -13,7 +13,7 @@
- var_name: id
type: int
doc: >
Identifier of the WorldSnapshot
The WorldSnapshot's identifier
- var_name: frame
type: int
doc: >
@ -72,28 +72,28 @@
- var_name: id
type: int
doc: >
Identifier of the actor snapshot
The ActorSnapshot's identifier
# - METHODS ----------------------------
methods:
- def_name: get_transform
return: carla.Transform
doc: >
Returns the current transform of the actor
Returns the actor's current transform
# --------------------------------------
- def_name: get_velocity
return: carla.Vector3D
doc: >
Returns the current 3D velocity of the actor
Returns the actor's current 3D velocity
# --------------------------------------
- def_name: get_angular_velocity
return: carla.Vector3D
doc: >
Returns the current 3D angular velocity of the actor
Returns the actor's current 3D angular velocity
# --------------------------------------
- def_name: get_acceleration
return: carla.Vector3D
doc: >
Returns the current 3D acceleration of the actor
Returns the actor's current 3D acceleration
# --------------------------------------
- def_name: __self__
doc: >

View File

@ -18,7 +18,7 @@ vehicles) that were created for this purpose and can be used freely. The
simulation platform supports flexible specification of sensor suites and
environmental conditions.
[![CARLA Video](Docs/img/video_thumbnail.png)](https://www.youtube.com/watch?v=BjH-pFGlZ0M)
[![CARLA Video](Docs/img/video_thumbnail.png)](https://www.youtube.com/watch?v=TOojcifcRBA)
If you want to benchmark your model in the same conditions as in our CoRL17
paper, check out

View File

@ -3,6 +3,7 @@ repo_url: https://github.com/carla-simulator/carla
docs_dir: Docs
edit_uri: 'edit/master/Docs/'
theme: readthedocs
extra_css: [extra.css]
nav:
- Home: 'index.md'
@ -22,7 +23,7 @@ nav:
- 'Blueprint Library': 'bp_library.md'
- 'Running without display and selecting GPUs': 'carla_headless.md'
- 'Running in a Docker': 'carla_docker.md'
- "How to make a new map with RoadRunner": 'how_to_make_a_new_map.md'
- "How to create and import a new map": 'how_to_make_a_new_map.md'
- "How to link Epic's Automotive Materials": 'epic_automotive_materials.md'
- "Creating standalone asset packages for distribution": 'asset_packages_for_dist.md'
- "How to record and replay": 'recorder_and_playback.md'
@ -33,6 +34,7 @@ nav:
- Contributing:
- 'Contribution guidelines': 'CONTRIBUTING.md'
- 'Coding standard': 'coding_standard.md'
- 'Documentation standard': 'doc_standard.md'
- 'Code of conduct': 'CODE_OF_CONDUCT.md'
- Development:
- 'Index': 'dev/index.md'