The repository can bridge Carla and Autoware with Zenoh. The bridge tranforms Carla data into Autoware ROS 2 message and then sends it via 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
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
You can use pre-commit and Ruff to have correct Python format
python3 -m pip install pre-commit ruff
pre-commit install --install-hooks