Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3d8c111
added dependencies
ste93 Feb 6, 2026
85709f4
added bt nodes
ste93 Feb 6, 2026
d1c7caa
updated dockerfile and position
ste93 Feb 9, 2026
84d3174
updated bt executor
ste93 Feb 9, 2026
ca5fb78
modified README.md, added custom BT to test on the pyrobosim simulato…
BeniaminoSquitieri Feb 9, 2026
87285cd
modified bt_tree.xml and removed test bt
BeniaminoSquitieri Feb 9, 2026
f9630bb
modified README.md
BeniaminoSquitieri Feb 9, 2026
818dfb9
Add UC3-style Place skill flow and translator wiring
BeniaminoSquitieri Feb 17, 2026
45569b2
implementation of PlaceObjectSKill.scxml and bt_tree modification
BeniaminoSquitieri Feb 17, 2026
17794bd
added skill generated with model2code
ste93 Feb 17, 2026
43f4198
fixed readme and dockerfile
ste93 Feb 17, 2026
0dea45b
added missing interfaces
ste93 Feb 17, 2026
fe9e5a4
modified CmakeLists.txt and package.xml of behavior_tree package
BeniaminoSquitieri Feb 17, 2026
907af31
updated compiling tutorial
ste93 Feb 17, 2026
1e76983
updated readme
ste93 Feb 17, 2026
4cf4a20
updated readme
ste93 Feb 17, 2026
06b4e68
modified README.md where the docker run command has been corrected
BeniaminoSquitieri Feb 18, 2026
9c0d2da
fixed bt in simulation
BeniaminoSquitieri Feb 18, 2026
5134656
now bt works
BeniaminoSquitieri Feb 18, 2026
a75f1dc
now all bt_tree works
BeniaminoSquitieri Feb 20, 2026
7cbbd9c
Improve Place translation reliability and document simulator/translat…
BeniaminoSquitieri Feb 20, 2026
81dc030
Merge branch 'main' into fix/overarching-simulation
BeniaminoSquitieri Feb 23, 2026
ccdbf98
added custom skill also to the other two bt
BeniaminoSquitieri Feb 23, 2026
0ae2dc3
Ignore docker build artifacts
BeniaminoSquitieri Feb 23, 2026
6fa82c9
modified bt_names
BeniaminoSquitieri Feb 23, 2026
21336be
Add tutorial section about verification with Scan
EnricoGhiorzi Mar 4, 2026
bf095dd
Add XML property in RoAML and modify main.xml accordingly
KarimPedemonte Mar 4, 2026
ea503af
feat(overarching_tutorial): improve simulation reliability and BT exe…
BeniaminoSquitieri Mar 16, 2026
dd12ea6
Add xml properties to all versions of model
EnricoGhiorzi Mar 18, 2026
44dab73
Merge branch 'scan-tutorial' into fix/overarching-simulation
EnricoGhiorzi Mar 18, 2026
4fbd8b9
feat(overarching_tutorial): improve simulation reliability and BT exe…
BeniaminoSquitieri Mar 16, 2026
857f393
Fix `scxml` -> `ascxml` in `main.xml`
EnricoGhiorzi Mar 18, 2026
728205c
Merge branch 'fix/overarching-simulation' of github.com:BeniaminoSqui…
EnricoGhiorzi Mar 18, 2026
715c3e2
Revert "Merge branch 'fix/overarching-simulation' of github.com:Benia…
EnricoGhiorzi Mar 18, 2026
7a14871
modified bt_plugin
BeniaminoSquitieri Mar 19, 2026
2281baa
modified navigate->navigateToLocation in bts
BeniaminoSquitieri Mar 20, 2026
7670635
modify some files in order to allow AS2FM to compile correctly, in pa…
BeniaminoSquitieri Mar 20, 2026
66dfcc9
Fix string values in policies
EnricoGhiorzi Mar 22, 2026
601146b
Fix use of blackboard in BTs, add missing skill in mains and add xml …
EnricoGhiorzi Mar 23, 2026
94df3a8
Fix name of drop location
EnricoGhiorzi Mar 23, 2026
977cc36
Name property more accurately
EnricoGhiorzi Mar 23, 2026
1bea6e1
I fixed BT robustness, added a global default_object_id usable across…
BeniaminoSquitieri Mar 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__pycache__/
__pycache__/examples/overarching_tutorial/.docker/build/
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "examples/overarching_tutorial/simulation/dependencies/examples/overarching_tutorial/simulation/dependencies/BehaviorTree.ROS2"]
path = examples/overarching_tutorial/simulation/dependencies/examples/overarching_tutorial/simulation/dependencies/BehaviorTree.ROS2
url = https://github.com/BehaviorTree/BehaviorTree.ROS2.git
[submodule "examples/overarching_tutorial/simulation/dependencies/BehaviorTree.ROS2"]
path = examples/overarching_tutorial/simulation/dependencies/BehaviorTree.ROS2
url = https://github.com/BehaviorTree/BehaviorTree.ROS2.git
Original file line number Diff line number Diff line change
@@ -1,31 +1,54 @@
FROM ros:jazzy-ros-base
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

USER root


# Install apt dependencies.
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
apt-utils curl fuse3 libfuse2 gdb nano \
terminator dbus-x11 \
libegl1 libgl1-mesa-dev libglu1-mesa-dev '^libxcb.*-dev' libx11-xcb-dev \
libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libxrender-dev \
libnss3 libasound2t64 libxkbfile1 \
python3-pip python3-tk python3-wrapt python3-inflection \
ros-jazzy-example-interfaces ros-jazzy-rqt-service-caller
ros-jazzy-example-interfaces ros-jazzy-rqt-service-caller \
libczmq-dev ros-jazzy-zmqpp-vendor-dbgsym ros-jazzy-zmqpp-vendor libczmq-dev libczmq4 curl

# Create a ROS 2 workspace.
RUN mkdir -p /convince_ws/src/
WORKDIR /convince_ws


RUN /bin/bash -c "git clone --recurse-submodules https://github.com/BehaviorTree/BehaviorTree.CPP.git -b v3.8 && \
cd BehaviorTree.CPP && \
cmake -S . -B build && \
cmake --build build && \
cmake --install build"



# Install external dependencies.
# (pip)
COPY requirements.txt /convince_ws
COPY simulation/requirements.txt /convince_ws
RUN pip3 install --break-system-packages -r requirements.txt
# COPY dependencies src/dependencies
# RUN source /opt/ros/jazzy/setup.bash && \
# rosdep install --from-paths src -y --ignore-src
# (pyrobosim)
COPY simulation/dependencies src/dependencies
RUN git clone -b 4.3.3 https://github.com/sea-bass/pyrobosim.git src/pyrobosim
# COPY simulation/behavior_tree src/behavior_tree
# COPY roaml src/roaml
# COPY ros_interfaces src/ros_interfaces
# COPY simulation/generated_skill src/generated_skill

# `bt_executor` depends on `behaviortree_ros2`, which is not released for Jazzy.
# Bring it in as a source package so rosdep does not need a rosdep key for it.
RUN git clone --depth 1 https://github.com/BehaviorTree/BehaviorTree.ROS2.git src/behaviortree_ros2
RUN source /opt/ros/jazzy/setup.bash && \
rosdep install --from-paths src -y --ignore-src
# (pyrobosim)


# # (smc_storm)
# RUN curl -O -L https://github.com/convince-project/smc_storm/releases/download/0.0.6/smc_storm_executable.tar.gz && \
Expand All @@ -45,6 +68,7 @@ RUN git clone -b 4.3.3 https://github.com/sea-bass/pyrobosim.git src/pyrobosim
# RUN chmod -R 0700 /tmp/runtime-root
# ENV NO_AT_BRIDGE 1

RUN apt install -y qt6-scxml*
# Set up the entrypoint.
CMD /bin/bash
COPY .docker/entrypoint.sh /entrypoint.sh
Expand Down
3 changes: 2 additions & 1 deletion examples/overarching_tutorial/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
roaml/scxml
roaml/*.jani
**/*.csv
**/*.csv
simulation/.docker/build/
30 changes: 30 additions & 0 deletions examples/overarching_tutorial/roaml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,36 @@ as2fm_roaml_to_jani main.xml --scxml-out-dir scxml
```
This commands generates a folder with several SCXML files, that can be loaded and executed by SCAN for property verification.

#### Quick run guide (tested commands)

To avoid environment/path issues, use the commands below exactly as shown.

From the repository root:

```bash
cd examples/overarching_tutorial/roaml
source ../ros_interfaces/install/setup.bash
```

Generate SCXML models for SCAN:

```bash
as2fm_roaml_to_jani main.xml --scxml-out-dir new_folder
```

Generate JANI model for SMC Storm:

```bash
as2fm_roaml_to_jani main.xml --jani-out-file main.jani
```

You can replace `main.xml` with any other entry model in this folder, for example:

```bash
as2fm_roaml_to_jani main_locations.xml --scxml-out-dir scxml_main_locations
as2fm_roaml_to_jani main_locations_w_failures.xml --jani-out-file main_locations_w_failures.jani
```

### Verify the JANI model using SMC_STORM

Once we have a JANI model of the system, we can use SMC Storm to verify properties on it.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,56 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<ascxml
initial="initial"
initial="idle"
version="1.0"
name="PlaceObject"
model_src=""
xmlns="http://www.w3.org/2005/07/scxml">

<ros_action_client name="act" action_name="/place_object" type="overarching_msgs/Place" />

<datamodel>
<data id="tmp_result" type="bool" expr="false" />
<data id="SKILL_SUCCESS" type="int8" expr="0" />
<data id="SKILL_FAILURE" type="int8" expr="1" />
<data id="SKILL_RUNNING" type="int8" expr="2" />
</datamodel>

<state id="initial">
<bt_tick target="wait_result">
<ros_action_send_goal name="act" />
<bt_return_status status="RUNNING" />
</bt_tick>
<bt_halt target="initial">
<assign location="tmp_result" expr="false" />
<bt_return_halted />
</bt_halt>
</state>
<ros_service_client type="bt_interfaces_dummy/TickAction" name="place_skill_tick" service_name="/PlaceObjectSkill/tick" />

<state id="wait_result">
<bt_tick target="wait_result">
<bt_return_status status="RUNNING" />
<state id="idle">
<bt_tick target="handle_response_tick">
<ros_service_send_request name="place_skill_tick" />
</bt_tick>
<bt_halt target="initial">
<assign location="tmp_result" expr="false" />
<bt_halt target="idle">
<bt_return_halted />
</bt_halt>
<ros_action_handle_success_result name="act" target="result_available">
<assign location="tmp_result" expr="true" />
</ros_action_handle_success_result>
<ros_action_handle_aborted_result name="act" target="result_available">
<assign location="tmp_result" expr="false" />
</ros_action_handle_aborted_result>
</state>

<state id="result_available">
<bt_tick target="initial">
<if cond="tmp_result">
<bt_return_status status="SUCCESS" />
<else />
<bt_return_status status="FAILURE" />
</if>
</bt_tick>
<bt_halt target="initial">
<assign location="tmp_result" expr="false" />
<bt_return_halted />
</bt_halt>
<state id="handle_response_tick">
<ros_service_handle_response name="place_skill_tick" cond="_res.status == SKILL_SUCCESS" target="idle">
<bt_return_status status="SUCCESS" />
</ros_service_handle_response>
<ros_service_handle_response name="place_skill_tick" cond="_res.status == SKILL_FAILURE" target="idle">
<bt_return_status status="FAILURE" />
</ros_service_handle_response>
<ros_service_handle_response name="place_skill_tick" cond="_res.status == SKILL_RUNNING" target="idle">
<bt_return_status status="RUNNING" />
</ros_service_handle_response>
</state>

</ascxml>
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<ascxml
initial="idle"
version="1.0"
name="ROS2Action"
model_src=""
xmlns="http://www.w3.org/2005/07/scxml">

<datamodel>
<data id="SKILL_SUCCESS" type="int8" expr="0" />
<data id="SKILL_FAILURE" type="int8" expr="1" />
<data id="SKILL_RUNNING" type="int8" expr="2" />
</datamodel>

<bt_declare_port_in key="service_name_tick" type="string" />
<bt_declare_port_in key="service_name_halt" type="string" />
<bt_declare_port_in key="interface" type="string" />
<bt_declare_port_in key="isMonitored" type="string" />

<ros_service_client type="bt_interfaces_dummy/TickAction" name="skill_tick" service_name="/PlaceObjectSkill/tick" />
<ros_service_client type="bt_interfaces_dummy/HaltAction" name="skill_halt" service_name="/PlaceObjectSkill/halt" />

<state id="idle">
<bt_tick target="handle_response_tick">
<ros_service_send_request name="skill_tick" />
</bt_tick>
<bt_halt target="idle">
<ros_service_send_request name="skill_halt" />
<bt_return_halted />
</bt_halt>
</state>

<state id="handle_response_tick">
<ros_service_handle_response name="skill_tick" cond="_res.status == SKILL_SUCCESS" target="idle">
<bt_return_status status="SUCCESS" />
</ros_service_handle_response>
<ros_service_handle_response name="skill_tick" cond="_res.status == SKILL_FAILURE" target="idle">
<bt_return_status status="FAILURE" />
</ros_service_handle_response>
<ros_service_handle_response name="skill_tick" cond="_res.status == SKILL_RUNNING" target="idle">
<bt_return_status status="RUNNING" />
</ros_service_handle_response>
</state>

</ascxml>
3 changes: 3 additions & 0 deletions examples/overarching_tutorial/roaml/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@
<input type="bt-plugin-ascxml" src="./bt_plugins/bt_detect_object.ascxml" />
<input type="bt-plugin-ascxml" src="./bt_plugins/bt_pick_object.ascxml" />
<input type="bt-plugin-ascxml" src="./bt_plugins/bt_place_object.ascxml" />
<input type="bt-plugin-ascxml" src="./bt_plugins/bt_ros2_action.ascxml" />
</behavior_tree>

<node_models>
<input type="node-ascxml" src="./environment/world.ascxml" />
<input type="node-ascxml" src="./skills/PlaceObjectSkill.ascxml" />
</node_models>

<properties>
<input type="jani" src="./properties/properties.jani" />
<input type="xml" src="./properties/properties.xml" />
</properties>
</roaml>
3 changes: 3 additions & 0 deletions examples/overarching_tutorial/roaml/main_locations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@
<input type="bt-plugin-ascxml" src="./bt_plugins/bt_pick_object.ascxml" />
<input type="bt-plugin-ascxml" src="./bt_plugins/bt_place_object.ascxml" />
<input type="bt-plugin-ascxml" src="./bt_plugins/get_next_location.ascxml" />
<input type="bt-plugin-ascxml" src="./bt_plugins/bt_ros2_action.ascxml" />
</behavior_tree>

<node_models>
<input type="node-ascxml" src="./environment/world_multiple_locations.ascxml" />
<input type="node-ascxml" src="./skills/PlaceObjectSkill.ascxml" />
</node_models>

<properties>
<input type="jani" src="./properties/properties.jani" />
<input type="xml" src="./properties/properties.xml" />
</properties>
</roaml>
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@
<input type="bt-plugin-ascxml" src="./bt_plugins/bt_pick_object.ascxml" />
<input type="bt-plugin-ascxml" src="./bt_plugins/bt_place_object.ascxml" />
<input type="bt-plugin-ascxml" src="./bt_plugins/get_next_location.ascxml" />
<input type="bt-plugin-ascxml" src="./bt_plugins/bt_ros2_action.ascxml" />
</behavior_tree>

<node_models>
<input type="node-ascxml" src="./environment/world_multiple_locations_w_failures.ascxml" />
<input type="node-ascxml" src="./skills/PlaceObjectSkill.ascxml" />
</node_models>

<properties>
<input type="jani" src="./properties/properties.jani" />
<input type="xml" src="./properties/properties.xml" />
</properties>
</roaml>
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@
<input type="bt-plugin-ascxml" src="./bt_plugins/bt_pick_object.ascxml" />
<input type="bt-plugin-ascxml" src="./bt_plugins/bt_place_object.ascxml" />
<input type="bt-plugin-ascxml" src="./bt_plugins/get_next_location.ascxml" />
<input type="bt-plugin-ascxml" src="./bt_plugins/bt_ros2_action.ascxml" />
</behavior_tree>

<node_models>
<input type="node-ascxml" src="./environment/world_multiple_locations_w_failures.ascxml" />
<input type="node-ascxml" src="./skills/PlaceObjectSkill.ascxml" />
</node_models>

<properties>
<input type="jani" src="./properties/properties.jani" />
<input type="xml" src="./properties/properties.xml" />
</properties>
</roaml>
26 changes: 9 additions & 17 deletions examples/overarching_tutorial/roaml/policy/bt_tree.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
<root BTCPP_format="4">
<BehaviorTree ID="OverarchingTutorialBase">
<!-- For now use a normal sequence, since failures aren't expected yet -->
<BehaviorTree ID="MainTree">
<Sequence>
<!--
loc
0 .. origin
1 .. object_location

obj
0 .. waste0
-->

<NavigateToLocation name="navigate_to_obj" location="'table'" />
<DetectObject name="detect_obj" object_id="{detection_id}" />
<PickObject name="pick_obj" object_id="{detection_id}" />
<NavigateToLocation name="navigate_to_start" location="'start'" />
<PlaceObject name="place_obj" />
</Sequence>
<NavigateToLocation name="navigate_to_obj" location="'fridge'" />
<DetectObject name="detect_obj" object_id="{detected_obj_id}" />
<PickObject name="pick_obj" object_id="{detected_obj_id}" />
<NavigateToLocation name="navigate_to_place" location="'dining_table'" />
<!-- <PlaceObject name="place_obj" object="butter" /> -->
<ROS2Action name="place_action_skill" service_name_tick="/PlaceObjectSkill/tick"
service_name_halt="/PlaceObjectSkill/halt" interface="ROS2SERVICE" isMonitored="false"/>
</Sequence>
</BehaviorTree>
</root>
19 changes: 12 additions & 7 deletions examples/overarching_tutorial/roaml/policy/bt_tree_locations.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
<root BTCPP_format="4">
<BehaviorTree ID="OverarchingTutorialLocations">
<Sequence name="main_seq">
<RetryUntilSuccessful name="detect_or_next" num_attempts="3">
<GetNextLocation location="{current_location}" />
<Repeat name="detect_or_next" num_cycles="4">
<Sequence>
<GetNextLocation location="{current_location}" />
<NavigateToLocation name="navigate_to_obj" location="{current_location}" />
<DetectObject name="detect_obj" object_id="{detection_id}" />
<Fallback>
<DetectObject name="detect_obj" object_id="{object}" />
<GetNextLocation location="{current_location}" />
</Fallback>
</Sequence>
</RetryUntilSuccessful>
<PickObject name="pick_obj" object_id="{detection_id}" />
<NavigateToLocation name="navigate_to_start" location="'start'" />
<PlaceObject name="place_obj" />
</Repeat>
<PickObject name="pick_obj" object_id="{object}" />
<NavigateToLocation name="navigate_to_start" location="'dining_table'" />
<!-- <PlaceOb ject name="place_obj" object="butter" /> -->
<ROS2Action name="place_action_skill" service_name_tick="/PlaceObjectSkill/tick"
service_name_halt="/PlaceObjectSkill/halt" interface="ROS2SERVICE" isMonitored="false"/>
</Sequence>
</BehaviorTree>
</root>
Loading