Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: for the plan.

Jump to: navigation, search



This example explores the functionality of a proof-of-concept technology stack for the development of an intelligent control system of a simulated autonomous vehicle that must ensure correct driving along a closed circuit including activity zones and living areas open to pedestrian traffic.

The technology stack is used in experiment I-PAR-5 and builds on top of the open-source frameworks Papyrus for Robotics, CARLA and ROS 2.

Quickstart Instructions (for the Impatient User)

The runtime for the experiment is distributed via Docker Hub and includes the Papyrus for Robotics low-code platform, the CARLA simulator APIs (version 0.9.14), ROS 2 Humble (target of the code-generation process of Papyrus for Robotics) and the CARLA/ROS 2 bridge.

First, download the runtime from the Docker Hub registry:

 $ docker pull mmorelli1/dih4ai-ipar5:0.1.0
 $ docker tag mmorelli1/dih4ai-ipar5:0.1.0 dih4ai-ipar5:0.1.0

As the runtime does not provide the full CARLA simulator, you must install CARLA yourself on your host or on another server. This can be done easily by pulling an image of CARLA to run in a Docker container:

 $ docker pull carlasim/carla:0.9.14

In the host, install also carlaviz

 $ docker pull mjxu96/carlaviz:

Next, open 3 terminals to run the 3 main components of the experiment (commands prefixed by # must be executed in the docker container):

  • the CARLA simulator
 $ docker run --privileged --gpus all -d --rm --net=host -v /tmp/.X11-unix:/tmp/.X11-unix:rw carlasim/carla:0.9.14 /bin/bash ./ -RenderOffScreen
  • Papyrus for robotics
 $ docker run -it --rm --net=host --name dih4ai-ipar5-0.1.0 -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev/dri:/dev/dri -e DISPLAY=$DISPLAY dih4ai-ipar5:0.1.0 /bin/bash
 # source /opt/carla/setup.bash
 # ./papyrus-robotics
  • the CARLA / ROS 2 bridge
 $ docker exec -it -w /opt/workspace-ad dih4ai-ipar5-0.1.0 /bin/bash
 # source
 # ros2 launch carla_ad_functions_bringup

Papyrus for Robotics opens and shows the System Assembly model. Run it using Robotics -> Launch and activate ROS 2 code

Finally open 2 additional terminals.

  • run carlaviz
 $ docker run -it --network="host" mjxu96/carlaviz: --simulator_host=localhost --simulator_port 2000
  • start the scenario execution
 $ docker exec -it -w /opt/workspace-ad dih4ai-ipar5-0.1.0 /bin/bash
 # source
 # ros2 param set /SystemSequencer default_bt_xml_filename "/opt/workspace-ad/scenario_bringup/models/storyboards/Scenario1_Storyboard.behaviortreeschema"
 # ros2 param set /SystemSequencer bt_loop_duration 300
 # ros2 lifecycle set /SystemSequencer configure
 # ros2 lifecycle set /SystemSequencer activate
 # ros2 action send_goal /SystemSequencer/execute_bt bt_sequencer_msgs/action/ExecuteBt "{}"

Back to the top