Skip to content

Adding code and doc of semantic reasoning tutorial.#59

Merged
m-morelli merged 2 commits into
mainfrom
fix/semantic_reasoning_tutorial
May 20, 2026
Merged

Adding code and doc of semantic reasoning tutorial.#59
m-morelli merged 2 commits into
mainfrom
fix/semantic_reasoning_tutorial

Conversation

@m-morelli
Copy link
Copy Markdown
Member

I'm adding code and doc of the semantic reasoning tutorial.

A couple of additional points.

First, I allowed myself to add a couple of changes in the Dockerfile, in addition to those requested for the semantic reasoning tutorial itself, to fix two issues I had when building the docker image.

  1. --ignore-installed was needed to get rid of
ERROR: Cannot uninstall pluggy 1.4.0, RECORD file not found. Hint: The package was installed by debian
  1. RUN pip3 install --break-system-packages --ignore-installed "setuptools<70" was needed to solve error: option --editable not recognized when building python packages. In fact, it seems that setuptools which is shipped with the base image is too new (v.82.0.1). Downgrading it solves the issue.

Second, I've added another version of simple BT executor (tutorials/semantic_reasoning_demo/simulation_extras/bt_executor2/) based on (BT::TreeExecutionServer)[https://github.com/BehaviorTree/BehaviorTree.ROS2/blob/humble/behaviortree_ros2/tree_execution_server.md], where the BT actions use the same interfaces as the offline verified models. You may want to compare it with the one in tutorials/simulation/behavior_trees/bt_executor/ to keep both or merge them in a next version of the tutorial.

Signed-off-by: Matteo MORELLI <matteo.morelli@cea.fr>
@m-morelli m-morelli requested review from MarcoLm993 and ct2034 May 19, 2026 15:44
Copy link
Copy Markdown
Contributor

@MarcoLm993 MarcoLm993 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see some possible redundancy with the existing tutorials, but as long as the tutorial is there, I think this isn't a problem :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see some slight redundancy with the existing BTs from the other tutorials: they are not exactly the same, I know, but I wonder if we could have reused more of the existing tutorial's content.
BTW, not a big issue, more of a nitpick

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See below

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing nodes directly interact with pyrobosim. In my case I needed to add some custom effects to action executions like simulating an effort at the end-effector's tip during pick and place, artificially injecting bugs in navigation, etc. I didn't want to touch existing nodes to not jeopardize the correct execution of other tutorials (no time to test all of them).

In addition, this solution actually reuses the very same interfaces from the offline verification tutorial --the pick_object_node you point out above has indeed a different interface (it task a string, while the verified model takes an int)-- showing the design-time-to-run-time transition we advocate (first design and verify the system, then deploy the verified system and introduce monitors for run-time verification).

So actually, I rather question whether we should change existing nodes with those I provide here. My proposition is to go with this solution even if some redundancy is introduced, to have the full tutorial list ready now. We can possibly refine it for a next version.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same answer 😃 -- shouldn't we rather change existing nodes (in a next version) to better show the design-time-to-run-time transition we advocate?

@m-morelli
Copy link
Copy Markdown
Member Author

I realize that I forgot to include an rst doc in overview/docs/source/ pointing out the Readme of semantic reasoning tutorial. I will add this modification now.

Signed-off-by: Matteo MORELLI <matteo.morelli@cea.fr>
@m-morelli m-morelli merged commit a2b0987 into main May 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants