This is a Dockerfile to use CARLA ROS bridge on Docker container.
Current carla-simulator/ros-bridge supports to CARLA 0.9.11. So, I used CARLA 0.9.11 in this Dockerfile. And, base image of this Docker file is nvidia/cudagl:11.4.2-devel-ubuntu18.04
.
Because, there is the following description in official document(https://carla.readthedocs.io/en/0.9.13/start_quickstart/).
The Debain package is available for both Ubuntu 18.04 and Ubuntu 20.04, however the officially supported platform is Ubuntu 18.04.
- NVIDIA graphics driver
- Docker
- nvidia-docker2
Please download the package of CARLA 0.9.11
from https://github.com/carla-simulator/carla/releases/tag/0.9.11.
And, please put the package of CARLA 0.9.11
in the same directory as the Dockerfile.
This time, I used CARLA_0.9.11.tar.gz
.
docker build -t carla:0.9.11 --build-arg GID=$(id -g) --build-arg UID=$(id -u) -f Dockerfile.melodic .
./launch_container.sh
Please launch CARLA Simulator by the following command.
/opt/carla-simulator/CarlaUE4.sh -windowed -ResX=160 -ResY=120
cd /opt/carla-simulator/PythonAPI
python util/config.py -m Town03 --fps 10
roslaunch carla_ros_bridge carla_ros_bridge_with_example_ego_vehicle.launch vehicle_filter:='vehicle.toyota.prius*'
Please launch CARLA Simulator by the following command.
/opt/carla-simulator/CarlaUE4.sh -windowed -ResX=160 -ResY=120
cd /opt/carla-simulator/PythonAPI
python util/config.py -m Town01 --fps 10
roslaunch carla_ad_demo carla_ad_demo_with_scenario.launch vehicle_filter:='vehicle.toyota.prius*'
And, please push Execute
button from RViz panel.