Skip to content

secorolab/bdd_exec_ros2

 
 

Repository files navigation

bdd-exec-ros2

Package for handling execution of RobBDD models using ROS2 communication. A GUI tool is also available for visualizing test results.

Dependencies

Quick start

A mockup setup is available for testing communication between the test coordinator node with a mockup behaviour action server, which cycle through a pick & place state machine and publishes the expected events and trinary messages. A more detailed tutorial on the interactions of these components is available on the bdd-dsl landing page.

To run the mockup setup:

  1. Run the mockup launch file:

    ros2 launch bdd_exec_ros2 launch_mockup.yaml
  2. (Optional) Run the visualizer:

    ros2 run bdd_exec_ros2 visualizer
  3. Trigger test execution:

    ros2 topic pub /bdd/start std_msgs/msg/Empty "{}" -1

Executables

BDD Test Coordinator

bdd_coordination_node.py loads BDD model (as RDF graph or RobBDD) and, when triggered, send goal for each scenario variation to a behaviour action server.

Test Result Visualizer

The visualizer.py script visualizes trinaries and clause assertions for each executed scenario variations. A successful (mockup) test execution should appear like the following:

Visualizer screenshot

Mockup Behaviour Server

mockup_behaviour_node.py cycles through states of a finite-state-machine (FSM) for a pick & place behaviour, while sending events and trinary messages as expected by the BDD coordinator node. The FSM Python implementation is generated from the FSM model using coord-dsl.

Virtual environment setup with ROS2

If you want to setup a ROS2 Python virtual environment, you'd need to allow using the ROS2 Python packages in the environment, e.g. with uv in zsh:

source /opt/ros/rolling/setup.zsh
cd $ROS_WS_HOME  # where the 'src' folder is located
uv venv --system-site-packages venv
touch ./venv/COLCON_IGNORE
colcon build

Additionally you'd need to add the following to setup.cfg, if you specify entry_points in setup.py:

[build_scripts]
executable = /usr/bin/env python3

Now you can activate both environments with:

source "$ROS_WS_HOME/venv/bin/activate"
source "$ROS_WS_HOME/install/setup.zsh"

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%