Repository navigation
Drive the tool's continuous servo as a speed, on the real arm - #38
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.