TUMFTM / Carla-Autoware-Bridge

Carla 0.9.15 and Autoware Universe Humble
GNU Lesser General Public License v3.0
97 stars 9 forks source link
# CARLA-Autoware-Bridge - Enables the use of CARLA for Testing and Development of Autoware Core/Universe [![Linux](https://img.shields.io/badge/os-ubuntu22.04-blue.svg)](https://www.linux.org/) [![Docker](https://badgen.net/badge/icon/docker?icon=docker&label)](https://www.docker.com/) [![ROS2humble](https://img.shields.io/badge/ros2-humble-blue.svg)](https://docs.ros.org/en/humble/index.html)

Introduction

The CARLA-Autoware-Bridge is a package to connect the CARLA simulator to Autoware Core/Universe with the help of the CARLA-ROS-Bridge. Currently the latest Autoware Core/Universe and CARLA 0.9.15 is supported.

Youtube Demo Video + Quickstart

Demo Quickstart
IMAGE ALT TEXT HERE IMAGE ALT TEXT HERE

Paper

If you use this or the other associated repos, please cite our Paper:

CARLA-Autoware-Bridge: Facilitating Autonomous Driving Research with a Unified Framework for Simulation and Module Development
Gemb Kaljavesi, Tobias Kerbl, Tobias Betz, Kirill Mitkovskii, Frank Diermeyer [PDF]

@inproceedings{carla_aw_bridge24,
  title = {CARLA-Autoware-Bridge: Facilitating Autonomous Driving Research
with a Unified Framework for Simulation and Module Development,
  author = {Kaljavesi, Gemb and Kerbl, Tobias and Betz, Tobias and Mitkovskii, Kirill and Diermeyer, Frank},
  year = {2024}
}

The Paper is currently under review and only published as preprint.

Overview

The simulation framework around the CARLA-Autoware-Bridge consists of the components:

How to Build and Install the Bridge

The easiest way to use the CARLA-Autoware-Bridge is to use our prebuilt docker image or to build the docker image by yourself. Bu we also provide a tutorial for local usage.

Docker Workflow(Recommended)

You can build the docker image by yourself or use the image from our github registry.

# Pull our latest docker image
docker pull tumgeka/carla-autoware-bridge:latest

# Alternatively build it yourself by running our build_docker.sh
./docker/build_docker.sh

Local Workflow

Comming Soon. Until then, take a look at our Dockerfile.

Maps

Autoware needs the maps in a special lanelet2 format, we will upload all converted maps in the future under the following link: carla-autoware-bridge/maps

General Installation and Usage

The installation and usage of the CARLA-Autoware-Bridge is described in the following tutourial. In order to function properly the packages should be started in the order CARLA --> CARLA-Autoware-Bridge --> Autoware.

1) CARLA

We recommended to use the dockerized version of CARLA 0.9.15. To pull and start CARLA for usage with the CARLA-Autoware-Bridge follow the steps below.

# Pull CARLA 0.9.15
docker pull carlasim/carla:0.9.15
# Start CARLA
docker run --privileged --gpus all --net=host -e DISPLAY=$DISPLAY carlasim/carla:0.9.15 /bin/bash ./CarlaUE4.sh -carla-rpc-port=1403 

Additional information:

2) CARLA-Autoware-Bridge

Run the carla-autoware-bridge

# If you are using a docker start the docker first
docker run -it -e RMW_IMPLEMENTATION=rmw_cyclonedds_cpp --network host tumgeka/carla-autoware-bridge:latest

# Launch the bridge
ros2 launch carla_autoware_bridge carla_aw_bridge.launch.py port:=1403 town:=Town10HD

Additional information:

If you want to spawn traffic run the following script inside the docker:

python3 src/carla_autoware_bridge/utils/generate_traffic.py -p 1403

3) Autoware

To use Autoware some minor adjustments are required. Additionally you will need our sensorkit and vehicle model.

git clone https://github.com/TUMFTM/Carla_t2.git

Launch autoware

ros2 launch autoware_launch e2e_simulator.launch.xml vehicle_model:=carla_t2_vehicle sensor_model:=carla_t2_sensor_kit map_path:=<path to /wsp/map>

Autoware changes often, for a reproducible behaviour we recommend you to use a tagged autoware version: https://github.com/autowarefoundation/autoware/tree/2024.01

docker pull ghcr.io/autowarefoundation/autoware-universe:humble-2024.01-cuda-amd64

rocker --network=host -e RMW_IMPLEMENTATION=rmw_cyclonedds_cpp -e LIBGL_ALWAYS_SOFTWARE=1 --x11 --nvidia --volume /path/to/code -- ghcr.io/autowarefoundation/autoware-universe:humble-2024.01-cuda-amd64

Limitations and Future Work