-
Notifications
You must be signed in to change notification settings - Fork 21
[feat] Admittance Controller & Variable stiffness support #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
danielsanjosepro
merged 5 commits into
learnsyslab:main
from
KAIST-IRiS-Haptics-Telerobotics:feature/admittance-controller
Apr 9, 2026
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
cd1a749
feat: integrate CartesianAdmittanceController into crisp_py
domrachev03 151617d
fix: update default admittance config with actual controller parameters
domrachev03 ea74129
fix: temporaly disable controller config in admittance example
domrachev03 d814f23
refactor: remove manual enabling of variable admittance stiffness in …
domrachev03 ac68fe5
fix: make admittance controller pubs & subs optional; Admittance-enab…
domrachev03 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # Default admittance controller parameters | ||
|
|
||
| # Impedance outer loop | ||
| limit_error: true | ||
| limit_torques: true | ||
| max_delta_tau: 2.0 | ||
| nullspace.stiffness: 5.0 | ||
| stop_commands: false | ||
|
|
||
| task.k_pos_x: 900.0 | ||
| task.k_pos_y: 900.0 | ||
| task.k_pos_z: 900.0 | ||
| task.k_rot_x: 45.0 | ||
| task.k_rot_y: 45.0 | ||
| task.k_rot_z: 45.0 | ||
|
|
||
| task.d_pos_x: 60.0 | ||
| task.d_pos_y: 60.0 | ||
| task.d_pos_z: 60.0 | ||
| task.d_rot_x: 10.0 | ||
| task.d_rot_y: 10.0 | ||
| task.d_rot_z: 10.0 | ||
|
|
||
| task.error_clip.rx: 0.5 | ||
| task.error_clip.ry: 0.5 | ||
| task.error_clip.rz: 0.5 | ||
| task.error_clip.x: 0.1 | ||
| task.error_clip.y: 0.1 | ||
| task.error_clip.z: 0.1 | ||
|
|
||
| use_coriolis_compensation: true | ||
| use_friction: true | ||
| use_gravity_compensation: false | ||
| use_local_jacobian: true | ||
| use_operational_space: false | ||
|
|
||
| # Admittance parameters (virtual MSD) | ||
| admittance.mass_x: 1.0 | ||
| admittance.mass_y: 1.0 | ||
| admittance.mass_z: 1.0 | ||
| admittance.mass_rx: 0.1 | ||
| admittance.mass_ry: 0.1 | ||
| admittance.mass_rz: 0.1 | ||
| admittance.stiffness_x: 200.0 | ||
| admittance.stiffness_y: 200.0 | ||
| admittance.stiffness_z: 200.0 | ||
| admittance.stiffness_rx: 10.0 | ||
| admittance.stiffness_ry: 10.0 | ||
| admittance.stiffness_rz: 10.0 | ||
| admittance.damping_x: 50.0 | ||
| admittance.damping_y: 50.0 | ||
| admittance.damping_z: 50.0 | ||
| admittance.damping_rx: 5.0 | ||
| admittance.damping_ry: 5.0 | ||
| admittance.damping_rz: 5.0 | ||
|
|
||
| # F/T sensor | ||
| ft_sensor.topic: "ft_sensor_wrench" |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| """Example demonstrating variable admittance stiffness for the admittance controller. | ||
|
|
||
| This script shows how to change the admittance stiffness at runtime. The robot | ||
| maintains its position while the admittance compliance is changed from stiff | ||
| (resists external forces) to compliant (yields to external forces). | ||
|
|
||
| Requirements: | ||
| - cartesian_admittance_controller must be loaded and available | ||
| - variable_admittance_stiffness.enabled must be set to true | ||
| - An F/T sensor must be publishing on ft_sensor_wrench topic | ||
| """ | ||
|
|
||
| from crisp_py.robot import make_robot | ||
|
|
||
| robot = make_robot("fr3") | ||
| robot.wait_until_ready() | ||
|
|
||
| # Switch to admittance controller | ||
| robot.controller_switcher_client.switch_controller("cartesian_admittance_controller") | ||
|
|
||
| # Load default admittance parameters | ||
| robot.admittance_controller_parameters_client.load_param_config( | ||
| "config/control/default_admittance.yaml" | ||
| ) | ||
|
|
||
| print("Admittance controller active. An F/T sensor is required.") | ||
| print("Push the robot gently to feel the compliance change.") | ||
| print() | ||
|
|
||
| # High admittance stiffness (stiff - resists external forces) | ||
| print("Setting HIGH admittance stiffness: translational=[500, 500, 500], rotational=[30, 30, 30]") | ||
| print("The robot should feel stiff and resist external forces.") | ||
| robot.set_admittance_stiffness(translational=[500.0, 500.0, 500.0], rotational=[30.0, 30.0, 30.0]) | ||
| input("Push the robot. Press Enter for MEDIUM stiffness...") | ||
|
|
||
| # Medium admittance stiffness | ||
| print("Setting MEDIUM admittance stiffness: translational=[100, 100, 100], rotational=[10, 10, 10]") | ||
| print("The robot should be moderately compliant.") | ||
| robot.set_admittance_stiffness(translational=[100.0, 100.0, 100.0], rotational=[10.0, 10.0, 10.0]) | ||
| input("Push the robot. Press Enter for LOW stiffness...") | ||
|
|
||
| # Low admittance stiffness (compliant - yields to external forces) | ||
| print("Setting LOW admittance stiffness: translational=[20, 20, 20], rotational=[2, 2, 2]") | ||
| print("The robot should feel very compliant and yield to pushes.") | ||
| robot.set_admittance_stiffness(translational=[20.0, 20.0, 20.0], rotational=[2.0, 2.0, 2.0]) | ||
| input("Push the robot. Press Enter to exit...") | ||
|
|
||
| robot.shutdown() |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could make this one optional with a param in the config file to avoid using it if no admittance controller is being used