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
- 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
- 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
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
/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/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
/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
You can use pre-commit and Ruff to have correct Python format
python3 -m pip install pre-commit ruff
pre-commit install --install-hooks