| ... | ... | @@ -11,34 +11,47 @@ The runtime for the experiment is distributed via Docker Hub and includes the Pa |
|
|
|
|
|
|
|
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`
|
|
|
|
....
|
|
|
|
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`
|
|
|
|
....
|
|
|
|
docker pull carlasim/carla:0.9.14
|
|
|
|
....
|
|
|
|
|
|
|
|
In the host, install also https://github.com/mjxu96/carlaviz[carlaviz]
|
|
|
|
|
|
|
|
` $ docker pull mjxu96/carlaviz:0.9.14.1`
|
|
|
|
....
|
|
|
|
docker pull mjxu96/carlaviz:0.9.14.1
|
|
|
|
....
|
|
|
|
|
|
|
|
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 ./CarlaUE4.sh -RenderOffScreen`
|
|
|
|
....
|
|
|
|
docker run --privileged --gpus all -d --rm --net=host -v /tmp/.X11-unix:/tmp/.X11-unix:rw carlasim/carla:0.9.14 /bin/bash ./CarlaUE4.sh -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`
|
|
|
|
....
|
|
|
|
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 env.sh` +
|
|
|
|
` # ros2 launch carla_ad_functions_bringup carla_ad_functions_bringup.launch.py`
|
|
|
|
....
|
|
|
|
docker exec -it -w /opt/workspace-ad dih4ai-ipar5-0.1.0 /bin/bash
|
|
|
|
source env.sh
|
|
|
|
ros2 launch carla_ad_functions_bringup carla_ad_functions_bringup.launch.py
|
|
|
|
....
|
|
|
|
|
|
|
|
Papyrus for Robotics opens and shows the System Assembly model. Run it using `Robotics -> Launch and activate ROS 2 code`
|
|
|
|
|
| ... | ... | @@ -46,14 +59,18 @@ Finally open 2 additional terminals. |
|
|
|
|
|
|
|
* run carlaviz
|
|
|
|
|
|
|
|
` $ docker run -it --network="host" mjxu96/carlaviz:0.9.14.1 --simulator_host=localhost --simulator_port 2000`
|
|
|
|
....
|
|
|
|
docker run -it --network="host" mjxu96/carlaviz:0.9.14.1 --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 env.sh` +
|
|
|
|
` # 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 "{}"` |
|
|
|
....
|
|
|
|
docker exec -it -w /opt/workspace-ad dih4ai-ipar5-0.1.0 /bin/bash
|
|
|
|
source env.sh
|
|
|
|
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 "{}"
|
|
|
|
.... |