Fdomf/docs (#1883)
* Updated documentation and improvements * Bp doc generator * Updated
This commit is contained in:
parent
47cfba6c54
commit
a91f0da4b4
|
@ -68,6 +68,6 @@ members of the project's leadership.
|
|||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
|
|
@ -43,11 +43,14 @@ GitHub or locally in your machine.
|
|||
|
||||
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
|
||||
!!! tip
|
||||
You can build and serve it locally by running `mkdocs` in the project's
|
||||
main folder
|
||||
|
||||
$ sudo pip install mkdocs
|
||||
$ mkdocs serve
|
||||
```sh
|
||||
> sudo pip install mkdocs
|
||||
> mkdocs serve
|
||||
```
|
||||
|
||||
Code contributions
|
||||
------------------
|
||||
|
@ -56,12 +59,12 @@ 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
|
||||
[issue board][wafflelink] to see if we are already working on that, it would
|
||||
[issue board][issueboard] to see if we are already working on that, it would
|
||||
be a pity putting an effort into something just to discover that someone else
|
||||
was already working on that. In case of doubt or to discuss how to proceed,
|
||||
please contact one of us (or send an email to carla.simulator@gmail.com).
|
||||
please contact one of us (or send an email to <carla.simulator@gmail.com>).
|
||||
|
||||
[wafflelink]: https://waffle.io/carla-simulator/carla
|
||||
[issueboard]: https://github.com/carla-simulator/carla/issues
|
||||
|
||||
#### Where can I learn more about Unreal Engine?
|
||||
|
||||
|
@ -82,27 +85,6 @@ to hold the new feature. We are aware the developers documentation is still
|
|||
scarce, please ask us in case of doubt, and of course don't hesitate to improve
|
||||
the current documentation if you feel confident enough.
|
||||
|
||||
#### Are there any examples in CARLA to see how Unreal programming works?
|
||||
|
||||
You can find an example of how C++ classes work in UE4 in
|
||||
[`ASceneCaptureToDiskCamera`][capturelink] (and its parent class
|
||||
`ASceneCaptureCamera`). This class creates an actor that can be dropped into the
|
||||
scene. In the editor, type _"Scene Capture To Disk"_ in the Modes tab, and drag
|
||||
and drop the actor into the scene. Now searching for its detail tab you can find
|
||||
all the `UPROPERTY` members reflected. This shows the basic mechanism to use C++
|
||||
classes in Unreal Editor.
|
||||
|
||||
For a more advanced example on how to extend C++ classes with blueprints, you
|
||||
can take a look at the _"VehicleSpawner"_ blueprint. It derives from the C++
|
||||
class `AVehicleSpawnerBase`. The C++ class decides where and when it spawns a
|
||||
vehicle, then calls the function `SpawnVehicle()`, which is implemented in the
|
||||
blueprint. The blueprint then decides model and color of the vehicle being
|
||||
spawned. Note that the blueprint can call back C++ functions, for instance for
|
||||
getting the random engine. This way there is a back-and-forth communication
|
||||
between C++ code and blueprints.
|
||||
|
||||
[capturelink]: https://github.com/carla-simulator/carla/blob/master/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/SceneCaptureToDiskCamera.h
|
||||
|
||||
#### Coding standard
|
||||
|
||||
Please follow the current [coding standard](coding_standard.md) when submitting
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
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.
|
||||
|
||||
<h4>How to import assets inside Unreal Engine</h4>
|
||||
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.
|
||||
So basically, for a **map** subfolder, we will need to place the following files:
|
||||
|
@ -21,6 +22,7 @@ And for the **props** folder, we will need the following files:
|
|||
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:
|
||||
|
||||
```json
|
||||
{
|
||||
"maps": [{
|
||||
|
@ -132,15 +134,16 @@ Import
|
|||
|
||||
*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.*
|
||||
|
||||
|
||||
Now we have everything ready for importing assets. To do so, you just need to run the command:
|
||||
|
||||
```sh
|
||||
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.
|
||||
|
||||
|
||||
<h4>How to export assets</h4>
|
||||
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:
|
||||
|
||||
|
|
|
@ -0,0 +1,292 @@
|
|||
|
||||
<h1>Blueprint Library</h1>
|
||||
|
||||
### walker
|
||||
- <font color="#737373">walker.pedestrian.0001</font>
|
||||
|
||||
- <font color="#737373">walker.pedestrian.0002</font>
|
||||
|
||||
- <font color="#737373">walker.pedestrian.0003</font>
|
||||
|
||||
- <font color="#737373">walker.pedestrian.0004</font>
|
||||
|
||||
- <font color="#737373">walker.pedestrian.0005</font>
|
||||
|
||||
- <font color="#737373">walker.pedestrian.0006</font>
|
||||
|
||||
- <font color="#737373">walker.pedestrian.0007</font>
|
||||
|
||||
- <font color="#737373">walker.pedestrian.0008</font>
|
||||
|
||||
- <font color="#737373">walker.pedestrian.0009</font>
|
||||
|
||||
- <font color="#737373">walker.pedestrian.0010</font>
|
||||
|
||||
- <font color="#737373">walker.pedestrian.0011</font>
|
||||
|
||||
- <font color="#737373">walker.pedestrian.0012</font>
|
||||
|
||||
- <font color="#737373">walker.pedestrian.0013</font>
|
||||
|
||||
- <font color="#737373">walker.pedestrian.0014</font>
|
||||
|
||||
|
||||
### static
|
||||
- <font color="#737373">static.prop.advertisement</font>
|
||||
|
||||
- <font color="#737373">static.prop.atm</font>
|
||||
|
||||
- <font color="#737373">static.prop.barbeque</font>
|
||||
|
||||
- <font color="#737373">static.prop.barrel</font>
|
||||
|
||||
- <font color="#737373">static.prop.bench01</font>
|
||||
|
||||
- <font color="#737373">static.prop.bench02</font>
|
||||
|
||||
- <font color="#737373">static.prop.bench03</font>
|
||||
|
||||
- <font color="#737373">static.prop.bike helmet</font>
|
||||
|
||||
- <font color="#737373">static.prop.bikeparking</font>
|
||||
|
||||
- <font color="#737373">static.prop.bin</font>
|
||||
|
||||
- <font color="#737373">static.prop.box01</font>
|
||||
|
||||
- <font color="#737373">static.prop.box02</font>
|
||||
|
||||
- <font color="#737373">static.prop.box03</font>
|
||||
|
||||
- <font color="#737373">static.prop.briefcase</font>
|
||||
|
||||
- <font color="#737373">static.prop.brokentile01</font>
|
||||
|
||||
- <font color="#737373">static.prop.brokentile02</font>
|
||||
|
||||
- <font color="#737373">static.prop.brokentile03</font>
|
||||
|
||||
- <font color="#737373">static.prop.brokentile04</font>
|
||||
|
||||
- <font color="#737373">static.prop.busstop</font>
|
||||
|
||||
- <font color="#737373">static.prop.chainbarrier</font>
|
||||
|
||||
- <font color="#737373">static.prop.chainbarrierend</font>
|
||||
|
||||
- <font color="#737373">static.prop.clothcontainer</font>
|
||||
|
||||
- <font color="#737373">static.prop.clothesline</font>
|
||||
|
||||
- <font color="#737373">static.prop.colacan</font>
|
||||
|
||||
- <font color="#737373">static.prop.constructioncone</font>
|
||||
|
||||
- <font color="#737373">static.prop.container</font>
|
||||
|
||||
- <font color="#737373">static.prop.creasedbox01</font>
|
||||
|
||||
- <font color="#737373">static.prop.creasedbox02</font>
|
||||
|
||||
- <font color="#737373">static.prop.creasedbox03</font>
|
||||
|
||||
- <font color="#737373">static.prop.dirtdebris01</font>
|
||||
|
||||
- <font color="#737373">static.prop.dirtdebris02</font>
|
||||
|
||||
- <font color="#737373">static.prop.dirtdebris03</font>
|
||||
|
||||
- <font color="#737373">static.prop.doghouse</font>
|
||||
|
||||
- <font color="#737373">static.prop.fountain</font>
|
||||
|
||||
- <font color="#737373">static.prop.garbage01</font>
|
||||
|
||||
- <font color="#737373">static.prop.garbage02</font>
|
||||
|
||||
- <font color="#737373">static.prop.garbage03</font>
|
||||
|
||||
- <font color="#737373">static.prop.garbage04</font>
|
||||
|
||||
- <font color="#737373">static.prop.garbage05</font>
|
||||
|
||||
- <font color="#737373">static.prop.garbage06</font>
|
||||
|
||||
- <font color="#737373">static.prop.gardenlamp</font>
|
||||
|
||||
- <font color="#737373">static.prop.glasscontainer</font>
|
||||
|
||||
- <font color="#737373">static.prop.gnome</font>
|
||||
|
||||
- <font color="#737373">static.prop.guitarcase</font>
|
||||
|
||||
- <font color="#737373">static.prop.ironplank</font>
|
||||
|
||||
- <font color="#737373">static.prop.kiosk_01</font>
|
||||
|
||||
- <font color="#737373">static.prop.mailbox</font>
|
||||
|
||||
- <font color="#737373">static.prop.maptable</font>
|
||||
|
||||
- <font color="#737373">static.prop.mobile</font>
|
||||
|
||||
- <font color="#737373">static.prop.motorhelmet</font>
|
||||
|
||||
- <font color="#737373">static.prop.pergola</font>
|
||||
|
||||
- <font color="#737373">static.prop.plantpot01</font>
|
||||
|
||||
- <font color="#737373">static.prop.plantpot02</font>
|
||||
|
||||
- <font color="#737373">static.prop.plantpot03</font>
|
||||
|
||||
- <font color="#737373">static.prop.plantpot04</font>
|
||||
|
||||
- <font color="#737373">static.prop.plantpot05</font>
|
||||
|
||||
- <font color="#737373">static.prop.plantpot06</font>
|
||||
|
||||
- <font color="#737373">static.prop.plantpot07</font>
|
||||
|
||||
- <font color="#737373">static.prop.plantpot08</font>
|
||||
|
||||
- <font color="#737373">static.prop.plasticbag</font>
|
||||
|
||||
- <font color="#737373">static.prop.plasticchair</font>
|
||||
|
||||
- <font color="#737373">static.prop.plastictable</font>
|
||||
|
||||
- <font color="#737373">static.prop.platformgarbage01</font>
|
||||
|
||||
- <font color="#737373">static.prop.purse</font>
|
||||
|
||||
- <font color="#737373">static.prop.shop01</font>
|
||||
|
||||
- <font color="#737373">static.prop.shoppingbag</font>
|
||||
|
||||
- <font color="#737373">static.prop.shoppingcart</font>
|
||||
|
||||
- <font color="#737373">static.prop.shoppingtrolley</font>
|
||||
|
||||
- <font color="#737373">static.prop.slide</font>
|
||||
|
||||
- <font color="#737373">static.prop.streetbarrier</font>
|
||||
|
||||
- <font color="#737373">static.prop.streetfountain</font>
|
||||
|
||||
- <font color="#737373">static.prop.streetsign</font>
|
||||
|
||||
- <font color="#737373">static.prop.streetsign01</font>
|
||||
|
||||
- <font color="#737373">static.prop.streetsign04</font>
|
||||
|
||||
- <font color="#737373">static.prop.swing</font>
|
||||
|
||||
- <font color="#737373">static.prop.swingcouch</font>
|
||||
|
||||
- <font color="#737373">static.prop.table</font>
|
||||
|
||||
- <font color="#737373">static.prop.trafficcone01</font>
|
||||
|
||||
- <font color="#737373">static.prop.trafficcone02</font>
|
||||
|
||||
- <font color="#737373">static.prop.trafficwarning</font>
|
||||
|
||||
- <font color="#737373">static.prop.trampoline</font>
|
||||
|
||||
- <font color="#737373">static.prop.trashbag</font>
|
||||
|
||||
- <font color="#737373">static.prop.trashcan01</font>
|
||||
|
||||
- <font color="#737373">static.prop.trashcan02</font>
|
||||
|
||||
- <font color="#737373">static.prop.trashcan03</font>
|
||||
|
||||
- <font color="#737373">static.prop.trashcan04</font>
|
||||
|
||||
- <font color="#737373">static.prop.trashcan05</font>
|
||||
|
||||
- <font color="#737373">static.prop.travelcase</font>
|
||||
|
||||
- <font color="#737373">static.prop.vendingmachine</font>
|
||||
|
||||
- <font color="#737373">static.prop.wateringcan</font>
|
||||
|
||||
- <font color="#737373">static.trigger.friction</font>
|
||||
|
||||
|
||||
### controller
|
||||
- <font color="#737373">controller.ai.walker</font>
|
||||
|
||||
|
||||
### sensor
|
||||
- <font color="#737373">sensor.camera.depth</font>
|
||||
|
||||
- <font color="#737373">sensor.camera.rgb</font>
|
||||
|
||||
- <font color="#737373">sensor.camera.semantic_segmentation</font>
|
||||
|
||||
- <font color="#737373">sensor.lidar.ray_cast</font>
|
||||
|
||||
- <font color="#737373">sensor.other.collision</font>
|
||||
|
||||
- <font color="#737373">sensor.other.gnss</font>
|
||||
|
||||
- <font color="#737373">sensor.other.lane_invasion</font>
|
||||
|
||||
- <font color="#737373">sensor.other.obstacle</font>
|
||||
|
||||
|
||||
### vehicle
|
||||
- <font color="#737373">vehicle.audi.a2</font>
|
||||
|
||||
- <font color="#737373">vehicle.audi.etron</font>
|
||||
|
||||
- <font color="#737373">vehicle.audi.tt</font>
|
||||
|
||||
- <font color="#737373">vehicle.bh.crossbike</font>
|
||||
|
||||
- <font color="#737373">vehicle.bmw.grandtourer</font>
|
||||
|
||||
- <font color="#737373">vehicle.bmw.isetta</font>
|
||||
|
||||
- <font color="#737373">vehicle.carlamotors.carlacola</font>
|
||||
|
||||
- <font color="#737373">vehicle.chevrolet.impala</font>
|
||||
|
||||
- <font color="#737373">vehicle.citroen.c3</font>
|
||||
|
||||
- <font color="#737373">vehicle.diamondback.century</font>
|
||||
|
||||
- <font color="#737373">vehicle.dodge_charger.police</font>
|
||||
|
||||
- <font color="#737373">vehicle.ford.mustang</font>
|
||||
|
||||
- <font color="#737373">vehicle.gazelle.omafiets</font>
|
||||
|
||||
- <font color="#737373">vehicle.harley-davidson.low rider</font>
|
||||
|
||||
- <font color="#737373">vehicle.jeep.wrangler_rubicon</font>
|
||||
|
||||
- <font color="#737373">vehicle.kawasaki.ninja</font>
|
||||
|
||||
- <font color="#737373">vehicle.lincoln.mkz2017</font>
|
||||
|
||||
- <font color="#737373">vehicle.mercedes-benz.coupe</font>
|
||||
|
||||
- <font color="#737373">vehicle.mini.cooperst</font>
|
||||
|
||||
- <font color="#737373">vehicle.nissan.micra</font>
|
||||
|
||||
- <font color="#737373">vehicle.nissan.patrol</font>
|
||||
|
||||
- <font color="#737373">vehicle.seat.leon</font>
|
||||
|
||||
- <font color="#737373">vehicle.tesla.model3</font>
|
||||
|
||||
- <font color="#737373">vehicle.toyota.prius</font>
|
||||
|
||||
- <font color="#737373">vehicle.volkswagen.t2</font>
|
||||
|
||||
- <font color="#737373">vehicle.yamaha.yzf</font>
|
||||
|
|
@ -51,7 +51,7 @@ 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#carlacolorconverter) 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
|
||||
-----------------
|
||||
|
|
|
@ -32,6 +32,34 @@ To reload the world using the current active map, use
|
|||
world = client.reload_world()
|
||||
```
|
||||
|
||||
Graphics Quality
|
||||
----------------
|
||||
|
||||
<h4>Vulkan vs OpenGL</h4>
|
||||
|
||||
Vulkan _(if installed)_ is the default graphics API used by Unreal Engine and CARLA on Linux.
|
||||
It consumes more memory but performs faster.
|
||||
On the other hand, OpenGL is less memory consuming but performs slower than Vulkan.
|
||||
|
||||
!!!note
|
||||
Vulkan is an experimental build so it may have some bugs when running the simulator.
|
||||
|
||||
OpenGL API can be selected with the flag `-opengl`.
|
||||
|
||||
```sh
|
||||
> ./CarlaUE4.sh -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.
|
||||
|
||||
![](img/epic_quality_capture.png) | ![](img/low_quality_capture.png)
|
||||
:-------------------------:|:-------------------------:
|
||||
`./CarlaUE4.sh -quality-level=Epic` | `./CarlaUE4.sh -quality-level=Low`
|
||||
|
||||
**Low mode runs significantly faster**, ideal for users that don't rely on quality precision.
|
||||
|
||||
Running off-screen
|
||||
------------------
|
||||
|
||||
|
@ -40,9 +68,8 @@ environment variable `DISPLAY` to empty
|
|||
|
||||
!!! important
|
||||
**DISPLAY= only works with OpenGL**<br>
|
||||
Vulkan is now the default graphics API used by Unreal Engine and CARLA on
|
||||
Linux. Unreal Engine currently crashes when Vulkan is used when running
|
||||
off-screen. Therefore the -opengl flag must be added to force the engine to
|
||||
Unreal Engine currently crashes when Vulkan is used when running
|
||||
off-screen. Therefore the `-opengl` flag must be added to force the engine to
|
||||
use OpenGL instead. We hope that this issue is addressed by Epic in the near
|
||||
future.
|
||||
|
||||
|
@ -162,12 +189,12 @@ at the example [synchronous_mode.py][syncmodelink].
|
|||
|
||||
[syncmodelink]: https://github.com/carla-simulator/carla/blob/master/PythonAPI/examples/synchronous_mode.py
|
||||
|
||||
Other command-line options
|
||||
Command-line options
|
||||
--------------------------
|
||||
|
||||
* `-carla-rpc-port=N` Listen for client connections at port N, streaming port is set to N+1 by default.
|
||||
* `-carla-streaming-port=N` Specify the port for sensor data streaming, use 0 to get a random unused port.
|
||||
* `-quality-level={Low,Epic}` Change graphics quality level, "Low" mode runs significantly faster.
|
||||
* `-quality-level={Low,Epic}` Change graphics quality level.
|
||||
* `-no-rendering` Disable rendering.
|
||||
* [Full list of UE4 command-line arguments][ue4clilink] (note that many of these won't work in the release version).
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1017 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
|
@ -21,6 +21,7 @@
|
|||
<h3>Advanced topics</h3>
|
||||
|
||||
* [Python API reference](python_api.md)
|
||||
* [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)
|
||||
|
|
|
@ -1085,7 +1085,7 @@ Apply a different playback speed to current playback. Can be used several times
|
|||
- **Parameters:**
|
||||
- `time_factor` (_float_) – A value of 1.0 means normal time factor. A value < 1.0 means slow motion (for example 0.5 is half speed) A value > 1.0 means fast motion (for example 2.0 is double speed).
|
||||
- <a name="carla.Client.apply_batch"></a>**<font color="#7fb800">apply_batch</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**commands**</font>)
|
||||
This function executes the whole list of commands on a single simulation step. For example, to set autopilot on some actors, we could use: [sample_code](https://github.com/carla-simulator/carla/blob/10c5f6a482a21abfd00220c68c7f12b4110b7f63/PythonAPI/examples/spawn_npc.py#L126) We don't have control about the response of each command. If we need that, we can use apply_batch_sync().
|
||||
This function executes the whole list of commands on a single simulation step. For example, to set autopilot on some actors, we could use: [sample_code](https://github.com/carla-simulator/carla/blob/10c5f6a482a21abfd00220c68c7f12b4110b7f63/PythonAPI/examples/spawn_npc.py#L126). We don't have control about the response of each command. If we need that, we can use `apply_batch_sync()`.
|
||||
- **Parameters:**
|
||||
- `commands` (_list_) – A list of commands to execute in batch. Each command has a different number of parameters. Currently, we can use these [commands](#command.ApplyAngularVelocity):
|
||||
SpawnActor
|
||||
|
@ -1123,10 +1123,10 @@ Normal impulse result of the collision.
|
|||
Class that defines a 32-bit BGRA color.
|
||||
|
||||
<h3>Instance Variables</h3>
|
||||
- <a name="carla.Color.r"></a>**<font color="#f8805a">r</font>**
|
||||
- <a name="carla.Color.g"></a>**<font color="#f8805a">g</font>**
|
||||
- <a name="carla.Color.b"></a>**<font color="#f8805a">b</font>**
|
||||
- <a name="carla.Color.a"></a>**<font color="#f8805a">a</font>**
|
||||
- <a name="carla.Color.r"></a>**<font color="#f8805a">r</font>** (_int_)
|
||||
- <a name="carla.Color.g"></a>**<font color="#f8805a">g</font>** (_int_)
|
||||
- <a name="carla.Color.b"></a>**<font color="#f8805a">b</font>** (_int_)
|
||||
- <a name="carla.Color.a"></a>**<font color="#f8805a">a</font>** (_int_)
|
||||
|
||||
<h3>Methods</h3>
|
||||
- <a name="carla.Color.__init__"></a>**<font color="#7fb800">\__init__</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**r**=0</font>, <font color="#00a6ed">**g**=0</font>, <font color="#00a6ed">**b**=0</font>, <font color="#00a6ed">**a**=255</font>)
|
||||
|
@ -1194,7 +1194,7 @@ Class that contains geolocation simulated data.
|
|||
Map description that provides a Waypoint query system, that extracts the information from the OpenDRIVE file.
|
||||
|
||||
<h3>Instance Variables</h3>
|
||||
- <a name="carla.Map.name"></a>**<font color="#f8805a">name</font>**
|
||||
- <a name="carla.Map.name"></a>**<font color="#f8805a">name</font>** (_str_)
|
||||
Map name. Comes from the Unreal's UMap name if loaded from a Carla server.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
|
|
@ -413,7 +413,7 @@ 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
|
||||
the map to provide a list of recommended locations for spawning vehicles,
|
||||
`map.get_spawn_points()`.
|
||||
[`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. We can tell the map to give us a waypoint on the road closest to our
|
||||
|
|
|
@ -10,13 +10,79 @@ all classes and methods available can be found at
|
|||
The user should read the Python API tutorial before reading this document.
|
||||
[Python API tutorial](python_api_tutorial.md).
|
||||
|
||||
|
||||
### Walker skeleton structure
|
||||
|
||||
All walkers have the same skeleton hierarchy and bone names. Below is an image of the skeleton
|
||||
hierarchy.
|
||||
|
||||
![Skeleton Hierarchy](img/skeleton_hierarchy.jpg)
|
||||
|
||||
```
|
||||
crl_root
|
||||
└── crl_hips__C
|
||||
├── crl_spine__C
|
||||
│ └── crl_spine01__C
|
||||
│ ├── ctrl_shoulder__L
|
||||
│ │ └── crl_arm__L
|
||||
│ │ └── crl_foreArm__L
|
||||
│ │ └── crl_hand__L
|
||||
│ │ ├── crl_handThumb__L
|
||||
│ │ │ └── crl_handThumb01__L
|
||||
│ │ │ └── crl_handThumb02__L
|
||||
│ │ │ └── crl_handThumbEnd__L
|
||||
│ │ ├── crl_handIndex__L
|
||||
│ │ │ └── crl_handIndex01__L
|
||||
│ │ │ └── crl_handIndex02__L
|
||||
│ │ │ └── crl_handIndexEnd__L
|
||||
│ │ ├── crl_handMiddle_L
|
||||
│ │ │ └── crl_handMiddle01__L
|
||||
│ │ │ └── crl_handMiddle02__L
|
||||
│ │ │ └── crl_handMiddleEnd__L
|
||||
│ │ ├── crl_handRing_L
|
||||
│ │ │ └── crl_handRing01__L
|
||||
│ │ │ └── crl_handRing02__L
|
||||
│ │ │ └── crl_handRingEnd__L
|
||||
│ │ └── crl_handPinky_L
|
||||
│ │ └── crl_handPinky01__L
|
||||
│ │ └── crl_handPinky02__L
|
||||
│ │ └── crl_handPinkyEnd__L
|
||||
│ ├── crl_neck__C
|
||||
│ │ └── crl_Head__C
|
||||
│ │ ├── crl_eye__L
|
||||
│ │ └── crl_eye__R
|
||||
│ └── crl_shoulder__R
|
||||
│ └── crl_arm__R
|
||||
│ └── crl_foreArm__R
|
||||
│ └── crl_hand__R
|
||||
│ ├── crl_handThumb__R
|
||||
│ │ └── crl_handThumb01__R
|
||||
│ │ └── crl_handThumb02__R
|
||||
│ │ └── crl_handThumbEnd__R
|
||||
│ ├── crl_handIndex__R
|
||||
│ │ └── crl_handIndex01__R
|
||||
│ │ └── crl_handIndex02__R
|
||||
│ │ └── crl_handIndexEnd__R
|
||||
│ ├── crl_handMiddle_R
|
||||
│ │ └── crl_handMiddle01__R
|
||||
│ │ └── crl_handMiddle02__R
|
||||
│ │ └── crl_handMiddleEnd__R
|
||||
│ ├── crl_handRing_R
|
||||
│ │ └── crl_handRing01__R
|
||||
│ │ └── crl_handRing02__R
|
||||
│ │ └── crl_handRingEnd__R
|
||||
│ └── crl_handPinky_R
|
||||
│ └── crl_handPinky01__R
|
||||
│ └── crl_handPinky02__R
|
||||
│ └── crl_handPinkyEnd__R
|
||||
├── crl_thigh__L
|
||||
│ └── crl_leg__L
|
||||
│ └── crl_foot__L
|
||||
│ └── crl_toe__L
|
||||
│ └── crl_toeEnd__L
|
||||
└── crl_thigh__R
|
||||
└── crl_leg__R
|
||||
└── crl_foot__R
|
||||
└── crl_toe__R
|
||||
└── crl_toeEnd__R
|
||||
```
|
||||
|
||||
### How to manually control a walker's bones
|
||||
|
||||
|
@ -40,6 +106,7 @@ client.set_timeout(2.0)
|
|||
```
|
||||
|
||||
#### Spawning a walker
|
||||
|
||||
Spawn a random walker at one of the map's spawn points
|
||||
|
||||
```py
|
||||
|
@ -71,6 +138,3 @@ second_tuple = ('crl_hand__L', carla.Transform(rotation=carla.Rotation(roll=90))
|
|||
control.bone_transforms = [first_tuple, second_tuple]
|
||||
world.player.apply_control(control)
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -26,12 +26,16 @@
|
|||
# - PROPERTIES -------------------------
|
||||
instance_variables:
|
||||
- var_name: r
|
||||
type: int
|
||||
doc: >
|
||||
- var_name: g
|
||||
type: int
|
||||
doc: >
|
||||
- var_name: b
|
||||
type: int
|
||||
doc: >
|
||||
- var_name: a
|
||||
type: int
|
||||
doc: >
|
||||
# - METHODS ----------------------------
|
||||
methods:
|
||||
|
|
|
@ -214,8 +214,8 @@
|
|||
doc: >
|
||||
This function executes the whole list of commands on a single simulation step.
|
||||
For example, to set autopilot on some actors, we could use:
|
||||
[sample_code](https://github.com/carla-simulator/carla/blob/10c5f6a482a21abfd00220c68c7f12b4110b7f63/PythonAPI/examples/spawn_npc.py#L126)
|
||||
We don't have control about the response of each command. If we need that, we can use apply_batch_sync().
|
||||
[sample_code](https://github.com/carla-simulator/carla/blob/10c5f6a482a21abfd00220c68c7f12b4110b7f63/PythonAPI/examples/spawn_npc.py#L126).
|
||||
We don't have control about the response of each command. If we need that, we can use `apply_batch_sync()`.
|
||||
|
||||
# --------------------------------------
|
||||
- def_name: apply_batch_sync
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
# - DESCRIPTION ------------------------
|
||||
doc: >
|
||||
Execution result of a command, contains either an error string or and
|
||||
actor ID, depending on whether or not the command succeeded. See
|
||||
`client.apply_batch_sync()`
|
||||
actor ID, depending on whether or not the command succeeded. See `client.apply_batch_sync()`
|
||||
# - PROPERTIES -------------------------
|
||||
instance_variables:
|
||||
- var_name: actor_id
|
||||
|
|
|
@ -137,6 +137,7 @@
|
|||
# - PROPERTIES -------------------------
|
||||
instance_variables:
|
||||
- var_name: name
|
||||
type: str
|
||||
doc: >
|
||||
Map name. Comes from the Unreal's UMap name if loaded from a Carla server
|
||||
# - METHODS ----------------------------
|
||||
|
|
|
@ -17,6 +17,7 @@ nav:
|
|||
- 'How to build on Windows': 'how_to_build_on_windows.md'
|
||||
- Advanced topics:
|
||||
- 'Python API reference': 'python_api.md'
|
||||
- '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'
|
||||
|
|
Loading…
Reference in New Issue