diff --git a/design_drafts/components_architecture_and_urdf_examples.md b/design_drafts/components_architecture_and_urdf_examples.md new file mode 100644 index 0000000..0e8cdd4 --- /dev/null +++ b/design_drafts/components_architecture_and_urdf_examples.md @@ -0,0 +1,406 @@ +# ROS2 Control Components Architecture and URDF-Description Examples + +## Architecture + +![ros2_control Components Achitecture][ros2_control_arch_resource_manager] + +[ros2_control_arch_resource_manager]: images/components_architecture.png "ROS2 Control - Components Architecture" + +## URDF Examples + +ros2_control implementation examples are presented for the following robot/robot-cell architectures: + +1. Industrial Robots with only one interface +2. Industrial Robots with multiple interfaces (can not be written at the same time) +2.1. Robots with multiple interfaces used at the same time - the same structure as in (2) +3. Industrial Robots with a sensor integrated into the robot's control box +4. Industrial Robots with a sensor connected to ROS computer +5. Modular Robots with separate communication to each actuator +6. Modular Robots with actuators not providing states and additional sensors (simple Transmissions) +7. Modular Robots with separate communication to each "actuator" with multi joints (Transmission Example) - (system component is used) +8. Sensor only +9. Actuator Only + +Note: + * Everything within the `` tag is implemented as a plugin. + * The examples below have some `` tags defined. The names in those tags are primarily for demonstration, not part of a pre-defined XML schema. Each component may define their names inside the `` tag. + +#### 1. Industrial Robots with only one interface + * the communication is done using proprietary API to communicate with robot control box + * Data for all joints is exchanged in batch (at once) + * Examples: KUKA RSI + +```xml + + + ros2_control_demo_hardware/2DOF_System_Hardware_Position_Only + 2 + 2 + + + ros2_control_components/PositionJoint + -1 + 1 + + + ros2_control_components/PositionJoint + -1 + 1 + + +``` + +Note: + * `ros2_control_components/PositionJoint`type has implicitly: + ```xml + position + position + ``` + +#### 2. Industrial Robots with multiple interfaces (can not be written at the same time) + * the communication is done using proprietary API to communicate with robot control box + * Data for all joints is exchanged in batch (at once) + * Examples: KUKA FRI, ABB Yummy, Schunk LWA4p, etc. + +```xml + + + ros2_control_demo_hardware/2DOF_System_Hardware_MultiInterface + 2 + 2 + + + ros2_control_components/MultiInterfaceJoint + position + velocity + effort + position + velocity + effort + -1 + 1 + -1 + 1 + -0.5 + 0.5 + + + ros2_control_components/MultiInterfaceJoint + position + position + velocity + effort + -1 + 1 + -1 + 1 + -0.5 + 0.5 + + +``` + +Note: + * For `joint2` the "velocity" and "effort" command interfaces are intentionally left out to show another common use-case where only one interface can be commanded, but robot provides state of multiple types. + + +#### 2.1 Robots with multiple interfaces used at the same time - the same structure as in (2) + * the communication is done using proprietary API to communicate with robot control box + * Data for all joints is exchanged in batch (at once) + * Multiple values can be commanded, e.g. goal position and the maximal velocity on the trajectory allowed + * Examples: (humanoid robots?) + +```xml + + + ros2_control_demo_hardware/2DOF_System_Hardware_MultiInterface_MultiWrite + 2 + 2 + + + ros2_control_components/MultiInterfaceJoint_MultiWrite + position + velocity + effort + position + velocity + effort + -1 + 1 + -1 + 1 + -0.5 + 0.5 + + + ros2_control_components/MultiInterfaceJoint_MultiWrite + position + position + velocity + effort + -1 + 1 + + +``` + + +#### 3. Industrial Robots with integrated sensor + * the communication is done using proprietary API + * Data for all joints is exchanged in batch (at once) + * Sensor data are exchanged together with joint data + * Examples: KUKA RSI with sensor connected to KRC (KUKA control box) + +```xml + + + ros2_control_demo_hardware/2DOF_System_Hardware_Sensor + 2 + 2 + + + ros2_control_components/PositionJoint + -1 + 1 + + + ros2_control_components/PositionJoint + -1 + 1 + + + ros2_control_components/ForceTorqueSensor + kuka_tcp + -100 + 100 + + +``` +Note: + * `ros2_control_components/PositionJoint`type has implicitly: + ```xml + position + position + ``` + + +#### 4. Industrial Robots with externally connected sensor + * the communication is done using proprietary API + * Data for all joints is exchanged at once + * Sensor data are exchanged independently + * Examples: KUKA RSI and FTS connected to ROS-PC + +``` + + + ros2_control_demo_hardware/2DOF_System_Hardware_Position_Only + 2 + 2 + + + ros2_control_components/PositionJoint + -1 + 1 + + + ros2_control_components/PositionJoint + -1 + 1 + + + + + ros2_control_demo_hardware/2D_Sensor_Force_Torque + 0.43 + + + ros2_control_components/ForceTorqueSensor + kuka_tcp + -100 + 100 + + +``` + +#### 5. Modular Robots with separate communication to each actuator + * the communication is done on actuator level using proprietary or standardized API (e.g., canopen_402, Modbus, RS232, RS485) + * Data for all actuators is exchanged separately from each other + * Examples: Mara, Arduino-based-robots + +```xml + + + ros2_control_demo_hardware/Position_Actuator_Hadware + 1.23 + 3 + + + ros2_control_components/PositionJoint + -1 + 1 + + + + + ros2_control_demo_hardware/Position_Actuator_Hadware + 1.23 + 3 + + + ros2_control_components/PositionJoint + -1 + 1 + + +``` + +#### 6. Modular Robots with actuators not providing states and with additional sensors (simple Transmissions) + * the communication is done on actuator level using proprietary or standardized API (e.g., canopen_402, modbus, RS232, RS485) + * Data for all actuators and sensors is exchanged separately from each other + * Examples: Arduino-based-robots, custom robots + +```xml + + + ros2_control_demo_hardware/Velocity_Actuator_Hadware + 1.23 + 3 + + + ros2_control_components/VelocityJoint + velocity + -1 + 1 + + + transmission_interface/SimpleTansmission + ${1024/PI} + + + + + ros2_control_demo_hardware/Velocity_Actuator_Hadware + 1.23 + 3 + + + ros2_control_components/VelocityJoint + velocity + -1 + 1 + + + + + ros2_control_demo_hardware/Position_Sensor_Hardware + 2 + + + ros2_control_components/PositionJoint + position + ${-PI} + ${PI} + + + + + ros2_control_demo_hardware/Position_Sensor_Hardware + 2 + + + ros2_control_components/PositionJoint + position + ${-PI} + ${PI} + + +``` +Note: + * since there is only one keyword `commandInterfaceType` or `stateInterfaceType` given to `ros2_control_components/PositionJoint`type the other one is ignored for the hardware + +#### 7. Modular Robots with separate communication to each "actuator" with multi joints (Transmission Example) - (system component is used) + * the communication is done on actuator level using proprietary or standardized API (e.g., canopen_402) + * Data for all actuators is exchanged separately from each other + * There is a many-to-many connection between joint and actuator values resolved by a transmission + * Examples: Wrist of a humanoid robot + +```xml + + + ros2_control_demo_hardware/Actuator_Hadware_MultiDOF + 1.23 + 3 + + + ros2_control_components/PositionJoint + -1 + 1 + + + ros2_control_components/PositionJoint + -1 + 1 + + + transmission_interface/SomeComplex_2x2_Transmission + {joint1, joint2} + {output2, output2} + 1.5 + 3.2 + 3.1 + 1.4 + + +``` + +#### 9. Sensor only + * the communication is done on a sensor level using proprietary or standardized API + * Examples: Camera, ForceTorqueSensor, Distance Sensors, IMU, etc. + +```xml + + + ros2_control_demo_hardware/CameraWithIMU_Sensor + 2 + + + ros2_control_components/IMUSensor + velocity + acceleration + -54 + 23 + -10 + 10 + + + ros2_control_components/2DImageSensor + image + 0 + 255 + + +``` + +#### 9. Actuator Only + * the communication is done on actuator level using proprietary or standardized API + * There may be a mechanical reduction or other type of 1-1 mapping between joint and actuator resolved by a transmission - there is no need to name the joint in the transmission tag + * Examples: Small Conveyor, Motor, etc. + +```xml + + + ros2_control_demo_hardware/Velocity_Actuator_Hadware + 1.13 + 3 + + + ros2_control_components/VelocityJoint + -1 + 1 + + + transmission_interface/RotationToLinerTansmission + ${1024/PI} + + +``` diff --git a/design_drafts/images/components_architecture.png b/design_drafts/images/components_architecture.png new file mode 100644 index 0000000..1b54258 Binary files /dev/null and b/design_drafts/images/components_architecture.png differ