From 65555c3844d6826d437949b82b10c1517f9c52ff Mon Sep 17 00:00:00 2001 From: "sergi.e" <59253112+sergi-e@users.noreply.github.com> Date: Thu, 19 Mar 2020 14:01:01 +0100 Subject: [PATCH] Sergi e/p098 ros (#2591) * New style iteration * New iteration style ROS * Iteration on H comments * Fix arch=amd 64 trusted=yes * Fixed codacy issues * Fixes for J revie * Fixed typo. --- Docs/ros_installation.md | 121 +++--- Docs/ros_launchs.md | 95 ++--- Docs/ros_msgs.md | 797 ++++++++++++++++++++++++++++++--------- Docs/start_quickstart.md | 33 +- 4 files changed, 761 insertions(+), 285 deletions(-) diff --git a/Docs/ros_installation.md b/Docs/ros_installation.md index ea260877f..0e7bd0369 100644 --- a/Docs/ros_installation.md +++ b/Docs/ros_installation.md @@ -1,23 +1,20 @@ # ROS bridge installation - * [__Requirements__](#requirements) - * [__Bridge installation__](#bridge-installation) +* [__Requirements__](#requirements) +* [__Bridge installation__](#bridge-installation) * a) using apt repository * b) using source repository - * [__Run the ROS bridge__](#run-the-ros-bridge) - * Solving ImportError: No module named CARLA - * [__Setting CARLA__](#setting-carla) +* [__Run the ROS bridge__](#run-the-ros-bridge) +* [__Setting CARLA__](#setting-carla) -The ROS bridge enables two-way communication between ROS and CARLA. -In order to do so, the information from the CARLA server is translated to ROS topics. For example, the information retrieved by sensors is structured to fit ROS messages. -In the same way, the messages sent between nodes in ROS get translated to commands to be applied in CARLA. This is commonly used to update the state of a vehicle and apply controllers. +The ROS bridge enables two-way communication between ROS and CARLA. The information from the CARLA server is translated to ROS topics. In the same way, the messages sent between nodes in ROS get translated to commands to be applied in CARLA. --- ## Requirements -#### ROS melodic +### ROS Kinetic/Melodic - * __ROS Kinetic/Melodic:__ follow the official documentation to [install ROS](http://wiki.ros.org/melodic/Installation/Ubuntu). Some ROS packages may be required, depending on the user needs, such as [rviz](https://wiki.ros.org/ainstein_radar_rviz_plugins) to visualize ROS data. - * __CARLA 0.9.7:__ previous versions are not compatible with the ROS bridge. Follow the [quick start installation](../getting_started/quickstart) or make the build for the corresponding platform. +* __ROS Kinetic/Melodic.__ Install ROS [Melodic](http://wiki.ros.org/melodic/Installation/Ubuntu), for Ubuntu 18.04, or [Kinetic](http://wiki.ros.org/kinetic/Installation), for Ubuntu 16.04. ROS packages may be required, depending on the user needs. [rviz](http://wiki.ros.org/rviz) to visualize ROS data. +* __CARLA 0.9.7 or later.__ Previous versions are not compatible with the ROS bridge. Follow the [quick start installation](../getting_started/quickstart) or make the build for the corresponding platform. !!! Important Make sure that both CARLA and ROS work properly before continuing with the installation. @@ -25,32 +22,32 @@ In the same way, the messages sent between nodes in ROS get translated to comman --- ## Bridge installation -#### a) Using apt repository +### a) Using apt repository -First add the apt repository: +Add the apt repository. -* __Bridge for ROS Melodic:__ +* __Bridge for ROS Melodic.__ ```sh sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 81061A1A042F527D && -sudo add-apt-repository "deb [trusted=yes] http://dist.carla.org/carla-ros-bridge-melodic/ bionic main" +sudo add-apt-repository "deb [arch=amd64 trusted=yes] http://dist.carla.org/carla-ros-bridge-melodic/ bionic main" ``` -* __Bridge for ROS Kinetic:__ +* __Bridge for ROS Kinetic.__ ```sh sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9BE2A0CDC0161D6C && -sudo add-apt-repository "deb [trusted=yes] http://dist.carla.org/carla-ros-bridge-kinetic xenial main" +sudo add-apt-repository "deb [arch=amd64 trusted=yes] http://dist.carla.org/carla-ros-bridge-kinetic xenial main" ``` -Then simply install the ROS bridge: +Install the ROS bridge. ```sh sudo apt update && sudo apt install carla-ros-bridge- ``` -#### b) Using source repository +### b) Using source repository + +A catkin workspace is needed to use the ROS bridge. It should be cloned and built in there. The following code creates a new workspace, and clones the repository in there. -In order to use the ROS bridge, a catkin workspace is needed. It should be cloned and built in there. -The following fragment creates a new workspace and clones the repository in there. ```sh #setup folder structure mkdir -p ~/carla-ros-bridge/catkin_ws/src @@ -72,28 +69,28 @@ catkin_make --- ## Run the ROS bridge -__1) run CARLA:__ the way to do so will depend on the the CARLA installation chosen, so here is a brief summary: +__1) Run CARLA.__ The way to do so depends on the CARLA installation. -* __Quick start/release package:__ run `./CarlaUE4.sh` in `/carla/`. -* __apt installation:__ run `./CarlaUE4.sh` in `/opt/carla/bin/`. -* __Build installation:__ run `make launch` in `/carla/`. +* __Quick start/release package.__ `./CarlaUE4.sh` in `carla/`. +* __apt installation.__ `./CarlaUE4.sh` in `opt/carla/bin/`. +* __Build installation.__ `make launch` in `carla/`. -__2) Add the source path:__ the source path for the workspace should be added so that the ROS bridge can be used from a terminal: +__2) Add the source path.__ The source path for the workspace has to be added, so that the ROS bridge can be used from a terminal. -* __Source for apt ROS bridge:__ +* __Source for apt ROS bridge.__ ```sh source /opt/carla-ros-bridge//setup.bash ``` -* __Source for ROS bridge repository download:__ +* __Source for ROS bridge repository download.__ ```sh source ~/carla-ros-bridge/catkin_ws/devel/setup.bash ``` !!! Important - The source path can be added to the environment to be set permanently, but it will cause conflict when working with another workspace. + The source path can be set permanently, but it will cause conflict when working with another workspace. -__3) start the ROS bridge:__ use any of the different launch files available that will serve to check if the bridge is running properly. Here are some suggestions: +__3) Start the ROS bridge.__ Use any of the different launch files available to check the installation. Here are some suggestions. ```sh # Option 1: start the ros bridge @@ -106,54 +103,58 @@ roslaunch carla_ros_bridge carla_ros_bridge_with_rviz.launch roslaunch carla_ros_bridge carla_ros_bridge_with_example_ego_vehicle.launch ``` -#### Solving ImportError: no module named CARLA +
+ +
ImportError: no module named CARLA
+
-The path to CARLA Python is missing. The apt installation does this automatically, but it may be missing for other installations. Execute the following command with the complete path to the _.egg_ file (included). Use the one that, is supported by the Python version installed: +The path to CARLA Python is missing. The apt installation does this automatically, but it may be missing for other installations. Execute the following command with the complete path to the .egg file (included). Use the one supported by the Python version installed. +
+Note: .egg files may be either in `/PythonAPI/` or `/PythonAPI/dist/` depending on the CARLA installation. +```sh export PYTHONPATH=$PYTHONPATH:/PythonAPI/ +``` -!!! Note - _.egg_ files may be either in `/PythonAPI/` or `/PythonAPI/dist/` depending on the CARLA installation. - -To check the installation, import CARLA from Python and wait for a sucess message: +Import CARLA from Python and wait for a sucess message to check the installation. ```sh python -c 'import carla;print("Success")' ``` +
--- ## Setting CARLA -Settings can be changed, in order to modify the way CARLA works along with the ROS bridge, by editing the file: [`share/carla_ros_bridge/config/settings.yaml`](https://github.com/carla-simulator/ros-bridge/blob/master/carla_ros_bridge/config/settings.yaml). - -The parameters available refer to: - -* __Host/port:__ the network settings to connect to CARLA using a Python client. -* __Synchronous mode:__ - * __If false (default):__ data is published on every `world.on_tick()` and every `sensor.listen()` callbacks. - * __If true:__ the bridge waits for all the sensor messages expected before the next tick. This might slow down the overall simulation but ensures reproducible results. -* __Wait for vehicle command:__ in synchronous mode, pauses the tick until a vehicle control is completed. -* __Simulation time-step:__ simulation time (delta seconds) between simulation steps. __It must be lower than 0.1__. Take a look at the [documentation](../simulation_time_and_synchrony) to learn more about this. -* __Role names for the Ego vehicles:__ role names to identify ego vehicles. These will be controllable from ROS and thus, relevant topics will be created. +To modify the way CARLA works along with the ROS bridge, edit [`share/carla_ros_bridge/config/settings.yaml`](https://github.com/carla-simulator/ros-bridge/blob/master/carla_ros_bridge/config/settings.yaml). +* __Host/port.__ Network settings to connect to CARLA using a Python client. +* __Synchronous mode.__ + * __If false (default).__ Data is published on every `world.on_tick()` and every `sensor.listen()` callbacks. + * __If true__ The bridge waits for all the sensor messages expected before the next tick. This might slow down the overall simulation but ensures reproducible results. +* __Wait for vehicle command.__ In synchronous mode, pauses the tick until a vehicle control is completed. +* __Simulation time-step.__ Simulation time (delta seconds) between simulation steps. __It must be lower than 0.1__. Take a look at the [documentation](../simulation_time_and_synchrony) to learn more about this. +* __Role names for the Ego vehicles.__ Role names to identify ego vehicles. These will be controllable from ROS and thus, relevant topics will be created. !!! Warning - In synchronous mode only the ros-bridge is allowed to tick. Other CARLA clients must passively wait. + In synchronous mode only the ros-bridge is allowed to tick. Other clients must passively wait. -#### Synchronous mode +### Synchronous mode -The following topic allows to control the step update when in synchronous mode: +To control the step update when in synchronous mode, use the following topic. The message contains a constant named `command` that allows to __Pause/Play__ the simulation, and execute a __single step__. -| Topic | Message type | -| ---------------- | ----------------------- | -| `/carla/control` | [carla_msgs.CarlaControl](../ros_msgs#carlacontrolmsg) | + + + + + + + + + +
TopicMessage type
/carla/control carla_msgs.CarlaControl
+
-The message contains a constant named `command` that allows to: - -* Pause/Play the simulation. -* Execute a single step. - -The [Control rqt plugin](https://github.com/carla-simulator/ros-bridge/blob/master/rqt_carla_control/README.md) launches a new window with a simple interface to manage these steps and publish in the corresponding topic. -Simply run the following when CARLA is in synchronous mode: +The [Control rqt plugin](https://github.com/carla-simulator/ros-bridge/blob/master/rqt_carla_control/README.md) launches a new window with a simple interface. It is used to manage the steps and publish in the corresponding topic. Simply run the following when CARLA in synchronous mode. ```sh rqt --standalone rqt_carla_control ``` diff --git a/Docs/ros_launchs.md b/Docs/ros_launchs.md index 4cd26642f..33480bea6 100644 --- a/Docs/ros_launchs.md +++ b/Docs/ros_launchs.md @@ -3,17 +3,20 @@ --- ## carla_ackermann_control.launch -Creates a node to manage a vehicle using Ackermann controls instead of the CARLA control messages. The node reads the vehicle info from CARLA and uses it to define the controller. A simple Python PID is used to adjust acceleration/velocity. It can be installed using: +Creates a node to manage a vehicle using Ackermann controls instead of the CARLA control messages. The node reads the vehicle info from CARLA and uses it to define the controller. A simple Python PID is used to adjust acceleration/velocity. This is a Python dependency that can be easily installed with _pip_. ```sh pip install --user simple-pid ``` -Initial parameters can be set in: `share/carla_ackermann_control/config/settings.yaml`. -It is possible to modify the parameters during runtime via ROS dynamic reconfigure. +It is possible to modify the parameters in runtime via ROS dynamic reconfigure. Initial parameters can be set using a `settings.yaml`. The path to it depends on the bridge installation. + +* __Deb repository installation__, +`/opt/carla-ros-bridge/melodic/share/carla_ackermann_control/config/settings.yaml`. +* __Source repository installation__, +`/catkin_ws/src/ros-bridge/carla_ackermann_control/config/settings.yaml`.

/carla_ackermann_control_ego_vehicle (Node)

-Converts [AckermannDrive messages](http://docs.ros.org/jade/api/ackermann_msgs/html/msg/AckermannDrive.htm) to [CarlaEgoVehicleControl.msg](../ros_msgs#carlaegovehiclemsg). -Speed is in __m/s__, steering angle is driving angle (not wheel angle) in __radians__. +Converts [AckermannDrive messages](http://docs.ros.org/jade/api/ackermann_msgs/html/msg/AckermannDrive.htm) to [CarlaEgoVehicleControl.msg](../ros_msgs#carlaegovehiclemsg). Speed is in __m/s__, steering angle in __radians__ and refers to driving angle, not wheel angle.

Subscribed to:

@@ -32,12 +35,13 @@ Speed is in __m/s__, steering angle is driving angle (not wheel angle) in __radi --- ## carla_ego_vehicle.launch -Spawns an ego vehicle (`role-name="ego_vehicle"`). To describe the sensors attached to the vehicle, the `sensor_definition_file argument` is used. This contains the location of a __.json__ file describing sensors attached to the vehicle. The format for this file is explained [here](https://github.com/carla-simulator/ros-bridge/tree/master/carla_ego_vehicle). -To spawn the vehicle at a specific location, publish in: `/carla/ego_vehicle/initialpose` or use __RVIZ__ and select a position with: __2D Pose estimate__. +Spawns an ego vehicle (`role-name="ego_vehicle"`). The argument `sensor_definition_file` describes the sensors attached to the vehicle. It is the location of a __.json__ file. The format of this file is explained [here](https://github.com/carla-simulator/ros-bridge/tree/master/carla_ego_vehicle). + +To spawn the vehicle at a specific location, publish in `/carla/ego_vehicle/initialpose`, or use __RVIZ__ and select a position with __2D Pose estimate__.

carla_ego_vehicle_ego_vehicle (Node)

-Spawns an ego vehicle with sensors attached and waits for world information. +Spawns an ego vehicle with sensors attached, and waits for world information.

Subscribed to:

@@ -46,7 +50,12 @@ Spawns an ego vehicle with sensors attached and waits for world information. --- ## carla_example_ego_vehicle.launch -Based on [carla_ego_vehicle.launch](#carla-ego-vehicle-launch), spawns an ego vehicle (`role-name="ego_vehicle"`) using a provided file describing the sensors. Said file can be found in: `share/carla_ego_vehicle/config/sensors.json`. +Based on [carla_ego_vehicle.launch](#carla-ego-vehicle-launch), spawns an ego vehicle (`role-name="ego_vehicle"`). The file `sensors.json` describes the sensors attached. The path to it depends on the bridge installation. + +* __Deb repository installation__, +`/opt/carla-ros-bridge/melodic/share/carla_ego_vehicle/config/sensors.json`. +* __Source repository installation__, +`/catkin_ws/src/ros-bridge/carla_ego_vehicle/config/sensors.json`.

carla_ego_vehicle_ego_vehicle (Node)

@@ -75,8 +84,7 @@ Creates a node with some basic communications between CARLA and ROS.

carla_ros_bridge (Node)

-Publishes the data regarding the current state of the simulation: world, objects, trafic lights, actors... -Receives the debug shapes being drawn, which include: arrows, points, cubes and line strips. +Publishes the data regarding the current state of the simulation. Reads the debug shapes being drawn.

Subscribed to:

@@ -93,12 +101,11 @@ Receives the debug shapes being drawn, which include: arrows, points, cubes and --- ## carla_ros_bridge_with_ackermann_control.launch -Launches two basic nodes, one to retrieve simulation data and another one to control a vehicle using [AckermannDrive messages](http://docs.ros.org/jade/api/ackermann_msgs/html/msg/AckermannDrive.htm). +Launches two basic nodes. One retrieves simulation data, the other controls a vehicle using [AckermannDrive messages](http://docs.ros.org/jade/api/ackermann_msgs/html/msg/AckermannDrive.htm).

carla_ros_bridge (Node)

-Publishes the data regarding the current state of the simulation: world, objects, trafic lights, actors... -Receives the debug shapes being drawn, which include: arrows, points, cubes and line strips.10px +Publishes data regarding the current state of the simulation. Reads the debug shapes being drawn.

Subscribed to:

@@ -114,8 +121,7 @@ Receives the debug shapes being drawn, which include: arrows, points, cubes and

/carla_ackermann_control_ego_vehicle (Node)

-Converts [AckermannDrive messages](http://docs.ros.org/jade/api/ackermann_msgs/html/msg/AckermannDrive.htm) to [CarlaEgoVehicleControl.msg](../ros_msgs#carlaegovehiclemsg). -Speed is in __m/s__, steering angle is driving angle (not wheel angle) in __radians__. +Converts [AckermannDrive messages](http://docs.ros.org/jade/api/ackermann_msgs/html/msg/AckermannDrive.htm) to [CarlaEgoVehicleControl.msg](../ros_msgs#carlaegovehiclemsg). Speed is in __m/s__, steering angle is in __radians__ and refers to driving angle, not wheel angle.

Subscribed to:

@@ -134,12 +140,11 @@ Speed is in __m/s__, steering angle is driving angle (not wheel angle) in __radi --- ## carla_ros_bridge_with_example_ego_vehicle.launch -Spawns an ego vehicle with sensors attached and starts communications between CARLA and ROS sharing current simulation state, sensor and ego vehicle data. -The ego vehicle is set ready to be used in manual control. +Spawns an ego vehicle with sensors attached, and starts communications between CARLA and ROS. Both share current simulation state, sensor and ego vehicle data. The ego vehicle is set ready to be used in manual control.

carla_ros_bridge (Node)

-This node is in charge of most of the communications between CARLA and ROS for both the current state of the simulation, traffic lights, vehicle controllers and sensor data. +In charge of the communications between CARLA and ROS. They share the current state of the simulation, traffic lights, vehicle controllers and sensor data.

Subscribed to:

* /carla/debug_marker — [visualization_msgs.MarkerArray](http://docs.ros.org/melodic/api/visualization_msgs/html/msg/MarkerArray.html) @@ -172,8 +177,7 @@ This node is in charge of most of the communications between CARLA and ROS for b

/carla_manual_control_ego_vehicle (Node)

-Retrieves information from CARLA regarding the ego vehicle. Uses keyboard input to publish messages containing the controller data to manage the ego vehicle. -The information retrieved includes both static and current state, the sensor data registered on every step and the general settings of the simulation. +Retrieves information from CARLA regarding the ego vehicle. Uses keyboard input to publish controller messages for the ego vehicle. The information retrieved includes static data, current state, sensor data, and simulation settings.

Subscribed to:

@@ -195,16 +199,16 @@ The information retrieved includes both static and current state, the sensor dat

/carla_ego_vehicle_ego_vehicle (Node)

-Spawns an ego vehicle with sensors attached and waits for world information. +Spawns an ego vehicle with sensors attached. Reads world information.

Subscribed to:

* /carla/ego_vehicle/initialpose — [geometry_msgs/PoseWithCovarianceStamped](http://docs.ros.org/melodic/api/geometry_msgs/html/msg/PoseWithCovarianceStamped.html) - --- ## carla_ros_bridge_with_rviz.launch -Starts some basic communications between CARLA and ROS and launches an instance of RVIZ ready to retrieve Lidar data. + +Starts communications between CARLA and ROS, and launches RVIZ to retrieve Lidar data.

carla_ros_bridge (Node)

Shares information between CARLA and ROS regarding the current simulation state. @@ -223,7 +227,7 @@ Shares information between CARLA and ROS regarding the current simulation state.

/rviz (Node)

-Runs an instance of RVIZ waiting for Lidar data. +Runs an instance of RVIZ, and waits for Lidar data.

Subscribed to:

@@ -235,18 +239,16 @@ Runs an instance of RVIZ waiting for Lidar data. --- ## carla_manual_control.launch -A ROS version of the CARLA script `manual_control.py` that receives and manages the information using ROS topics. It has some prerequisites: +A ROS version of the CARLA script `manual_control.py`. It has some prequisites. -* To display an image: a camera with role-name 'view' and resolution 800x600. -* To display the position: a gnss sensor with role-name 'gnss1'. -* To detect other sensor data: the corresponding sensor. +* __To display an image__, a camera with role-name `view` and resolution 800x600. +* __To display the position__, a gnss sensor with role-name `gnss1`. +* __To detect other sensor data__, the corresponding sensor.

/carla_manual_control_ego_vehicle (Node)

-Retrieves information from CARLA regarding the ego vehicle. Uses keyboard input to publish messages containing the controller data to manage the ego vehicle. -The information retrieved includes both static and current state, the sensor data registered on every step and the general settings of the simulation. - +Retrieves information from CARLA regarding the ego vehicle. Uses keyboard input to publish controller messages for the ego vehicle. The information retrieved includes static data, current state, sensor data, and simulation settings.

Subscribed to:

@@ -268,8 +270,10 @@ The information retrieved includes both static and current state, the sensor dat --- ## carla_pcl_recorder.launch -Creates a pointcloud map for the current CARLA level by letting an ego vehicle in autopilot mode roam around with a Lidar sensor attached. -The captured point clouds are saved in the `/tmp/pcl_capture` directory. Once the capture is done, the overall size can be reduced: +Creates a pointcloud map for the current CARLA level. An autopilot ego vehicle roams around the map with a LIDAR sensor attached. + +The point clouds are saved in the `/tmp/pcl_capture` directory. Once the capture is done, the overall size can be reduced. + ```sh #create one point cloud file pcl_concatenate_points_pcd /tmp/pcl_capture/*.pcd @@ -281,14 +285,15 @@ pcl_voxel_grid -leaf 0.1,0.1,0.1 output.pcd map.pcd pcl_viewer map.pcd ``` -In order to run it, the launch file requires some functionality that is not part of the python egg-file, so the PYTHONPATH has to be extended: +The launch file requires some functionality that is not part of the python egg-file. The PYTHONPATH has to be extended. + ```sh export PYTHONPATH=/PythonAPI/carla/dist/carla-.egg:/PythonAPI/carla/ ```

carla_ros_bridge (Node)

-This node is in charge of most of the communications between CARLA and ROS for both the current state of the simulation, traffic lights, vehicle controllers and sensor data. +In charge of most of the communications between CARLA and ROS. Both share the current state of the simulation, traffic lights, vehicle controllers and sensor data.

Subscribed to:

@@ -322,8 +327,7 @@ This node is in charge of most of the communications between CARLA and ROS for b

/carla_manual_control_ego_vehicle (Node)

-Retrieves information from CARLA regarding the ego vehicle. Uses keyboard input to publish messages containing the controller data to manage the ego vehicle. -The information retrieved includes both static and current state, the sensor data registered on every step and the general settings of the simulation. +Retrieves information from CARLA regarding the ego vehicle. Uses keyboard input to publish controller messages for the ego vehicle. The information retrieved includes static data, current state, sensor data, and simulation settings.

Subscribed to:

@@ -345,7 +349,7 @@ The information retrieved includes both static and current state, the sensor dat

/carla_ego_vehicle_ego_vehicle (Node)

-Spawns an ego vehicle with sensors attached and waits for world information. +Spawns an ego vehicle with sensors attached. Waits for world information.

Subscribed to:

@@ -362,7 +366,7 @@ Changes between autopilot and manual control modes.

/pcl_recorder_node (Node)

-Receives the cloud point data to map the surroundings. +Receives the cloud point data.

Subscribed to:

@@ -371,20 +375,17 @@ Receives the cloud point data to map the surroundings. --- ## carla_waypoint_publisher.launch -Calculates a waypoint route for an ego vehicle. -The calculated route is published in: `/carla//waypoints`. -The goal is either read from the ROS topic `/carla//goal`, if available, or a fixed spawnpoint is used. -The prefered way of setting a goal is to click __2D Nav Goal__ in RVIZ. +Calculates a waypoint route for an ego vehicle. The route is published in `/carla//waypoints`. The goal is either read from the ROS topic `/carla//goal`, or a fixed spawnpoint is used. +The prefered way of setting a goal is to click __2D Nav Goal__ in RVIZ. - -In order to run it, the launch file requires some functionality that is not part of the python egg-file, so the PYTHONPATH has to be extended: +The launch file requires some functionality that is not part of the python egg-file. The PYTHONPATH has to be extended. ```sh export PYTHONPATH=$PYTHONPATH:/PythonAPI/carla-.egg:/PythonAPI/carla/ ```

/carla_waypoint_publisher (Node)

-Uses the current pose of the ego vehicle with role-name `ego_vehicle` as starting point. If the vehicle is respawned or moved, the route is calculated again. +Uses the current pose of the ego vehicle as starting point. If the vehicle is respawned or moved, the route is calculated again.

Subscribed to:

diff --git a/Docs/ros_msgs.md b/Docs/ros_msgs.md index 1b21b50e8..038c44fcd 100644 --- a/Docs/ros_msgs.md +++ b/Docs/ros_msgs.md @@ -1,7 +1,8 @@ # CARLA messages reference -The following reference lists all the CARLA messages available in the ROS bridge. These can be used to enable communication in both ways. -Any doubts regarding these messages or the CARLA-ROS bridge can be solved in the forum: +The following reference lists all the CARLA messages available in the ROS bridge. + +Any doubts regarding these messages or the CARLA-ROS bridge can be solved in the forum.
@@ -14,45 +15,96 @@ CARLA forum --- ## CarlaActorInfo.msg -Comprises the information regarding an actor to be shared between ROS and CARLA. -The [CarlaActorList.msg](#carlaactorlist) message is a list of these items. +Information shared between ROS and CARLA regarding an actor. + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
id uint32The ID of the actor.
parent_id uint32The ID of the parent actor. `0` if no parent available.
type stringThe identifier of the blueprint this actor was based on.
rolename stringRole assigned to the actor when spawned.
-| Field | Type | Description | -| ----------- | ------ | ----------- | -| `id` | uint32 | The ID of the actor. | -| `parent_id` | uint32 | The ID of the parent actor. `0` if no parent available. | -| `type` | string | The identifier of the blueprint this actor was based on. | -| `rolename` | string | Role assigned to the actor when spawned. | --- ## CarlaActorList.msg -Contains a list of messages with some basic information for CARLA actors. +A list of messages with some basic information for CARLA actors. -| Field | Type | Description | -| ----------- | ---------------- | ----------- | -| `actors` | [CarlaActorInfo](#carlaactorinfomsg)[] | List of messages with actors' information. | + + + + + + + + + + + +
FieldTypeDescription
actors CarlaActorInfoList of messages with actors' information.
--- ## CarlaCollisionEvent.msg -Registers information regarding a collision event detected by the collision sensor of an actor. +Data retrieved on a collision event detected by the collision sensor of an actor. + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
header HeaderTime stamp and frame ID when the message is published.
other_actor_id uint32ID of the actor against whom the collision was detected.
normal_impulse geometry_msgs/Vector3Vector representing resulting impulse from the collision.
-| Field | Type | Description | -| ---------------- | --------------------- | ----------- | -| `header` | [Header](http://docs.ros.org/melodic/api/std_msgs/html/msg/Header.html) | Time stamp and frame ID when the message is published. | -| `other_actor_id` | uint32 | ID of the actor against whom the collision was detected. | -| `normal_impulse` | geometry_msgs/Vector3 | Vector representing resulting impulse from the collision. | --- ## CarlaControl.msg -These messages are used to control the simulation while in synchronous mode. The constant defined is translated as stepping commands. - -| Field | Type | Description | -| ----------- | ---- | ----------- | -| `command` | int8 | __PLAY__=0
__PAUSE__=1
__STEP_ONCE__=2 | +These messages control the simulation while in synchronous mode. The constant defined is translated as stepping commands. + + + + + + + + + + + +
FieldTypeDescription
command int8PLAY=0
PAUSE=1
STEP_ONCE=2

!!! Important @@ -63,239 +115,644 @@ These messages are used to control the simulation while in synchronous mode. The Messages sent to apply a control to a vehicle in both modes, autopilot and manual. These are published in a stack. -| Field | Type | Description | -| ------------------- | ------- | ----------- | -| `header` | [Header](http://docs.ros.org/melodic/api/std_msgs/html/msg/Header.html) | Time stamp and frame ID when the message is published. | -| `throttle` | float32 | Scalar value to cotrol the vehicle throttle: __[0.0, 1.0]__ | -| `steer` | float32 | Scalar value to control the vehicle steering direction: __[-1.0, 1.0]__ to control the vehicle steering | -| `brake` | float32 | Scalar value to control the vehicle brakes: __[0.0, 1.0]__ | -| `hand_brake` | bool | If __True__, the hand brake is enabled. | -| `reverse` | bool | If __True__, the vehicle will move reverse. | -| `gear` | int32 | Changes between the available gears in a vehicle. | -| `manual_gear_shift` | bool | If __True__, the gears will be shifted using `gear`. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
header HeaderTime stamp and frame ID when the message is published.
throttle float32Scalar value to cotrol the vehicle throttle: [0.0, 1.0]
steer float32Scalar value to control the vehicle steering direction: [-1.0, 1.0] to control the vehicle steering
brake float32Scalar value to control the vehicle brakes: [0.0, 1.0]
hand_brake boolIf True, the hand brake is enabled.
reverse boolIf True, the vehicle will move reverse.
gear int32Changes between the available gears in a vehicle.
manual_gear_shift boolIf True, the gears will be shifted using gear.
+
--- ## CarlaEgoVehicleInfo.msg -Contains some static information regarding a vehicle, mostly the attributes used to define the vehicle's physics. +Static information regarding a vehicle, mostly the attributes used to define the vehicle's physics. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
id uint32ID of the vehicle actor.
type stringThe identifier of the blueprint this vehicle was based on.
type stringThe identifier of the blueprint this vehicle was based on.
rolename stringRole assigned to the vehicle.
wheels CarlaEgoVehicleInfoWheelList of messages with information regarding wheels.
max_rpm float32Maximum RPM of the vehicle's engine.
moi float32Moment of inertia of the vehicle's engine.
damping_rate_full_throttle float32Damping rate when the throttle is at maximum.
damping_rate_zero_throttle
_clutch_engaged
float32Damping rate when the throttle is zero with clutch engaged.
damping_rate_zero_throttle
_clutch_disengaged
float32Damping rate when the throttle is zero with clutch disengaged.
use_gear_autobox boolIf True, the vehicle will have an automatic transmission.
gear_switch_time float32Switching time between gears.
clutch_strength float32The clutch strength of the vehicle. Measured in Kgm^2/s.
mass float32The mass of the vehicle measured in Kg.
drag_coefficient float32Drag coefficient of the vehicle's chassis.
center_of_mass geometry_msgs/Vector3The center of mass of the vehicle.
+
-| Field | Type | Description | -| --------------------------------------------- | ------------------------------------------------------- | ----------- | -| `id` | uint32 | ID of the vehicle actor. | -| `type` | string | The identifier of the blueprint this vehicle was based on. | -| `rolename` | string | Role assigned to the vehicle. | -| `wheels` | [CarlaEgoVehicleInfoWheel](#carlaegovehicleinfowheel)[] | List of messages with information regarding wheels. | -| `max_rpm` | float32 | Maximum RPM of the vehicle's engine. | -| `moi` | float32 | Moment of inertia of the vehicle's engine. | -| `damping_rate_full_throttle` | float32 | Damping rate when the throttle is at maximum. | -| `damping_rate_zero_throttle_clutch_engaged` | float32 | Damping rate when the throttle is zero with clutch engaged. | -| `damping_rate_zero_throttle_clutch_disengaged`| float32 | Damping rate when the throttle is zero with clutch disengaged. | -| `use_gear_autobox` | bool | If __True__, the vehicle will have an automatic transmission. | -| `gear_switch_time` | float32 | Switching time between gears. | -| `clutch_strength` | float32 | The clutch strength of the vehicle. Measured in __Kgm^2/s__. | -| `mass` | float32 | The mass of the vehicle measured in Kg. | -| `drag_coefficient` | float32 | Drag coefficient of the vehicle's chassis. | -| `center_of_mass` | geometry_msgs/Vector3 | The center of mass of the vehicle. | --- ## CarlaEgoVehicleInfoWheel.msg -Contains some static information regarding a wheel that will be part of a [CarlaEgoVehicleInfo.msg](#carlaegovehicleinfo) message. +Static information regarding a wheel that will be part of a [CarlaEgoVehicleInfo.msg](#carlaegovehicleinfo) message. -| Field | Type | Description | -| ---------------------- | --------------------- | ----------- | -| `tire_friction` | float32 | A scalar value that indicates the friction of the wheel. | -| `damping_rate` | float32 | The damping rate of the wheel. | -| `max_steer_angle` | float32 | The maximum angle in degrees that the wheel can steer. | -| `radius` | float32 | The radius of the wheel in centimeters. | -| `max_brake_torque` | float32 | The maximum brake torque in Nm. | -| `max_handbrake_torque` | float32 | The maximum handbrake torque in Nm. | -| `position` | gemoetry_msgs/Vector3 | World position of the wheel. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
tire_friction float32A scalar value that indicates the friction of the wheel.
damping_rate float32The damping rate of the wheel.
max_steer_angle float32The maximum angle in degrees that the wheel can steer.
radius float32The radius of the wheel in centimeters.
max_brake_torque float32The maximum brake torque in Nm.
max_handbrake_torque float32The maximum handbrake torque in Nm.
position geometry_msgs/Vector3World position of the wheel.
+
--- ## CarlaEgoVehicleStatus.msg -Details the current status of the vehicle as an object in the world. +Current status of the vehicle as an object in the world. -| Fied | Type | Description | -| ------------- | ------------------------------------------------- | ----------- | -| `header` | [Header](http://docs.ros.org/melodic/api/std_msgs/html/msg/Header.html) | Time stamp and frame ID when the message is published. | -| `velocity` | float32 | Current speed of the vehicle. | -| `acceleration`| geometry_msgs/Accel | Current acceleration of the vehicle. | -| `orientation` | geometry_msgs/Quaternion | Current orientation of the vehicle. | -| `control` | [CarlaEgoVehicleControl](#carlaegovehiclecontrol) | Current control values as reported by CARLA. | + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
header headerTime stamp and frame ID when the message is published.
velocity float32Current speed of the vehicle.
acceleration geometry_msgs/AccelCurrent acceleration of the vehicle.
orientation geometry_msgs/QuaternionCurrent orientation of the vehicle.
control CarlaEgoVehicleControlCurrent control values as reported by CARLA.
+
--- ## CarlaLaneInvasionEvent.msg -These messages are used to publish lane invasions detected by a lane-invasion sensor attached to a vehicle. The invasions detected in the last step are passed as a list with a constant definition to identify the lane crossed. +These messages publish lane invasions detected by a lane-invasion sensor attached to a vehicle. The invasions detected in the last step are passed as a list with a constant definition to identify the lane crossed. + + + + + + + + + + + + + + + + +
FieldTypeDescription
header headerTime stamp and frame ID when the message is published.
crossed_lane_markings int32[]LANE_MARKING_OTHER=0
LANE_MARKING_BROKEN=1
LANE_MARKING_SOLID=2
+
-| Field | Type | Description | -| ----------------------- | ------- | ----------- | -| `header` | [Header](http://docs.ros.org/melodic/api/std_msgs/html/msg/Header.html) | Time stamp and frame ID when the message is published. | -| `crossed_lane_markings` | int32[] | __LANE_MARKING_OTHER__=0
__LANE_MARKING_BROKEN__=1
__LANE_MARKING_SOLID__=2 | --- ## CarlaScenario.msg Details for a test scenario. -| Field | Type | Description | -| ---------------| ------------------ | --------------------------------------------- | -| `name` | string | Name of the scenario. | -| `scenario_file`| string | Test file for the scenario. | -| `destination` | geometry_msgs/Pose | Goal location of the scenario. | -| `target_speed` | float64 | Desired speed to drive at during the scenario | + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
name stringName of the scenario.
scenario_file stringTest file for the scenario.
destination geometry_msgs/PoseGoal location of the scenario.
target_speed float64Desired speed during the scenario.
+
--- ## CarlaScenarioList.msg -Contains a list of test scenarios to run in ScenarioRunner. +List of test scenarios to run in ScenarioRunner. -| Field | Type | Description | -| ----------- | ------------------------------------ | ---------------------- | -| `scenarios` | [CarlaScenario](#carlascenariomsg)[] | The list of scenarios. | + + + + + + + + + + + +
FieldTypeDescription
scenarios CarlaScenario[]List of scenarios.
+
--- ## CarlaScenarioRunnerStatus.msg -Represents the current state of the ScenarioRunner, that can be managed using an enum definition. +Current state of the ScenarioRunner. It is managed using a constant. -| Field | Type | Description | -| -------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `status` | uint8 | Current state of the scenario as an enum:
__STOPPED__=0
__STARTING__=1
__RUNNING__=2
__SHUTTINGDOWN__=3
__ERROR__=4 | + + + + + + + + + + + +
FieldTypeDescription
status uint8Current state of the scenario as an enum:
STOPPED=0
STARTING=1
RUNNING=2
SHUTTINGDOWN=3
ERROR=4
+
--- ## CarlaStatus.msg -Details the current world settings of the simulation. +Current world settings of the simulation. -| Field | Type | Description | -| -------------------------- | ------- | ------------------------------------------------------------- | -| `frame` | uint64 | Current frame number. | -| `fixed_delta_seconds` | float32 | Simulation time between last and current step. | -| `synchronous_mode` | bool | If __True__, synchronous mode is enabled. | -| `synchronous_mode_running` | bool | __True__ when the simulation is running. __False__ when it is paused. | + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
frame uint64Current frame number.
fixed_delta_seconds float32Simulation time between last and current step.
synchronous_mode boolIf True, synchronous mode is enabled.
synchronous_mode_running boolTrue when the simulation is running. False when it is paused.
+
--- ## CarlaTrafficLightStatus.msg -Contains a constant definition regarding the state of a traffic light. +Constant definition regarding the state of a traffic light. -| Field | Type | Description | -| -------------------------- | ------- | ----------------------------------------- | -| `id` | uint32 | ID of the traffic light actor. | -| `state` | uint8 | __RED__=0
__YELLOW__=1
__GREEN__=2
__OFF__=3
__UNKNOWN__=4 | + + + + + + + + + + + + + + + +
FieldTypeDescription
id uint32ID of the traffic light actor.
state uint8RED=0
YELLOW=1
GREEN=2
OFF=3
UNKNOWN=4
+
--- ## CarlaTrafficLightStatusList.msg -Comprises a list of all traffic lights with their status. +List of traffic lights with their status. -| Field | Type | Description | -| ---------------- | ----------------------------------------------------- | ---------------- | -| `traffic_lights` | [CarlaTrafficLightStatus](#carlatrafficlightstatus)[] | A list of messages summarizing traffic light states. | + + + + + + + + + + + +
FieldTypeDescription
scenarios CarlaTrafficLightStatus`[]A list of messages summarizing traffic light states.
+
--- ## CarlaWalkerControl.msg -Contains the information needed to apply a movement controller to a walker. +Information needed to apply a movement controller to a walker. -| Field | Type | Description | -| ----------- | ---------------------- | ----------------------------- | -| `direction` | geometry_msgs/Vector3 | Vector that controls the direction of the walker. | -| `speed` | float32 | A scalar value to control the walker's speed. | -| `jump` | bool | If __True__, the walker will jump. | + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
direction geometry_msgs/Vector3Vector that controls the direction of the walker.
speed float32A scalar value to control the walker's speed.
jump boolIf True, the walker will jump.
+
--- ## CarlaWaypoint.msg -Summarizes data contained in a waypoint. +Data contained in a waypoint object. -| Field | Type | Description | -| ------------- | ------------------ | ----------------------------- | -| `road_id` | int32 | OpenDRIVE road's id. | -| `section_id` | int32 | OpenDRIVE section's id, based on the order that they are originally defined. | -| `lane_id` | int32 | OpenDRIVE lane's id, this value can be positive or negative which represents the direction of the current lane with respect to the road. | -| `is_junction` | bool | __True__ if the current Waypoint is on a junction as defined by OpenDRIVE. | -| `pose` | [geometry_msgs/Pose](http://docs.ros.org/api/geometry_msgs/html/msg/Pose.html) | Position and orientation of the waypoint. | + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
road_id int32OpenDRIVE road's id.
section_id int32OpenDRIVE section's id, based on the order that they are originally defined.
lane_id int32OpenDRIVE lane's id, this value can be positive or negative which represents the direction of the current lane with respect to the road.
is_junction boolTrue, if the current Waypoint is on a junction as defined by OpenDRIVE.
is_junction geometry_msgs/PoseTrue when the simulation is running. False when it is paused.
+
--- ## CarlaWorldInfo.msg -Information about the current CARLA map (name and OpenDRIVE). +Information about the current CARLA map. -| Field | Type | Description | -| ----------- | ------- | ----------------------------- | -| `map_name` | string | Name of the CARLA map loaded in the current world. | -| `opendrive` | string | .xodr OpenDRIVE file of the current map as a string. | + + + + + + + + + + + + + + + +
FieldTypeDescription
map_name stringName of the CARLA map loaded in the current world.
opendrive string.xodr OpenDRIVE file of the current map as a string.
+
--- ## EgoVehicleControlCurrent.msg -Represents the current time, speed and acceleration values of the vehicle used by the controller. It is part of a `Carla_Ackermann_Control.EgoVehicleControlInfo.msg` message. +Current time, speed and acceleration values of the vehicle. Used by the controller. It is part of a `Carla_Ackermann_Control.EgoVehicleControlInfo.msg` message. -| Field | Type | Description | -| ----------- | -------- | ----------------------------- | -| `time_sec` | float32 | Current time when the controller is applied. | -| `speed` | float32 | Current speed applied by the controller. | -| `speed_abs` | float32 | Speed as an absolute value. | -| `accel` | float32 | Current acceleration applied by the controller. | + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
time_sec float32Current time when the controller is applied.
speed float32Current speed applied by the controller.
speed_abs float32Speed as an absolute value.
accel float32Current acceleration applied by the controller.
+
--- ## EgoVehicleControlInfo.msg -Contains all the current values used within an Ackermann controller. These messages are useful for debugging. - -| Field | Type | Description | -| -------------- | ----------------------------------------------------------------------- | ------------------------------ | -| `header` | [Header](http://docs.ros.org/melodic/api/std_msgs/html/msg/Header.html) | Time stamp and frame ID when the message is published. | -| `restrictions` | [EgoVehicleControlMaxima](#egovehiclecontrolmaximamsg) | Limits to the controller values. | -| `target` | [EgoVehicleControlTarget](#egovehiclecontroltargetmsg) | Target values the controller aims for. | -| `current` | [EgoVehicleControlCurrent](#egovehiclecontrolcurrentmsg) | Currently measured values. | -| `status` | [EgoVehicleControlStatus](#egovehiclecontrolstatusmsg) | Current control status. | -| `output` | [CarlaEgoVehicleControl](#carlaegovehiclecontrolmsg) | Output controller that will be applied in CARLA. | +Current values within an Ackermann controller. These messages are useful for debugging. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
header headerTime stamp and frame ID when the message is published.
restrictions EgoVehicleControlMaximaLimits to the controller values.
target EgoVehicleControlTargetLimits to the controller values.
current EgoVehicleControlCurrentLimits to the controller values.
status EgoVehicleControlStatusLimits to the controller values.
output CarlaEgoVehicleControlLimits to the controller values.
+
--- ## EgoVehicleControlMaxima.msg -Represents the restrictions of a controller (limit values). It is part of a `Carla_Ackermann_Control.EgoVehicleControlInfo.msg` message. +Controller restrictions (limit values). It is part of a `Carla_Ackermann_Control.EgoVehicleControlInfo.msg` message. -| Field | Type | Description | -| -------------------- | -------- | ----------------------------- | -| `max_steering_angle` | float32 | Max. steering angle for a vehicle. | -| `max_speed` | float32 | Max. speed for a vehicle. | -| `max_accel` | float32 | Max. acceleration for a vehicle. | -| `max_decel` | float32 | Max. deceleration for a vehicle. Default: __8 m/s^2__ | -| `min_accel` | float32 | Min. acceleration for a vehicle. When the Ackermann taget accel. exceeds this value, the input accel. is controlled. | -| `max_pedal` | float32 | Min. pedal. | +float32 +Min. pedal. + + +
--- ## EgoVehicleControlStatus.msg -Represents the current status of the ego vehicle controller. It is part of a `Carla_Ackermann_Control.EgoVehicleControlInfo.msg` message. +Current status of the ego vehicle controller. It is part of a `Carla_Ackermann_Control.EgoVehicleControlInfo.msg` message. -| Field | Type | Description | -| -------------------------------- | ------- | ----------------------------- | -| `status` | string | Current control status. | +string +Current control status. + +speed_control_activation_count +uint8 +Speed controller. + +speed_control_accel_delta +float32 +Speed controller. + +speed_control_accel_target +float32 +Speed controller. + +accel_control_pedal_delta +float32 +Acceleration controller. + +accel_control_pedal_target +float32 +Acceleration controller. + +brake_upper_border +float32 +Borders for lay off pedal. + +throttle_lower_border +float32 +Borders for lay off pedal. + + +
--- ## EgoVehicleControlTarget.msg -Represents the target values for the variables of the ego vehicle controller. It is part of a `Carla_Ackermann_Control.EgoVehicleControlInfo.msg` message. +Target values of the ego vehicle controller. It is part of a `Carla_Ackermann_Control.EgoVehicleControlInfo.msg` message. -| Field | Type | Description | -| ---------------- | -------- | ----------------------------- | -| `steering_angle` | float32 | Target steering angle for the controller. | -| `speed` | float32 | Target speed for the controller. | -| `speed_abs` | float32 | Speed as an absolute value. | -| `accel` | float32 | Target acceleration for the controller. | -| `jerk` | float32 | Target jerk for the controller. | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
steering_angle float32Target steering angle for the controller.
speed float32Target speed for the controller.
speed_abs float32Speed as an absolute value.
accel float32Target acceleration for the controller.
jerk float32Target jerk for the controller.
+
\ No newline at end of file diff --git a/Docs/start_quickstart.md b/Docs/start_quickstart.md index 00af21f38..84c19a24f 100644 --- a/Docs/start_quickstart.md +++ b/Docs/start_quickstart.md @@ -2,7 +2,7 @@ * __[Installation summary](#installation-summary)__ * __[Requirements](#requirements)__ -* __[Downloading CARLA](#downloading-carla)__ +* __[CARLA installation](#carla-installation)__ * a) deb CARLA installation * b) GitHub repository installation * __[Running CARLA](#running-carla)__ @@ -22,9 +22,16 @@ # Install required modules Pygame and Numpy. pip install --user pygame numpy -# Option A) deb package installation (only Linux) +# Option A) deb package installation of CARLA 0.9.8 (only Linux) +sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 304F9BC29914A77D && +sudo add-apt-repository "deb [arch=amd64 trusted=yes] http://dist.carla.org/carla-0.9.8/ all main" +sudo apt-get update +sudo apt-get install carla +cd /opt/carla/bin +./CarlaUE4.sh +# To install CARLA 0.9.7 instead of 0.9.8 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DB53A429E64554FC && -sudo add-apt-repository "deb [trusted=yes] http://dist.carla.org/carla-0.9.7/ bionic main" +sudo add-apt-repository "deb [arch=amd64 trusted=yes] http://dist.carla.org/carla-0.9.7/ all main" sudo apt-get update sudo apt-get install carla cd /opt/carla/bin @@ -63,17 +70,17 @@ To install both modules using [pip](https://pip.pypa.io/en/stable/installing/), pip install --user pygame numpy ``` --- -## Downloading CARLA +## CARLA installation The __deb installation__ is the easiest way to get the latest release in Linux. __Download the GitHub repository__ to get either a specific release or the Windows version of CARLA. ### a) deb CARLA installation -Add the repository to the system. +Add the CARLA 0.9.8 repository to the system. ```sh -sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DB53A429E64554FC && -sudo add-apt-repository "deb [trusted=yes] http://dist.carla.org/carla-0.9.7/ bionic main" +sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 304F9BC29914A77D && +sudo add-apt-repository "deb [arch=amd64 trusted=yes] http://dist.carla.org/carla-0.9.8/ all main" ``` Install CARLA and check for the installation in the `/opt/` folder. ```sh @@ -82,6 +89,16 @@ sudo apt-get install carla cd /opt/carla ``` +The installation of CARLA 0.9.7 instead of 0.9.8 would be quite similar. +```sh +sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DB53A429E64554FC && +sudo add-apt-repository "deb [arch=amd64 trusted=yes] http://dist.carla.org/carla-0.9.7/ all main" +sudo apt-get update +sudo apt-get install carla +cd /opt/carla/bin +./CarlaUE4.sh +``` + ### b) GitHub repository installation
@@ -115,7 +132,7 @@ Open a terminal in the main CARLA folder. Run the following command to execute t > CarlaUE4.exe ``` !!! Important - In the __deb installation__, `CarlaUE4.sh` will be in `/opt/carla/bin/`, instead of the main `/carla/` folder where it normally is. + In the __deb installation__, `CarlaUE4.sh` will be in `/opt/carla/bin/`, instead of the main `carla/` folder where it normally is. A window containing a view over the city will pop up. This is the _spectator view_. To fly around the city use the mouse and `WASD` keys (while clicking). The server simulator is now running and waiting for a client to connect and interact with the world. Now it is time to start running scripts. The following example will spawn some life into the city: