Skip to content

Commit bfcc00e

Browse files
authored
Gogiputtar/config files (#77)
* All impedance control examples now utilize just config files * Damping example is now fully initialized by config file * Grav comp example is now fully initialized by config file * AR kit example is now fully initialized by config file * MobileIO control example is fully initialized by config file * Basic teach repeat example fully initialized by config file * Created rudimentary skeleton for mobile bases * Added layout files from #71 * Changed skeleton to conform to new standard of robot configurations * HRDF and gains paths now point to the correct files * All config files include the correct mobileIO json files * All examples involving a mobileIO have a corresponding json * incorporated create_mobile_io_from_config * ex_AR_kit_w_gripper fully integrated with config files * Teach repeat with gripper integrated with example Goal sending is still not functional for the gripper * Standardized config files * Incorporated .cfg -> .cfg.yaml change * demo_util handles creation of demo objects using config file mobile_io and grippers are a part of user_data * All examples integrated with create_demo_from_config * mobile bases stuff * Refactored according to new config format Streamlined with c++ API * Fixed some gripper stuff * Refactored examples to 2.7.9
1 parent 8fa878c commit bfcc00e

79 files changed

Lines changed: 1824 additions & 978 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

kits/arm/config/ex_AR_kit.cfg.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# 6-DoF Arm
2+
version: 1.0
3+
families: ["Arm"]
4+
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
5+
hrdf: "hrdf/A-2085-06.hrdf"
6+
7+
gains:
8+
default: "gains/A-2085-06.xml"
9+
10+
plugins:
11+
12+
- type: GravityCompensationEffort
13+
name: gravComp
14+
enabled: true
15+
ramp_time: 0
16+
17+
- type: DynamicsCompensationEffort
18+
name: dynamicsComp
19+
enabled: true
20+
ramp_time: 0
21+
22+
user_data:
23+
24+
# Joint angles at home for AR demo: [0, pi/3, 2*pi/3, 5*pi/6, -pi/2, 0]
25+
home_position: [0, 1.0471975511965976, 2.0943951023931953, 2.6179938779914944, -1.5707963267948966, 0] # radians
26+
27+
# Time taken for a steady motion to the home position
28+
soft_start_time: 4 # seconds
29+
30+
# Displacements of the phone are scaled by this value to give displacement of the end-effector
31+
xyz_scale: 0.75
32+
33+
mobile_io_family: "Arm"
34+
mobile_io_name: "mobileIO"
35+
mobile_io_layout: "layouts/ex_AR_kit.json"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# 6-DoF Arm
2+
version: 1.0
3+
families: ["Arm"]
4+
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
5+
hrdf: "hrdf/A-2240-06G.hrdf"
6+
7+
gains:
8+
default: "gains/A-2240-06.xml"
9+
10+
plugins:
11+
12+
- type: GravityCompensationEffort
13+
name: gravComp
14+
enabled: true
15+
ramp_time: 0
16+
17+
- type: DynamicsCompensationEffort
18+
name: dynamicsComp
19+
enabled: true
20+
ramp_time: 0
21+
22+
user_data:
23+
24+
# Joint angles at home for AR demo: [0, pi/3, pi/2, 2*pi/3, -pi/2, 0]
25+
home_position: [0, 1.0471975511965976, 1.5707963267948966, 2.0943951023931953, -1.5707963267948966, 0] # radians
26+
27+
# Time taken for a steady motion to the home position
28+
soft_start_time: 4 # seconds
29+
30+
# Displacements of the phone are scaled by this value to give displacement of the end-effector
31+
xyz_scale: 0.75
32+
33+
gripper_family: "Arm"
34+
gripper_name: "gripperSpool"
35+
gripper_gains: "gains/gripper_spool_gains.xml"
36+
gripper_close_effort: -5.0 # (Nm) Effort applied to close the gripper. More negative effort will pinch the gripper harder.
37+
gripper_open_effort: 1.0 # (Nm) Effort applied to open the gripper. More positive effort will NOT make the gripper harder to close.
38+
39+
mobile_io_family: "Arm"
40+
mobile_io_name: "mobileIO"
41+
mobile_io_layout: "layouts/ex_AR_kit_w_gripper.json"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# 6-DoF Arm
2+
version: 1.0
3+
families: ["Arm"]
4+
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
5+
hrdf: "hrdf/A-2085-06.hrdf"
6+
7+
gains:
8+
default: "gains/A-2085-06.xml"
9+
10+
plugins:
11+
12+
- type: GravityCompensationEffort
13+
name: gravComp
14+
enabled: true
15+
ramp_time: 0
16+
17+
- type: DynamicsCompensationEffort
18+
name: dynamicsComp
19+
enabled: true
20+
ramp_time: 0
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# 6-DoF Arm
2+
version: 1.0
3+
families: ["Arm"]
4+
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
5+
hrdf: "hrdf/A-2085-06.hrdf"
6+
7+
gains:
8+
default: "gains/A-2085-06.xml"
9+
10+
plugins:
11+
12+
- type: GravityCompensationEffort
13+
name: gravComp
14+
enabled: false
15+
ramp_time: 0
16+
17+
- type: DynamicsCompensationEffort
18+
name: dynamicsComp
19+
enabled: true
20+
ramp_time: 0
21+
22+
user_data:
23+
24+
mobile_io_family: "Arm"
25+
mobile_io_name: "mobileIO"
26+
mobile_io_layout: "layouts/ex_gravity_compensation_toggle.json"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# 6-DoF Arm
2+
version: 1.0
3+
families: ["Arm"]
4+
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
5+
hrdf: "hrdf/A-2085-06.hrdf"
6+
7+
gains:
8+
default: "gains/A-2085-06.xml"
9+
10+
plugins:
11+
12+
- type: GravityCompensationEffort
13+
name: gravComp
14+
enabled: true
15+
ramp_time: 0
16+
17+
- type: DynamicsCompensationEffort
18+
name: dynamicsComp
19+
enabled: true
20+
ramp_time: 0
21+
22+
# An impedance controller adds a virtual spring to the
23+
# end-effector and can improve tracking. It can be enabled
24+
# by setting 'enabled' to true. The gains are in the form of
25+
# [x, y, z, rx, ry, rz]. Setting gains of zero deactivates
26+
# the corresponding degree of translation or rotation.
27+
# These gains correspond to a translational spring which maintains position but not orientation
28+
- type: ImpedanceController
29+
name: impedanceController
30+
enabled: true
31+
ramp_time: 0
32+
gains_in_end_effector_frame: true
33+
kp: [300, 300, 300, 0, 0, 0] # (N/m) or (Nm/rad)
34+
kd: [5, 5, 5, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))
35+
ki: [20, 20, 20, 0, 0, 0]
36+
i_clamp: [10, 10, 10, 0, 0, 0] # max value
37+
38+
user_data:
39+
40+
mobile_io_family: "Arm"
41+
mobile_io_name: "mobileIO"
42+
mobile_io_layout: "layouts/ex_impedance_control_cartesian.json"
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# 6-DoF Arm
2+
version: 1.0
3+
families: ["Arm"]
4+
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
5+
hrdf: "hrdf/A-2085-06.hrdf"
6+
7+
gains:
8+
default: "gains/A-2085-06.xml"
9+
10+
plugins:
11+
12+
- type: GravityCompensationEffort
13+
name: gravComp
14+
enabled: true
15+
ramp_time: 0
16+
17+
- type: DynamicsCompensationEffort
18+
name: dynamicsComp
19+
enabled: true
20+
ramp_time: 0
21+
22+
# An impedance controller adds a virtual spring to the
23+
# end-effector and can improve tracking. It can be enabled
24+
# by setting 'enabled' to true. The gains are in the form of
25+
# [x, y, z, rx, ry, rz]. Setting gains of zero deactivates
26+
# the corresponding degree of translation or rotation.
27+
# These gains are initialized to zero as the will be changed over the course of the damping example
28+
- type: ImpedanceController
29+
name: impedanceController
30+
enabled: true
31+
ramp_time: 0
32+
gains_in_end_effector_frame: false
33+
kp: [0, 0, 0, 0, 0, 0] # (N/m) or (Nm/rad)
34+
kd: [0, 0, 0, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))
35+
36+
# Any extra configuration data is stored here
37+
user_data:
38+
39+
# Distance above the base for overdamped, critically damped, and underdamped cases respectively
40+
lower_limits: [0.0, 0.15, 0.3] # (m)
41+
42+
overdamped_kp: [100, 100, 0, 5, 5, 1] # (N/m) or (Nm/rad)
43+
overdamped_kd: [15, 15, 1, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))
44+
45+
critically_damped_kp: [100, 100, 0, 5, 5, 1] # (N/m) or (Nm/rad)
46+
critically_damped_kd: [5, 5, 1, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))
47+
48+
underdamped_kp: [100, 100, 0, 5, 5, 1] # (N/m) or (Nm/rad)
49+
underdamped_kd: [0, 0, 0, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))
50+
51+
mobile_io_family: "Arm"
52+
mobile_io_name: "mobileIO"
53+
mobile_io_layout: "layouts/ex_impedance_control_damping.json"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# 6-DoF Arm
2+
version: 1.0
3+
families: ["Arm"]
4+
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
5+
hrdf: "hrdf/A-2085-06.hrdf"
6+
7+
gains:
8+
default: "gains/A-2085-06.xml"
9+
10+
plugins:
11+
12+
- type: GravityCompensationEffort
13+
name: gravComp
14+
enabled: true
15+
ramp_time: 0
16+
17+
- type: DynamicsCompensationEffort
18+
name: dynamicsComp
19+
enabled: true
20+
ramp_time: 0
21+
22+
# An impedance controller adds a virtual spring to the
23+
# end-effector and can improve tracking. It can be enabled
24+
# by setting 'enabled' to true. The gains are in the form of
25+
# [x, y, z, rx, ry, rz]. Setting gains of zero deactivates
26+
# the corresponding degree of translation or rotation.
27+
# These gains correspond to a controller that rigidly maintains a fixed pose
28+
- type: ImpedanceController
29+
name: impedanceController
30+
enabled: true
31+
ramp_time: 0
32+
gains_in_end_effector_frame: true
33+
kp: [300, 300, 300, 5, 5, 1] # (N/m) or (Nm/rad)
34+
kd: [5, 5, 5, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))
35+
ki: [20, 20, 20, 0.5, 0.5, 0.5]
36+
i_clamp: [10, 10, 10, 1, 1, 1] # max value
37+
38+
user_data:
39+
40+
mobile_io_family: "Arm"
41+
mobile_io_name: "mobileIO"
42+
mobile_io_layout: "layouts/ex_impedance_control_fixed.json"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# 6-DoF Arm
2+
version: 1.0
3+
families: ["Arm"]
4+
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
5+
hrdf: "hrdf/A-2085-06.hrdf"
6+
7+
gains:
8+
default: "gains/A-2085-06.xml"
9+
10+
plugins:
11+
12+
- type: GravityCompensationEffort
13+
name: gravComp
14+
enabled: true
15+
ramp_time: 0
16+
17+
- type: DynamicsCompensationEffort
18+
name: dynamicsComp
19+
enabled: true
20+
ramp_time: 0
21+
22+
# An impedance controller adds a virtual spring to the
23+
# end-effector and can improve tracking. It can be enabled
24+
# by setting 'enabled' to true. The gains are in the form of
25+
# [x, y, z, rx, ry, rz]. Setting gains of zero deactivates
26+
# the corresponding degree of translation or rotation.
27+
# These gains correspond to the stiffness of the virtual floor
28+
- type: ImpedanceController
29+
name: impedanceController
30+
enabled: true
31+
ramp_time: 0
32+
gains_in_end_effector_frame: true
33+
kp: [500, 500, 500, 5, 5, 1] # (N/m) or (Nm/rad)
34+
kd: [5, 5, 5, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))
35+
ki: [20, 20, 20, 0.5, 0.5, 0.5]
36+
i_clamp: [10, 10, 10, 1, 1, 1] # max value
37+
38+
user_data:
39+
40+
mobile_io_family: "Arm"
41+
mobile_io_name: "mobileIO"
42+
mobile_io_layout: "layouts/ex_impedance_control_floor.json"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# 6-DoF Arm
2+
version: 1.0
3+
families: ["Arm"]
4+
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
5+
hrdf: "hrdf/A-2085-06.hrdf"
6+
7+
gains:
8+
default: "gains/A-2085-06.xml"
9+
10+
plugins:
11+
12+
- type: GravityCompensationEffort
13+
name: gravComp
14+
enabled: true
15+
ramp_time: 0
16+
17+
- type: DynamicsCompensationEffort
18+
name: dynamicsComp
19+
enabled: true
20+
ramp_time: 0
21+
22+
# An impedance controller adds a virtual spring to the
23+
# end-effector and can improve tracking. It can be enabled
24+
# by setting 'enabled' to true. The gains are in the form of
25+
# [x, y, z, rx, ry, rz]. Setting gains of zero deactivates
26+
# the corresponding degree of translation or rotation.
27+
# These gains correspond to a rotational spring emulating a gimbal
28+
- type: ImpedanceController
29+
name: impedanceController
30+
enabled: true
31+
ramp_time: 0
32+
gains_in_end_effector_frame: true
33+
kp: [0, 0, 0, 8, 8, 1] # (N/m) or (Nm/rad)
34+
kd: [0, 0, 0, 0, 0, 0] # (N/(m/sec)) or (Nm/(rad/sec))
35+
ki: [0, 0, 0, 0.5, 0.5, 0.5]
36+
i_clamp: [0, 0, 0, 1, 1, 1] # max value
37+
38+
user_data:
39+
40+
mobile_io_family: "Arm"
41+
mobile_io_name: "mobileIO"
42+
mobile_io_layout: "layouts/ex_impedance_control_gimbal.json"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# 6-DoF Arm
2+
version: 1.0
3+
families: ["Arm"]
4+
names: ["J1_base", "J2_shoulder", "J3_elbow", "J4_wrist1", "J5_wrist2", "J6_wrist3"]
5+
hrdf: "hrdf/A-2085-06.hrdf"
6+
7+
gains:
8+
default: "gains/A-2085-06.xml"
9+
10+
plugins:
11+
12+
- type: GravityCompensationEffort
13+
name: gravComp
14+
enabled: true
15+
ramp_time: 0
16+
17+
- type: DynamicsCompensationEffort
18+
name: dynamicsComp
19+
enabled: true
20+
ramp_time: 0
21+
22+
user_data:
23+
24+
# Three waypoints for Buttons - B1, B2, B3
25+
waypoint_1: [0, 0, 0, 0, 0, 0]
26+
waypoint_2: [0.7853981633974483, 1.0471975511965976, 2.0943951023931953, 1.0471975511965976, 0.7853981633974483, 0] # [pi/4, pi/3, 2*pi/3, pi/3, pi/4, 0]
27+
waypoint_3: [-0.7853981633974483, 1.0471975511965976, 2.0943951023931953, 1.0471975511965976, 2.356194490192345, 0] # [-pi/4, pi/3, 2*pi/3, pi/3, 3*pi/4, 0]
28+
29+
# Time taken to travel to a waypoint
30+
travel_time: 3 # seconds
31+
32+
mobile_io_family: "Arm"
33+
mobile_io_name: "mobileIO"
34+
mobile_io_layout: "layouts/ex_mobile_io_control.json"

0 commit comments

Comments
 (0)