Skip to content

Commit 60d365c

Browse files
authored
Add description of a gpio-tag (#38)
1 parent 3c349d5 commit 60d365c

File tree

1 file changed

+133
-0
lines changed

1 file changed

+133
-0
lines changed
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Definition of command interfaces for non-joint related information
2+
3+
## Motivation
4+
Already multiple times, users raised the question about the handling of non-joint-related interfaces.
5+
Such interfaces are not considerd during [design of the ros2_control URDF-tag structure](./components_architecture_and_urdf_examples.md).
6+
The design proposes two possibilities to classify (group) the interfaces, using `<joint>` and `<sensor>` tags.
7+
`<joint>`-tag groups the interfaces associated with the joints of physical robots and actuators.
8+
They have command and state interfaces to set the goal values for hardware and read its current state.
9+
`<sensor>`-tag groups multiple state interfaces describing, e.g., internal states of hardware.
10+
11+
Most modern robots, especially industrial manipulators, also have other physical ports to control external hardware.
12+
The most usual ones are General Purpose Inputs/Outputs (GPIOs).
13+
Although the strict definition considers only digital ports, the term GPIO in this document describes any (one-dimensional) input/output port of physical hardware, e.g., digital or analog input/output.
14+
15+
## Problem
16+
To use GPIOs in the ros2_control framework, they have to be listed in the robot's URDF: inputs (state interfaces) under a `<sensor>`-tag and output (command and state interfaces) under a `<joint>`-tag.
17+
This could lead to confusion since non-existing (virtual) joints have to be defined in the ros2_control part of the URDF structure.
18+
"Joint" is a well-defined term in robotics. Therefore this naming should be avoided, i.e., another keyword should be used describing GPIOs, semantically separating them from the kinematics joints.
19+
20+
## Proposed solution
21+
Use of keyword "gpio" when describing input and output ports of a robotic device that cannot be associated with any joint or sensor.
22+
Parsing of `<gpio>-tag` is similar to this of a `<joint>`-tag having command and state interfaces.
23+
The tag must have at least one `<command>`- or `<state>`-tag as a child.
24+
25+
The keyword "gpio" is chosen for its generality.
26+
Although strictly used for digital signals, in this document describes any electrical analog, digital signal, or physical value.
27+
28+
The `<gpio>` tag can be used as a child of all three types of hardware interfaces, i.e., system, sensor, or actuator.
29+
Semantically, they describe values that can not be associated with a joint or a sensor.
30+
31+
### Examples
32+
33+
1. Robot with multiple GPIO interfaces
34+
- RRBot System
35+
- Digital: 4 inputs and 2 outputs
36+
- Analog: 2 inputs and 1 output
37+
- Vacuum valve at the flange (on/off)
38+
39+
```
40+
<ros2_control name="RRBotSystemMutipleGPIOs" type="system">
41+
<hardware>
42+
<plugin>ros2_control_demo_hardware/RRBotSystemPositionOnlyHardware</plugin>
43+
<param name="example_param_hw_start_duration_sec">2.0</param>
44+
<param name="example_param_hw_stop_duration_sec">3.0</param>
45+
<param name="example_param_hw_slowdown">2.0</param>
46+
</hardware>
47+
<joint name="joint1">
48+
<command_interface name="position">
49+
<param name="min">-1</param>
50+
<param name="max">1</param>
51+
</command_interface>
52+
<state_interface name="position"/>
53+
</joint>
54+
<joint name="joint2">
55+
<command_interface name="position">
56+
<param name="min">-1</param>
57+
<param name="max">1</param>
58+
</command_interface>
59+
<state_interface name="position"/>
60+
</joint>
61+
<gpio name="flange_digital_IOs>
62+
<command_interface name="digital_output1"/>
63+
<state_interface name="digital_output1"/> <!-- Needed to know current state of the output -->
64+
<command_interface name="digital_output2"/>
65+
<state_interface name="digital_output2"/>
66+
<state_interface name="digital_input1"/>
67+
<state_interface name="digital_input2"/>
68+
</gpio>
69+
<gpio name="flange_analog_IOs>
70+
<command_interface name="analog_output1"/>
71+
<state_interface name="analog_output1"/> <!-- Needed to know current state of the output -->
72+
<state_interface name="analog_input1"/>
73+
<state_interface name="analog_input2"/>
74+
</gpio>
75+
<gpio name="flange_vacuum>
76+
<command_interface name="vacuum"/>
77+
<state_interface name="vacuum"/> <!-- Needed to know current state of the output -->
78+
</gpio>
79+
</ros2_control>
80+
```
81+
82+
2. Gripper with electrical and suction grasping possibilities
83+
- Multimodal gripper
84+
- 1-DoF parallel gripper
85+
- suction on/off
86+
87+
```
88+
<ros2_control name="MultimodalGripper" type="actuator">
89+
<hardware>
90+
<plugin>ros2_control_demo_hardware/MultimodalGripper</plugin>
91+
</hardware>
92+
<joint name="parallel_fingers">
93+
<command_interface name="position">
94+
<param name="min">0</param>
95+
<param name="max">100</param>
96+
</command_interface>
97+
<state_interface name="position"/>
98+
</joint>
99+
<gpio name="suction>
100+
<command_interface name="suction"/>
101+
<state_interface name="suction"/> <!-- Needed to know current state of the output -->
102+
</gpio>
103+
</ros2_control>
104+
```
105+
106+
3. Force-Torque-Sensor with temperature feedback and adjustable calibration
107+
- 2D FTS
108+
- Temperature feedback in °C
109+
- Choice between 3 calibration matrices, i.e., calibration ranges
110+
111+
```
112+
<ros2_control name="RRBotForceTorqueSensor2D" type="sensor">
113+
<hardware>
114+
<plugin>ros2_control_demo_hardware/ForceTorqueSensor2DHardware</plugin>
115+
<param name="example_param_read_for_sec">0.43</param>
116+
</hardware>
117+
<sensor name="tcp_fts_sensor">
118+
<state_interface name="fx"/>
119+
<state_interface name="tz"/>
120+
<param name="frame_id">kuka_tcp</param>
121+
<param name="fx_range">100</param>
122+
<param name="tz_range">100</param>
123+
</sensor>
124+
<sensor name="temp_feedback">
125+
<state_interface name="temperature"/>
126+
</sensor>
127+
<gpio name="calibration">
128+
<command_interface name="calibration_matrix_nr"/>
129+
<state_interface name="calibration_matrix_nr"/>
130+
</gpio>
131+
</ros2_control>
132+
```
133+

0 commit comments

Comments
 (0)