In general Foreman has layered architecture providing possibility to connect to different communication/IPC systems and not only ROS 2.
The main idea is to have a higher-level interface to control the state of a complex robot system running ros2_control. On this level states of the system are defined that are specified by the HW and Controllers being in specific lifecycle state. Foreman takes care of the transitions.
Implemented requirements
- Possibility to add custom adapters to non-ROS 2 systems, e.g., connecting Foreman with a web UI.
- Having a YAML configuration to define application states, names, and defining goal states for the hardware components and controllers.
- Possibility to also control the state of lifecycle nodes, e.g.,
robot_manager for KUKA robots that set the states of the controllers and need custom activation and deactivation strategies — so we don't need to re-implement manufacturer specific processes.
- Having an option to set
autostart_state as the goal of the state of the system after Foreman is started.
- Foreman has to robustly observe and wait for components to be available (especially on autostart).
- Foreman observes the state of the components continuously and reports its changes of the overall system state if it matches a defined one.
- Foreman takes care of all transitions and retrials for a specific state.
Missing
- Per default if there is no configuration file we should have
unconfigured, inactive and active states setting all HW and Controllers into those.
- Using actions instead of services for the setting of transitions.
- Consider using standard names for the states that are automatically interpretable by external systems.
- RQT GUI for ROS 2 that is showing and can control Foreman state (we can provide a sketch for it).
- How to handle
error and warning states, e.g., Foreman observes a state that is not defined in configuration — what does this mean? Is this a hard error? In which case? (Can this be somehow defined in a simple way — as number of states is exponential with the number of hardware components and controllers).
- Do we need a set of standard states? To handle errors and such things?
- Foreman should handle controller chains, this means it should automatically calculate their starting and stopping if on activation the most “left” controller is activated and on deactivation the most “right” controller is deactivated. Foreman takes care that all depending on controller in the chain are also activated/deactivated.
- Auto-generated YAML file for the Foreman from the available controllers and hardware components.
- How do we react if we can not reach a certain state, but we have started transition already? Do we return to the previous state, or we require some “safe” state?
Use Cases
- Cell with robot arm and the gripper that requires lifecycle node for arm activation. Gripper is controlled separately. When using MockHW then we have more controller as Gripper sensors are also simulated through a forwarding controller and simulation script.
- Having a system with an undercarriage, robot arm, gripper and 2 more actuators that are controllable all separately, there are at least 8 controllers and depending on the state of the activation of controllers and hardware the overall mode of the system is determined, e.g.,
manual, maintanance, automatic, ...
- Out-of-the box running of simple setups like ros2_control_demos without any configuration.
In general Foreman has layered architecture providing possibility to connect to different communication/IPC systems and not only ROS 2.
The main idea is to have a higher-level interface to control the state of a complex robot system running ros2_control. On this level states of the system are defined that are specified by the HW and Controllers being in specific lifecycle state. Foreman takes care of the transitions.
Implemented requirements
robot_managerfor KUKA robots that set the states of the controllers and need custom activation and deactivation strategies — so we don't need to re-implement manufacturer specific processes.autostart_stateas the goal of the state of the system after Foreman is started.Missing
unconfigured,inactiveandactivestates setting all HW and Controllers into those.errorandwarningstates, e.g., Foreman observes a state that is not defined in configuration — what does this mean? Is this a hard error? In which case? (Can this be somehow defined in a simple way — as number of states is exponential with the number of hardware components and controllers).Use Cases
manual,maintanance,automatic, ...