Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository

Repository Summary

Checkout URI https://github.com/carla-simulator/ros-bridge.git
VCS Type git
VCS Version 0.9.6
Last Updated 2020-01-29
Dev Status MAINTAINED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

README

ROS bridge for CARLA simulator

This ROS package aims at providing a simple ROS bridge for CARLA simulator.

Important Note: This documentation is for CARLA versions newer than 0.9.4.

rviz setup depthcloud

short video

Features

  • Cameras (depth, segmentation, rgb) support
  • Transform publications
  • Manual control using ackermann msg
  • Handle ROS dependencies
  • Marker/bounding box messages for cars/pedestrian
  • Lidar sensor support
  • Support CARLA synchronous mode
  • Add traffic light support

Setup

Create a catkin workspace and install carla_ros_bridge package

#setup folder structure
mkdir -p ~/carla-ros-bridge/catkin_ws/src
cd ~/carla-ros-bridge
git clone https://github.com/carla-simulator/ros-bridge.git
cd catkin_ws/src
ln -s ../../ros-bridge
source /opt/ros/kinetic/setup.bash
cd ..

#install required ros-dependencies
rosdep update
rosdep install --from-paths src --ignore-src -r

#build
catkin_make

For more information about configuring a ROS environment see http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment

Start the ROS bridge

First run the simulator (see carla documentation: http://carla.readthedocs.io/en/latest/)

./CarlaUE4.sh -windowed -ResX=320 -ResY=240

Wait for the message:

Waiting for the client to connect...

Then start the ros bridge (choose one option):

export PYTHONPATH=$PYTHONPATH:<path/to/carla/>/PythonAPI/<your_egg_file>
source ~/carla-ros-bridge/catkin_ws/devel/setup.bash

# Option 1: start the ros bridge
roslaunch carla_ros_bridge carla_ros_bridge.launch

# Option 2: start the ros bridge together with RVIZ
roslaunch carla_ros_bridge carla_ros_bridge_with_rviz.launch

# Option 3: start the ros bridge together with an example ego vehicle
roslaunch carla_ros_bridge carla_ros_bridge_with_example_ego_vehicle.launch

Settings

You can setup the ros bridge configuration carla_ros_bridge/config/settings.yaml.

If the rolename is within the list specified by ROS parameter /carla/ego_vehicle/rolename, the client is interpreted as an controllable ego vehicle and all relevant ROS topics are created.

Mode

Default Mode

In default mode (synchronous_mode: false) data is published:

  • on every world.on_tick() callback
  • on every sensor.listen() callback

Synchronous Mode

CAUTION: In synchronous mode, only the ros-bridge is allowed to tick. Other CARLA clients must passively wait.

In synchronous mode (synchronous_mode: true), the bridge waits for all sensor data that is expected within the current frame. This might slow down the overall simulation but ensures reproducible results.

Additionally you might set synchronous_mode_wait_for_vehicle_control_command to true to wait for a vehicle control command before executing the next tick.

Control Synchronous Mode

File truncated at 100 lines see the full file

Repo symbol

carla_ros_bridge repository

Repo symbol

carla_ros_bridge repository