Skip to content

Conversation

@jgeaso1266
Copy link
Collaborator

No description provided.

claude and others added 9 commits December 15, 2025 21:24
Implement moveOptions pattern for configuring speed and acceleration parameters:

**Arm (arm.go):**
- Add moveOptions struct to hold speed and acceleration parameters
- Implement buildMoveOptions() method following xarm precedence:
  1. Config defaults (speed_degs_per_sec, acceleration_degs_per_sec_per_sec)
  2. arm.MoveOptions (MaxVelRads, MaxAccRads)
  3. Extra map parameters (speed_r, speed_d, acceleration_r, acceleration_d)
- Update MoveToJointPositions to use moveOptions and pass to controller
- Update MoveThroughJointPositions to propagate options
- DoCommand already supports set_speed and set_acceleration for runtime changes

**Gripper (gripper.go):**
- Add gripperMoveOptions struct
- Add buildMoveOptions() method with same parameter precedence
- Add config fields for default speed/acceleration with validation
- Update Open, Grab, and set_position to use moveOptions
- Add DoCommand support for set_speed and set_acceleration (xarm pattern)

**Controller (manager.go):**
- Document that speed/acc parameters are accepted but not yet applied
- Add TODO for future feetech-servo library support

Speed/acceleration are configurable via:
- Config attributes (defaults)
- Extra params per move operation
- DoCommand for runtime updates

This matches the Viam xarm module implementation pattern.
Update MoveToJointPositions and MoveServosToPositions to use the
feetech-servo SetPositionsWithSpeed() method when speed is specified.

Changes:
- Use SetPositionsWithSpeed with speed map when speed > 0
- Fall back to SetPositions when speed is 0 or not specified
- Create speed map where all servos use the same speed value
- Remove TODO about future support (now implemented)
- Add note that acceleration is not yet supported by feetech-servo

This enables the speed parameters configured in arm.go and gripper.go
to actually control servo movement speed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.

2 participants