In ROS2, software components that actually read / write commands from / to the hardware / simulation are called **Hardware interfaces**. ![[Pasted image 20250717093011.png|center|550]] Ressource Manager gathers up all hardware interfaces (e,g, each motor might have seperate one, different kinds of motors, ...) and exposes them together to the controller manager. `controller_manager` only sees control and state interfaces. These are declared in the [[URDF - Unified Robot Description Format|URDF]] under `<ros2_control>` tag. It then matches these interfaces up with topics (direct or via [[MoveIt2]]) according to a `.yaml` parameter file. As long as they don't share write interfaces, one motor can have multiple controllers. >[!brainwaves] Controllers don't necessarily Control >Controllers can be read-only, as the `ros2_control` framework is responsible for all hardware interaction. --- #### Interacting with the Controller Manager **Via [[ROS2 - Services|Services]]** **Via CLI tool** ```bash title='Show Information' # ros2 control list_controllers # ros2 control list_controller_types # ros2 control list_hardware_interfaces ``` Controllers have **3 key states**: 1. **Unconfigured** (just loaded, but not ready) 2. **Inactive** (configured, but not running) 3. **Active** (fully running and controlling the robot) For example, if a controller is called `joint_trajctory_controller`, use ```bash # all at once ros2 control load_controller --set-state active <name> ``` --- #### Launching #ToDo - controller_name parameter is declared under `franka_ros2/franka_bringup/launch/example.launch.py`, points to config --- #### Configuring a Controller - add to controller_manager launch file (ros2_control.yaml) ``` controller_manager: ... franka_controller: type: franka_controllers/CartesianImpedanceController ``` - Add controller specific config under `franka_ros2/franka_bringup/config/controllers.yaml` --- #### Declaring Hardware Interfaces #ToDo