- Notifications
You must be signed in to change notification settings - Fork0
A convenient approach to setup a development environment includes CARLA, ROS, and carla-ros-bridge.
License
TACPSLab/CARLA-ROS-dev-env
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
| CARLA_VERSION | ROS_DISTRO |
|---|---|
| 0.9.12 | noetic |
Some of the configurations in the Compose file are only applicable to Linux. Specifically,
# X11 forwarding to view GUI applications running on containersenvironment:DISPLAY:${DISPLAY}# volumes:# - /tmp/.X11-unix:/tmp/.X11-unix:rw[...]network_mode:host# access host port from container
The Compose file can be adapted for use on Windows and macOS by modifying those configurations.
Please also note that
devices:-driver:nvidiadevice_ids:['0']
should be set to requisitioned GPU(s).
Clone this repo with--recurse-submodules option.
SetCARLA_VERSION andROS_DISTRO in the.env file to the demanded version/distro, also setUID andGID to the current user'sUID andGID.
Executingdocker compose build in the directory containsdocker-compose.yml pulls the image of CARLA and builds the image for ros-bridge.
Start CARLA and ros-bridge simultaneously:docker compose up -d
Follow the logs of two containers:docker compose log -f
Note that the initial ros-bridge connection may fail because the timeout isset too short and attempt to reconnect. Please verify that ros-bridge is successfully connecting to CARLA by monitoring the log.
The first half explains how to launch the containerised CARLA and ros-bridge using this repo. The second half will discuss how to use this environment for development.
It is possible to directly develop on the host which has corresponding ROS distro (that ros-bridge container is using) installed. However, the preferred approach is to start a containerised workspace features corresponding ROS distro and develop inside the container. For example, CARLA 0.9.11 and ros-bridge 0.9.11 built upon ROSNoetic have been started on aLinux host which has multipleNvidia GPUs. Executing
docker run -d -t --name workspace --net=host --privileged --gpus 0 -e NVIDIA_VISIBLE_DEVICES=all -e NVIDIA_DRIVER_CAPABILITIES=all -e QT_X11_NO_MITSHM=1 -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw osrf/ros:noetic-desktop-fullstarts a container, which can display GUI on the host and has access to host's first GPU, fromosrf/ros:noetic-desktop-full image. Next, attach the container using VSCode withRemote-Containers plugin installed. Then, open a directory inside the container as project root using the intergrated file explorer within VSCode. Thus far, a basic containerised workspace has been built.
About
A convenient approach to setup a development environment includes CARLA, ROS, and carla-ros-bridge.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.