Skip to content

hsule/zenoh_carla_bridge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zenoh_carla_bridge

The repository can bridge Carla and Autoware with Zenoh. The bridge tranforms Carla data into Autoware ROS 2 topic and then sends it with Zenoh.

If you want to have a quick demo, refer to autoware_carla_launch

Build

  • Get the code
git clone https://github.com/evshary/zenoh_carla_bridge.git
cd zenoh_carla_bridge
cargo build
# Run lint
cargo clippy --all -- -W clippy::all -W clippy::pedantic -W clippy::restriction -W clippy::nursery -D warnings

Usage

  • Terminal1: Run simulator
./CarlaUE4.sh
  • Terminal2: Run manual control agent
cd carla_agent/
poetry run python3 main.py --rolename "v1"
  • Terminal3: Run zenoh-bridge-ros2dds
./zenoh-plugin-dds/target/release/zenoh-bridge-ros2dds -n "/v1"
  • Terminal4: Run zenoh_carla_bridge
source /path/to/autoware/install/setup.bash
RUST_LOG=c=info cargo run
  • Terminal5: Run ROS package to control vehicle
# For example
ros2 run autoware_manual_control keyboard_control 

Note

If you want to build in Ubuntu 22.04, remember to switch compiler's version.

sudo apt install clang-12 libclang-12-dev
export LLVM_CONFIG_PATH=/usr/bin/llvm-config-12
export LIBCLANG_PATH=/usr/lib/llvm-12/lib
export LIBCLANG_STATIC_PATH=/usr/lib/llvm-12/lib
export CLANG_PATH=/usr/bin/clang-12

ROS topic

Input topic

Control

  • /control/command/control_cmd
  • /control/command/emergency_cmd
  • /control/command/gear_cmd
  • /control/command/hazard_lights_cmd: Not support
  • /control/command/turn_indicators_cmd: Not support

Sensing

  • /sensing/camera/traffic_light/camera_info
  • /sensing/camera/traffic_light/image_raw
  • /sensing/gnss/pose: Not support
  • /sensing/gnss/pose_with_covariance: Not support
  • /sensing/imu/tamagawa/imu_raw
  • /sensing/lidar/top/pointcloud_raw
  • /sensing/lidar/top/pointcloud_raw_ex

Output topic

  • /vehicle/status/control_mode
  • /vehicle/status/gear_status
  • /vehicle/status/steering_status
  • /vehicle/status/velocity_status
  • /vehicle/status/hazard_lights_status: Not support
  • /vehicle/status/turn_indicators_status: Not support

For Developers

You can use pre-commit and Ruff to have correct Python format

python3 -m pip install pre-commit ruff
pre-commit install --install-hooks

About

Bridge Autoware and Carla with Zenoh

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 52.2%
  • Rust 47.8%