Skip to content

Support admittance control - #598

Merged
JohnTGZ merged 24 commits into
phase_2from
jt/add-admittance-mode
Aug 5, 2026
Merged

Support admittance control#598
JohnTGZ merged 24 commits into
phase_2from
jt/add-admittance-mode

Conversation

@JohnTGZ

@JohnTGZ JohnTGZ commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Overview

This PR updates the robot_control_bridge to support Cartesian admittance control as the default Cartesian controller. It makes the following changes:

  • Fix stiffness, damping and mass parameters to a default set of parameters that generalize well to all tasks (Freespace and contact). These cannot be changed at runtime via MotionUpdate or JointMotionUpdate messages
  • Update limits (kinematic and joint) to match the actual robot setup in phase 2
  • Add support for F/T sensor part in robot controller configs to enable admittance control
  • Expose critical_mass as a config parameter
  • Change default interpolation mode from LINEAR_INTERPOLATION to REFLEXXES.

TODO

  • Fix stiffness, damping and mass parameters to a default set of parameters that generalize well to all tasks (Freespace and contact)
  • Set default value for USE_FIXED_CONTROL_PARAMETERS to true
  • Update changelog flowstate/aic_flowstate_ros_bridge/CHANGELOG.rst
  • Update/remove test scripts

@JohnTGZ
JohnTGZ changed the base branch from phase_1 to phase_2 July 24, 2026 07:06
@JohnTGZ
JohnTGZ force-pushed the jt/add-admittance-mode branch from 4d250e5 to 1c10d91 Compare July 28, 2026 09:40
@JohnTGZ
JohnTGZ marked this pull request as ready for review July 30, 2026 15:43
stiffness_param = self.declare_parameter(
"target_pose_stiffness", [10.0, 10.0]
).value
self.target_pose_stiffness = [stiffness_param[0]] * 3 + [stiffness_param[1]] * 3

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Based on how this script handles target_pose_stiffness and target_pose_damping, it seems like the test_joint_targets.launch.py and test_pose_targets.launch.py needs to provide a list as such: [target_pose_stiffness, target_pose_damping] as opposed to the six element list:

target_joint_stiffness": [
175.0,
175.0,
175.0,
125.0,
50.0,
50.0,
]

It might be good to re-verify on hardware that our chosen rotational damping parameters make sense because of this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch, sorry I didn't catch this. I will modify the script and we can test it again.

target_mass->set_data(21, critical_mass.rx());
target_mass->set_data(28, critical_mass.ry());
target_mass->set_data(35, critical_mass.rz());
if (data_->critical_mass_.size() >= 6) {

@kaushikbalasundar kaushikbalasundar Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We use this pattern of setting diagonal elements using indices 0, 7, 14, 21, 28, 35 multiple times throughout this file. Consider adding a function to replace this?

inline void SetDiagonal6x6(google::protobuf::RepeatedField<double>* field, const std::vector<double>& diag) {
  field->Resize(36, 0.0);
  for (int i = 0; i < 6; ++i) {
    field->Set(i * 7, diag[i]);
  }
}

@kaushikbalasundar kaushikbalasundar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Some minor comments.

Could you verify if my understanding of how we use the target_stiffness and target_damping in test_robot_control_bridge.py is correct? If so, I'd like to reverify if the rotational stiffness and damping params make sense on hardware.

@JohnTGZ

JohnTGZ commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Some minor comments.

Could you verify if my understanding of how we use the target_stiffness and target_damping in test_robot_control_bridge.py is correct? If so, I'd like to reverify if the rotational stiffness and damping params make sense on hardware.

Yes what you mentioned is correct, it would only use the first 2 values of the array and ignore the rest. Thanks for catching this, we should test it again to verify.

I have fixed the issue and addressed your comments in commits e465546 and c2b021b

@kaushikbalasundar
kaushikbalasundar self-requested a review August 5, 2026 01:37
@JohnTGZ
JohnTGZ merged commit 562025b into phase_2 Aug 5, 2026
6 checks passed
@JohnTGZ
JohnTGZ deleted the jt/add-admittance-mode branch August 5, 2026 05:47
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