Fabric is a ROS2 package that provides a system to coordinate and manage various capabilities as defined by the Capabilities2 framework. This package extends the functionality of the Capabilities2 package to implement a Finite State Machine based on capabilities. It is designed to parse an execution plan given via an XML file and identify connections between various capabilities in the system which would be relayed back to Capabilities2 framework to execute.
Currently the system supports 4 control functions:
sequential: triggers child runners in sequence.parallel_all: waits for all child branches to report success before proceeding.parallel_any: proceeds when any child branch reports success.recovery: defines a recovery branch that can be triggered on failure.
- Implements a Partially Incomplete Finite State Machine based on the XML execution plan
- Validates the XML plan for compatibility with robot.
- Parses XML-based plans and identifies connections between capabilities.
- Informs capabilities2 framework regarding the capability connections and orchestrate a FSM.
- XML Plan strucutre
- Parser Plugins
- Validation Plugins
- Capability Client
- Bond Client
- Internal Data Structures
- ROS2 Interface
- Fabric Status system
Clone the repo into a workspace
mkdir -p workspace/src
cd workspace/srcgit clone https://github.com/CollaborativeRoboticsLab/fabric.gitcd ..
rosdep install --from-paths src --ignore-src -r -ySetup the capabilities2 framework as instructed.
The fabric_server/plans/default.xml file is the default example plan. New plans can be added there or stored anywhere else on disk.
The fabric_server/config/fabric.yaml file configures the parser plugin, validation plugin, and capability client settings. The plan path itself is provided by the launch file.
Launch with the packaged default plan:
source install/setup.bash
ros2 launch fabric_server fabric.launch.pyLaunch with a different packaged plan by filename:
source install/setup.bash
ros2 launch fabric_server fabric.launch.py filename:=default.xmlLaunch with an explicit plan path:
source install/setup.bash
ros2 launch fabric_server fabric.launch.py plan_file_path:=/absolute/path/to/plan.xmlComposed launch is a more efficient approach to spin up a system under a single process. Positives are IPC via shared memory, providing lower latency and optimized resoirce usage. Draw back of this approach is that, it becomes harder for debugging and fault tolerence.
Use independent launch files with standard node based implementations for debugging. For deployment, utilize composed launch where ever possible.
We provide several composed launch files for launching the system.
This launch file starts Fabric Server and Capabilities2 Server. Suitable for non-generative use with predefined plans.
source install/setup.bash
ros2 launch fabric_server nongenerative.launch.pyThis launch file starts Fabric Server, Capabilities2 Server, and prompt_tools. Suitable for generative use without perception.
export OPENAI_API_KEY=
source install/setup.bash
ros2 launch fabric_server generative.launch.pyThis launch file starts Fabric Server, Capabilities2 Server, prompt_tools, and Perception Server. Suitable for generative use with perception.
export OPENAI_API_KEY=
source install/setup.bash
ros2 launch fabric_server generative_perception.launch.py