Skip to content

Drive the tool's continuous servo as a speed, on the real arm - #38

Merged
MrDavidAlv merged 1 commit into
humblefrom
development
Sep 24, 2026
Merged

MrDavidAlv merged 1 commit into
humblefrom
development

Conversation

@MrDavidAlv

Copy link
Copy Markdown
Owner

The tool's continuous-rotation SG90 turns a pulse into a speed, not an angle, so it is not a joint. The driver now takes it as a gpio with a speed interface from -1 to 1: stop_us is the pulse at which it stands still, us_per_speed the pulse added for full speed, both declared in the calibration like the rest. A speed of zero sends no pulse at all, because the stopping pulse is a trim that drifts and no pulse always stops the servo; the channel is off when the driver activates, and anything past full speed is held to it.

The description gives the real arm the tool once the calibration names its stop pulse, on a channel of its own. config/hardware.yaml adds tool_controller, a forward_command_controller on that interface, which only the real arm has, and keeps the tool out of /joint_states, where robot_state_publisher and MoveIt read the arm's joints. arm.launch.py spawns it.

Tests: the driver keeps the tool off until it is asked to turn, sends the right pulse for half speed, never passes full speed, switches off again at zero, and refuses a tool on a joint's channel; the description carries the tool's calibration to the driver; and the dry run brings tool_controller up with the rest and checks /joint_states names the five joints and nothing else.

The tool's continuous-rotation SG90 turns a pulse into a speed, not an angle,
so it is not a joint. The driver now takes it as a gpio with a speed interface
from -1 to 1: stop_us is the pulse at which it stands still, us_per_speed the
pulse added for full speed, both declared in the calibration like the rest.
A speed of zero sends no pulse at all, because the stopping pulse is a trim
that drifts and no pulse always stops the servo; the channel is off when the
driver activates, and anything past full speed is held to it.

The description gives the real arm the tool once the calibration names its
stop pulse, on a channel of its own. config/hardware.yaml adds tool_controller,
a forward_command_controller on that interface, which only the real arm has,
and keeps the tool out of /joint_states, where robot_state_publisher and MoveIt
read the arm's joints. arm.launch.py spawns it.

Tests: the driver keeps the tool off until it is asked to turn, sends the
right pulse for half speed, never passes full speed, switches off again at
zero, and refuses a tool on a joint's channel; the description carries the
tool's calibration to the driver; and the dry run brings tool_controller up
with the rest and checks /joint_states names the five joints and nothing else.
@MrDavidAlv
MrDavidAlv merged commit 68a747d into humble Sep 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant