FROM osrf/ros:foxy-desktop-focal AS base
SHELL ["/bin/bash", "-c"]
RUN apt update && apt install -y python3-pip
RUN sudo apt install python3-colcon-common-extensions
RUN mkdir -p ~/carla-ros-bridge
WORKDIR /root/carla-ros-bridge
RUN git clone --recurse-submodules https://github.com/carla-simulator/ros-bridge.git src/ros-bridge
RUN rosdep update && rosdep install --from-paths src --ignore-src -r
RUN source /opt/ros/foxy/setup.bash && \
colcon build
COPY ros_entrypoint.sh /
# Ensure script is executable
RUN ["sudo", "chmod", "+x", "/ros_entrypoint.sh"]
ENTRYPOINT ["/ros_entrypoint.sh"]
RUN python3 -m pip install --upgrade pip && python3 -m pip install numpy pygame
RUN python3 -m pip install 'carla==0.9.13'
I found when I run docker-compose up the carla_ros_bridge has trouble connecting to the carla server, the container crashes then restarts and then its able to connect, here is the error:
carla_ros_bridge | [bridge-1] [ERROR] [1680446255.811228168] [carla_ros_bridge]: Error: time-out of 5000ms while waiting for the simulator, make sure the simulator is ready and connected to carla_server:2000
carla_ros_bridge | [bridge-1] [INFO] [1680446255.811739344] [carla_ros_bridge]: Shutting down...
Then on the second retry it is able to connect.
I was wondering why it might be failing to connect on the first try, any ideas?
CARLA version: 0.9.13 Platform/OS: Docker/Linux
I am using docker compose to launch Carla and a Carla ROS Bridge instance, here is my docker compose file:
And here is my ROS Bridge docker file:
I found when I run
docker-compose up
the carla_ros_bridge has trouble connecting to the carla server, the container crashes then restarts and then its able to connect, here is the error:Then on the second retry it is able to connect.
I was wondering why it might be failing to connect on the first try, any ideas?
Thanks
Note: I am not sure if this is a Carla issue or a ROS bridge issue, I've also created a issue in Carla for this: https://github.com/carla-simulator/carla/issues/6373