Add getting started and running standalone simulator docs
This commit is contained in:
parent
810b84e084
commit
c803d6f7e9
|
@ -9,7 +9,7 @@
|
|||
[CARLA/Server]
|
||||
; If set to false, a mock controller will be used instead of waiting for a real
|
||||
; client to connect. (Server only)
|
||||
UseNetworking=true
|
||||
UseNetworking=false
|
||||
; Ports to use for the server-client communication. This can be overridden by
|
||||
; the command-line switch `-world-port=N`, write and read ports will be set to
|
||||
; N+1 and N+2 respectively. (Server only)
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
<h1>Getting started with CARLA</h1>
|
||||
|
||||
![Welcome to CARLA](img/welcome.png)
|
||||
|
||||
Welcome to CARLA! This tutorial provides the basic steps for getting started
|
||||
using CARLA.
|
||||
|
||||
<!-- Latest release button -->
|
||||
<p align="middle"><a href="https://github.com/carla-simulator/carla/releases/latest" 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>
|
||||
|
||||
Download the latest release from our GitHub page and extract all the contents of
|
||||
the package in a folder of your choice.
|
||||
|
||||
The release package contains the following
|
||||
|
||||
* The CARLA simulator.
|
||||
* The "carla" Python module.
|
||||
* Some Python client examples.
|
||||
|
||||
For now we will focus on the simulator only. The simulator can be run in two
|
||||
different modes
|
||||
|
||||
* **Server mode:** The simulator is controlled by a client application that
|
||||
collects data and sends driving instructions. In this mode the simulator
|
||||
hangs until a client starts a connection.
|
||||
* **Standalone mode:** The simulator starts in sort of _video-game mode_ in
|
||||
which you can control the vehicle with the keyboard.
|
||||
|
||||
In the next item in this tutorial we will run the **standalone mode** to take a
|
||||
first look into CARLA.
|
Binary file not shown.
After Width: | Height: | Size: 1.5 MiB |
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
|
@ -0,0 +1,59 @@
|
|||
<h1>Running the CARLA simulator in standalone mode</h1>
|
||||
|
||||
Inside the downloaded package you should find a shell script called
|
||||
`CarlaUE4.sh`, this script launches the CARLA simulator.
|
||||
|
||||
!!! tip
|
||||
Although this tutorial focuses on Linux, all the commands work as well in
|
||||
Windows. Just replace all the occurrences of `./CarlaUE4.sh` by
|
||||
`CarlaUE4.exe`.
|
||||
|
||||
Run this script without arguments to launch CARLA simulator in standalone mode
|
||||
with default settings
|
||||
|
||||
$ ./CarlaUE4.sh
|
||||
|
||||
This launches the simulator window in full-screen, and you should be able
|
||||
now to drive around the city using the WASD keys, and Q for toggling reverse
|
||||
gear. See ["Keyboard input"](simulator_keyboard_input.md) for the complete list
|
||||
of key-bindings.
|
||||
|
||||
![Simulator window](img/simulator_window.png)
|
||||
|
||||
We have currently two scenarios available, _Town01_ and _Town02_. You may want
|
||||
now to take a look at _Town02_, you can do so by running the script with
|
||||
|
||||
$ ./CarlaUE4.sh /Game/Maps/Town02
|
||||
|
||||
All the parameters like number of other vehicles, pedestrians, and weather
|
||||
conditions can be controlled when launching the simulation. These parameters are
|
||||
set in a _"CarlaSettings.ini"_ file that is passed to the simulator either as a
|
||||
command-line parameter or when connecting with a Python client. This file
|
||||
controls all the variable of the CARLA simulator, from server settings to
|
||||
attaching sensors to the vehicle, we will cover all these later, for now we will
|
||||
just change some visible aspect in the standalone mode. For a detailed
|
||||
description of how the settings work, see ["CARLA Settings"](carla_settings.md)
|
||||
section.
|
||||
|
||||
Open the file _"Example.CarlaSettings.ini"_ in a text editor, search for the
|
||||
following keys and modify their values
|
||||
|
||||
```ini
|
||||
NumberOfVehicles=60
|
||||
NumberOfPedestrians=60
|
||||
WeatherId=3
|
||||
```
|
||||
|
||||
Now run the simulator passing the settings file as argument with
|
||||
|
||||
$ ./CarlaUE4.sh -carla-settings=Example.CarlaSettings.ini
|
||||
|
||||
Now the simulation should have more vehicles and pedestrians, and a
|
||||
different weather preset.
|
||||
|
||||
!!! tip
|
||||
You can launch the simulator in windowed mode by using the argument
|
||||
`-windowed`, and control the window size with `-ResX=N` and `-ResY=N`.
|
||||
|
||||
In the next item of this tutorial we show how to control the simulator with a
|
||||
Python client.
|
|
@ -0,0 +1,25 @@
|
|||
<h1>CARLA Simulator keyboard input</h1>
|
||||
|
||||
The following key bindings are available during game play at the simulator
|
||||
window. Note that vehicle controls are only available when running in
|
||||
_standalone mode_.
|
||||
|
||||
Key | Action
|
||||
---------------:|:----------------
|
||||
`W` | Throttle
|
||||
`S` | Brake
|
||||
`A` `D` | Steer
|
||||
`Q` | Toggle reverse gear
|
||||
`Space` | Hand-brake
|
||||
`P` | Toggle autopilot
|
||||
`←` `→` `↑` `↓` | Move camera
|
||||
`PgUp` `PgDn` | Zoom in and out
|
||||
`Mouse Wheel` | Zoom in and out
|
||||
`Tab` | Toggle on-board camera
|
||||
`F11` | Toggle fullscreen
|
||||
`R` | Restart level
|
||||
`G` | Toggle HUD
|
||||
`C` | Change weather/lighting
|
||||
`Enter` | Jump
|
||||
`F` | Use the force
|
||||
`Alt+F4` | Quit
|
Loading…
Reference in New Issue