The dashed teal arm is where the command alone assumes the joint is. The solid yellow arm is where the hardware really is. Add load or block the joint, and the two separate. The red arc is the gap between them. Only the state interface tells the truth.
The command is a step the controller chooses. The state is what comes back, always a little late, and lower when there is load. Position is the running total of velocity, so a small speed gap becomes a growing position gap.
A joint declares which interfaces it offers. Controllers write command interfaces and read state interfaces. Hover, focus or tap a line and the panel beside it shows who writes that value, who reads it, and its live number.
<ros2_control name="MyRobot" type="system"> <joint name="joint1"> <command_interface name="velocity"/> <state_interface name="position"/> <state_interface name="velocity"/> </joint></ros2_control>
The controller writes this number every cycle. It is a wish. It says nothing about what the joint is really doing.
The hardware reports this after reading its sensors. It is a measurement of where the joint is.
The measured speed. Same unit as the command, but a different meaning: what is happening, not what was asked.
| Side | Question | Who writes, who reads | Tag | Here |
|---|---|---|---|---|
| Command | "What do I want?" | Controller writes, hardware reads | <command_interface> | velocity |
| State | "What is happening?" | Hardware writes, controller reads | <state_interface> | position, velocity |
Is each item a command or a state?