Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
510709e
Complete impedance control example with documentation
GogiPuttar Jul 19, 2024
4fe2ad7
Complete gimbal example
GogiPuttar Jul 19, 2024
8cce890
Complete cartesian impedance controller example
GogiPuttar Jul 19, 2024
cdd7e9a
Created floor and variable damping examples.
GogiPuttar Jul 24, 2024
f72675e
All examples are complete now
GogiPuttar Jul 24, 2024
f015b5f
Properly used ki and i_clamp terms for fixed example
GogiPuttar Jul 25, 2024
b586b2f
Correctly demonstrated how to use i_terms across all examples
GogiPuttar Jul 25, 2024
d63877f
Changed prevmode back to -1 also, for consistency
GogiPuttar Jul 25, 2024
88cece2
Added check for mode validity
GogiPuttar Jul 25, 2024
cf5717e
- CPP examples now follow config file convention
GogiPuttar Aug 9, 2024
6443fa5
All impedance control examples work
GogiPuttar Aug 13, 2024
89dc779
mobile_io_control example integrated with config files
GogiPuttar Aug 13, 2024
3afe1bf
Refactored repo according to new layout
GogiPuttar Aug 14, 2024
6317ab3
Renamed file paths to acoomaodate new config file layout
GogiPuttar Aug 14, 2024
c35092c
gravcomp and new gravcomp_toggle examples also integrated with config
GogiPuttar Aug 14, 2024
c6ec868
ex_AR_kit integrated
GogiPuttar Aug 14, 2024
b988f08
teach repeat fully integrated
GogiPuttar Aug 14, 2024
551e6ce
Ironed a few things out
GogiPuttar Aug 14, 2024
dd264b1
removed instructions from all examples
GogiPuttar Aug 20, 2024
2110d4f
Re-added initial update for reset
GogiPuttar Aug 20, 2024
75a1cd3
standardized namespace declarations
GogiPuttar Aug 20, 2024
e5dd48e
removed all sleeps
GogiPuttar Aug 20, 2024
046a221
changed getpluginbyname to getpluginbytype
GogiPuttar Aug 20, 2024
6c75cd8
UserData's getters have been incorporated
GogiPuttar Aug 20, 2024
0e69956
Checked every single example one last time
GogiPuttar Aug 20, 2024
153d9d5
Compatible with config.location_
GogiPuttar Aug 22, 2024
ba70958
examples repo compatible with newest API
GogiPuttar Sep 11, 2024
f843fbd
removed unnecessary file
GogiPuttar Sep 11, 2024
e3c6c74
reflects changes that will be made into config directory
GogiPuttar Sep 11, 2024
fe4a230
Introduced latency in AR kit, python also has this now
GogiPuttar Sep 11, 2024
e0782fc
Updated the C++ library reference
iamtesch Oct 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions kits/arm/config/ex_AR_kit.cfg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 6-DoF Arm
version: 1.0
families: ["Arm"]
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
hrdf: "hrdf/A-2085-06.hrdf"

gains:
default: "gains/A-2085-06.xml"

plugins:

- type: GravityCompensationEffort
name: gravComp
enabled: true
ramp_time: 0

- type: DynamicsCompensationEffort
name: dynamicsComp
enabled: true
ramp_time: 0

user_data:

# Joint angles at home for AR demo: [0, pi/3, 2*pi/3, 5*pi/6, -pi/2, 0]
home_position: [0, 1.0471975511965976, 2.0943951023931953, 2.6179938779914944, -1.5707963267948966, 0] # radians

# Time taken for a steady motion to the home position
homing_duration: 4 # seconds

# Latency in tracking the AR pose. Increase this to avoid jerks
latency: 0.3 # seconds

# Displacements of the phone are scaled by this value to give displacement of the end-effector
xyz_scale: 0.75

mobile_io_family: "Arm"
mobile_io_name: "mobileIO"
mobile_io_layout: "layouts/ex_AR_kit.json"
44 changes: 44 additions & 0 deletions kits/arm/config/ex_AR_kit_w_gripper.cfg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 6-DoF Arm
version: 1.0
families: ["Arm"]
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
hrdf: "hrdf/A-2240-06G.hrdf"

gains:
default: "gains/A-2240-06.xml"

plugins:

- type: GravityCompensationEffort
name: gravComp
enabled: true
ramp_time: 0

- type: DynamicsCompensationEffort
name: dynamicsComp
enabled: true
ramp_time: 0

user_data:

# Joint angles at home for AR demo: [0, pi/3, pi/2, 2*pi/3, -pi/2, 0]
home_position: [0, 1.0471975511965976, 1.5707963267948966, 2.0943951023931953, -1.5707963267948966, 0] # radians

# Time taken for a steady motion to the home position
homing_duration: 4 # seconds

# Latency in tracking the AR pose. Increase this to avoid jerks
latency: 0.3 # seconds

# Displacements of the phone are scaled by this value to give displacement of the end-effector
xyz_scale: 0.75

gripper_family: "Arm"
gripper_name: "gripperSpool"
gripper_gains: "gains/gripper_spool_gains.xml"
gripper_close_effort: -5.0 # (Nm) Effort applied to close the gripper. More negative effort will pinch the gripper harder.
gripper_open_effort: 1.0 # (Nm) Effort applied to open the gripper. More positive effort will NOT make the gripper harder to close.

mobile_io_family: "Arm"
mobile_io_name: "mobileIO"
mobile_io_layout: "layouts/ex_AR_kit_w_gripper.json"
20 changes: 20 additions & 0 deletions kits/arm/config/ex_gravity_compensation.cfg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 6-DoF Arm
version: 1.0
families: ["Arm"]
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
hrdf: "hrdf/A-2085-06.hrdf"

gains:
default: "gains/A-2085-06.xml"

plugins:

- type: GravityCompensationEffort
name: gravComp
enabled: true
ramp_time: 0

- type: DynamicsCompensationEffort
name: dynamicsComp
enabled: true
ramp_time: 0
26 changes: 26 additions & 0 deletions kits/arm/config/ex_gravity_compensation_toggle.cfg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 6-DoF Arm
version: 1.0
families: ["Arm"]
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
hrdf: "hrdf/A-2085-06.hrdf"

gains:
default: "gains/A-2085-06.xml"

plugins:

- type: GravityCompensationEffort
name: gravComp
enabled: false
ramp_time: 0

- type: DynamicsCompensationEffort
name: dynamicsComp
enabled: true
ramp_time: 0

user_data:

mobile_io_family: "Arm"
mobile_io_name: "mobileIO"
mobile_io_layout: "layouts/ex_gravity_compensation_toggle.json"
42 changes: 42 additions & 0 deletions kits/arm/config/ex_impedance_control_cartesian.cfg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 6-DoF Arm
version: 1.0
families: ["Arm"]
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
hrdf: "hrdf/A-2085-06.hrdf"

gains:
default: "gains/A-2085-06.xml"

plugins:

- type: GravityCompensationEffort
name: gravComp
enabled: true
ramp_time: 0

- type: DynamicsCompensationEffort
name: dynamicsComp
enabled: true
ramp_time: 0

# An impedance controller adds a virtual spring to the
# end-effector and can improve tracking. It can be enabled
# by setting 'enabled' to true. The gains are in the form of
# [x, y, z, rx, ry, rz]. Setting gains of zero deactivates
# the corresponding degree of translation or rotation.
# These gains correspond to a translational spring which maintains position but not orientation
- type: ImpedanceController
name: impedanceController
enabled: true
ramp_time: 0
gains_in_end_effector_frame: true
kp: [300, 300, 300, 0, 0, 0] # (N/m) or (Nm/rad)
kd: [5, 5, 5, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))
ki: [20, 20, 20, 0, 0, 0]
i_clamp: [10, 10, 10, 0, 0, 0] # max value

user_data:

mobile_io_family: "Arm"
mobile_io_name: "mobileIO"
mobile_io_layout: "layouts/ex_impedance_control_cartesian.json"
53 changes: 53 additions & 0 deletions kits/arm/config/ex_impedance_control_damping.cfg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 6-DoF Arm
version: 1.0
families: ["Arm"]
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
hrdf: "hrdf/A-2085-06.hrdf"

gains:
default: "gains/A-2085-06.xml"

plugins:

- type: GravityCompensationEffort
name: gravComp
enabled: true
ramp_time: 0

- type: DynamicsCompensationEffort
name: dynamicsComp
enabled: true
ramp_time: 0

# An impedance controller adds a virtual spring to the
# end-effector and can improve tracking. It can be enabled
# by setting 'enabled' to true. The gains are in the form of
# [x, y, z, rx, ry, rz]. Setting gains of zero deactivates
# the corresponding degree of translation or rotation.
# These gains are initialized to zero as the will be changed over the course of the damping example
- type: ImpedanceController
name: impedanceController
enabled: true
ramp_time: 0
gains_in_end_effector_frame: false
kp: [0, 0, 0, 0, 0, 0] # (N/m) or (Nm/rad)
kd: [0, 0, 0, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))

# Any extra configuration data is stored here
user_data:

# Distance above the base for overdamped, critically damped, and underdamped cases respectively
lower_limits: [0.0, 0.15, 0.3] # (m)

overdamped_kp: [100, 100, 0, 5, 5, 1] # (N/m) or (Nm/rad)
overdamped_kd: [15, 15, 1, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))

critically_damped_kp: [100, 100, 0, 5, 5, 1] # (N/m) or (Nm/rad)
critically_damped_kd: [5, 5, 1, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))

underdamped_kp: [100, 100, 0, 5, 5, 1] # (N/m) or (Nm/rad)
underdamped_kd: [0, 0, 0, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))

mobile_io_family: "Arm"
mobile_io_name: "mobileIO"
mobile_io_layout: "layouts/ex_impedance_control_damping.json"
42 changes: 42 additions & 0 deletions kits/arm/config/ex_impedance_control_fixed.cfg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 6-DoF Arm
version: 1.0
families: ["Arm"]
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
hrdf: "hrdf/A-2085-06.hrdf"

gains:
default: "gains/A-2085-06.xml"

plugins:

- type: GravityCompensationEffort
name: gravComp
enabled: true
ramp_time: 0

- type: DynamicsCompensationEffort
name: dynamicsComp
enabled: true
ramp_time: 0

# An impedance controller adds a virtual spring to the
# end-effector and can improve tracking. It can be enabled
# by setting 'enabled' to true. The gains are in the form of
# [x, y, z, rx, ry, rz]. Setting gains of zero deactivates
# the corresponding degree of translation or rotation.
# These gains correspond to a controller that rigidly maintains a fixed pose
- type: ImpedanceController
name: impedanceController
enabled: true
ramp_time: 0
gains_in_end_effector_frame: true
kp: [300, 300, 300, 5, 5, 1] # (N/m) or (Nm/rad)
kd: [5, 5, 5, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))
ki: [20, 20, 20, 0.5, 0.5, 0.5]
i_clamp: [10, 10, 10, 1, 1, 1] # max value

user_data:

mobile_io_family: "Arm"
mobile_io_name: "mobileIO"
mobile_io_layout: "layouts/ex_impedance_control_fixed.json"
42 changes: 42 additions & 0 deletions kits/arm/config/ex_impedance_control_floor.cfg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 6-DoF Arm
version: 1.0
families: ["Arm"]
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
hrdf: "hrdf/A-2085-06.hrdf"

gains:
default: "gains/A-2085-06.xml"

plugins:

- type: GravityCompensationEffort
name: gravComp
enabled: true
ramp_time: 0

- type: DynamicsCompensationEffort
name: dynamicsComp
enabled: true
ramp_time: 0

# An impedance controller adds a virtual spring to the
# end-effector and can improve tracking. It can be enabled
# by setting 'enabled' to true. The gains are in the form of
# [x, y, z, rx, ry, rz]. Setting gains of zero deactivates
# the corresponding degree of translation or rotation.
# These gains correspond to the stiffness of the virtual floor
- type: ImpedanceController
name: impedanceController
enabled: true
ramp_time: 0
gains_in_end_effector_frame: true
kp: [500, 500, 500, 5, 5, 1] # (N/m) or (Nm/rad)
kd: [5, 5, 5, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))
ki: [20, 20, 20, 0.5, 0.5, 0.5]
i_clamp: [10, 10, 10, 1, 1, 1] # max value

user_data:

mobile_io_family: "Arm"
mobile_io_name: "mobileIO"
mobile_io_layout: "layouts/ex_impedance_control_floor.json"
42 changes: 42 additions & 0 deletions kits/arm/config/ex_impedance_control_gimbal.cfg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 6-DoF Arm
version: 1.0
families: ["Arm"]
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
hrdf: "hrdf/A-2085-06.hrdf"

gains:
default: "gains/A-2085-06.xml"

plugins:

- type: GravityCompensationEffort
name: gravComp
enabled: true
ramp_time: 0

- type: DynamicsCompensationEffort
name: dynamicsComp
enabled: true
ramp_time: 0

# An impedance controller adds a virtual spring to the
# end-effector and can improve tracking. It can be enabled
# by setting 'enabled' to true. The gains are in the form of
# [x, y, z, rx, ry, rz]. Setting gains of zero deactivates
# the corresponding degree of translation or rotation.
# These gains correspond to a rotational spring emulating a gimbal
- type: ImpedanceController
name: impedanceController
enabled: true
ramp_time: 0
gains_in_end_effector_frame: true
kp: [0, 0, 0, 8, 8, 1] # (N/m) or (Nm/rad)
kd: [0, 0, 0, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))
ki: [0, 0, 0, 0.5, 0.5, 0.5]
i_clamp: [0, 0, 0, 1, 1, 1] # max value

user_data:

mobile_io_family: "Arm"
mobile_io_name: "mobileIO"
mobile_io_layout: "layouts/ex_impedance_control_gimbal.json"
Loading