Skip to content

Conversation

@euyniy
Copy link
Contributor

@euyniy euyniy commented Jul 23, 2025

  • Temporary fix: read method with effective refresh_all()
  • Use conservative PD parameters for control

Copilot AI review requested due to automatic review settings July 23, 2025 11:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the read() method in the hardware plugin by implementing a temporary solution and adjusts control parameters for more conservative operation.

  • Replaces problematic sleep/ignore pattern with refresh_all() call in read method
  • Updates default PD controller gains to more conservative values
  • Adds TODO comment indicating gripper mappings need implementation

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
v10_simple_hardware.cpp Fixes read method timing issues and adds gripper mapping TODO
v10_simple_hardware.hpp Updates default KP gains to more conservative values

// Convert joint value (0-1) to motor position (radians)
double motor_command = joint_to_motor_radians(pos_commands_[ARM_DOF]);

openarm_->get_gripper().mit_control_all({{5.0, 1.0, motor_command, 0, 0}});
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic numbers {5.0, 1.0, motor_command, 0, 0} should be replaced with named constants or variables to improve code readability and maintainability. Consider defining constants like GRIPPER_KP, GRIPPER_KD, etc.

Suggested change
openarm_->get_gripper().mit_control_all({{5.0, 1.0, motor_command, 0, 0}});
openarm_->get_gripper().mit_control_all({{GRIPPER_KP, GRIPPER_KD, motor_command, GRIPPER_VELOCITY, GRIPPER_TORQUE}});

Copilot uses AI. Check for mistakes.
@euyniy euyniy merged commit 444a998 into enactic:main Jul 24, 2025
1 check passed
thomasonzhou pushed a commit that referenced this pull request Jul 24, 2025
- Temporary fix: read method with effective refresh_all()
- Use conservative PD parameters for control

Fix typo in config yaml param

Bump version to v1.0
euyniy added a commit that referenced this pull request Jul 25, 2025
- Temporary fix: read method with effective refresh_all()
- Use conservative PD parameters for control

Fix typo in config yaml param

Bump version to v1.0
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