Skip to content

Instantly share code, notes, and snippets.

@mitsudome-r
Last active December 5, 2024 18:27
Show Gist options
  • Save mitsudome-r/3ba8946f12208b011d6c10eaa190ccf9 to your computer and use it in GitHub Desktop.
Save mitsudome-r/3ba8946f12208b011d6c10eaa190ccf9 to your computer and use it in GitHub Desktop.
Instructions for TIER IV CES2025 Demo on Anvil

NEW VERSION IS AVIALABLE HERE

Open AD Kit CES 2025 Demo Instructions (OLD)

Preparation

Git Install

sudo apt update
sudo apt install git

Docker Install

ref: https://docs.docker.com/engine/install/ubuntu/

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

# Install docker
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# Add user group
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker

If it's your first time to install docker, you might have to reboot the system once to apply the user group settings.

sudo reboot

Getting scenarios

pull the scenarios and maps from Autoware Open ADKit Demo repository

git clone https://github.com/autowarefoundation/openadkit_demo.autoware -b ces2025

Terminal 1 (Planning-Control Container) Before Scenario

Make sure that the path given after -v is the path to the simulation folder that you cloned in preparation.

docker run --net=host -e ROS_DOMAIN_ID=26  -v ./openadkit_demo.autoware/docker/etc/simulation:/autoware/scenario-sim -it ghcr.io/mitsudome-r/autoware/ces2025:universe-before-arm64

# run the following command inside the docker container
ros2 launch autoware_launch planning_simulator.launch.xml \
  	map_path:=/autoware/scenario-sim/map \
  	vehicle_model:=sample_vehicle \
  	sensor_model:=sample_sensor_kit \
  	scenario_simulation:=true \
  	rviz:=false\
  	perception/enable_traffic_light:=false

Terminal 1 (Planning-Control Container) After Scenario

Make sure that the path given after -v is the path to the simulation folder that you cloned in preparation.

docker run --net=host -e ROS_DOMAIN_ID=26  -v ./openadkit_demo.autoware/docker/etc/simulation:/autoware/scenario-sim -it ghcr.io/mitsudome-r/autoware/ces2025:universe-after-arm64

# run the following command inside the docker container
ros2 launch autoware_launch planning_simulator.launch.xml \
  	map_path:=/autoware/scenario-sim/map \
  	vehicle_model:=sample_vehicle \
  	sensor_model:=sample_sensor_kit \
  	scenario_simulation:=true \
  	rviz:=false\
  	perception/enable_traffic_light:=false

Terminal 2 (Simulator Container)

docker run --net=host -e ROS_DOMAIN_ID=26 -e RMW_IMPLEMENTATION=rmw_cyclonedds_cpp -it ghcr.io/autowarefoundation/openadkit_demo.autoware:aws-reinvent-simulator-arm64

# run the following command inside the docker container
ros2 launch scenario_test_runner scenario_test_runner.launch.py \
  	architecture_type:=awf/universe/20240605 \
  	record:=false \
  	scenario:=/autoware/scenario-sim/yield_maneuver_demo.yaml \
  	sensor_model:=sample_sensor_kit \
  	vehicle_model:=sample_vehicle \
  	initialize_duration:=120 \
  	global_frame_rate:=15 \
  	launch_autoware:=false \
  	launch_rviz:=false \
  	output_directory:=/autoware/result

Terminal 3 (Visualization Container)

# give access to x11
xhost local:

docker run --net=host -e ROS_DOMAIN_ID=26 -e DISPLAY=$DISPLAY -e RMW_IMPLEMENTATION=rmw_cyclonedds_cpp --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" -it ghcr.io/autowarefoundation/openadkit_demo.autoware:aws-reinvent-simulator-arm64

# run the following command inside the docker container
rviz2 -d /opt/autoware/share/autoware_launch/rviz/autoware.rviz

Troubleshooting

Cannot stop planning container

If you cannot stop the planning container with CTRL+C, run the following commands to stop the container:

# find the id for the planning container
docker ps

# stop the container (modify "ID" with the actual string of ID you find from the above command)
docker container stop ID 
@mitsudome-r
Copy link
Author

mitsudome-r commented Nov 5, 2024

If you want to try the planning container that intentionally fails to pass the scenario, change the target container for planning container in terminal 1 to: ghcr.io/mitsudome-r/autoware/ces2025:universe-before-arm64

docker run --net=host -e ROS_DOMAIN_ID=26  -v ./openadkit_demo.autoware/docker/etc/simulation:/autoware/scenario-sim -it ghcr.io/mitsudome-r/autoware/ces2025:universe-before-arm64

# run the following command inside the docker container
ros2 launch autoware_launch planning_simulator.launch.xml \
  	map_path:=/autoware/scenario-sim/map \
  	vehicle_model:=sample_vehicle \
  	sensor_model:=sample_sensor_kit \
  	scenario_simulation:=true \
  	rviz:=false\
  	perception/enable_traffic_light:=false

image

@mitsudome-r
Copy link
Author

If you have troubles with running the docker, the original file used to create the docker image is placed here:
https://github.com/mitsudome-r/autoware/blob/ces2025/docker/Dockerfile.

You should be able to use it by the following commandline:

git clone https://github.com/autowarefoundation/openadkit_demo.autoware -b ces2025
cd openadkit_demo.autoware/
./setup-dev-env.sh # you don't have to install cuda or download artifacts
./docker/build.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment