1 minute read

Summary

Last week, I completely reestructured the package, making the tree edition steps ROS-agnostic. However, the creation of the ROS package (last step of the process) still had some issues which I tackle this week. After that, I released version 0.1 with full documentation.

Development

Basic dependency control

Currently, the process for generating a ROS 2 app with the package involves two steps: first, the generation of a self-contained tree, and second, using that tree to generate a zip file containing a functional ROS 2 package.

This is accomplished through a package template, which is populated with user parameters and the tree created in the previous step.

The generated package has two types of dependencies:

  • BehaviorTrees Dependencies: This package only contains a self-contained tree. To create an executable tree, the aforementioned Python package containing the translator and port access functions is necessary.

  • User Actions Dependencies: Users are free to use any libraries they desire when writing the tree actions implementation.

To account for these dependencies, I’ve expanded the app_generator script. It now updates the package.xml of the template so that all dependencies can be installed using the rosdep tool.

Utilities

I have prepared a Webots-simulated environment featuring the TB4 robot. Although the generated project is completely agnostic in this regard, it serves as a useful utility for users.

I’ve added a thirdparty.repos file that can be imported using the vcs tool. This repo includes a package for visualizing the tree.

repositories:
  ThirdParty/tb4_sim:
    type: git
    url: https://github.com/OscarMrZ/tb4_sim.git
    version: main
  ThirdParty/py_trees_ros_viewer:
    type: git
    url: https://github.com/splintered-reality/py_trees_ros_viewer.git
    version: devel

Vcstool is a simple tool that automates the download of these repositories. As they both are ROS 2 package, they must be later compiled using colcon.

Version 0.1 Release

I’ve completed writing an extended usage documentation and have prepared some demo videos. Subsequently, I created a GitHub release containing the code thus far.

References

BehaviorTrees BT.cpp rosdep tb4_sim vcstool