Skip to content

Commit 17c135a

Browse files
author
Dan Zimmerman
committed
Possibly working hardware dep injection
1 parent 1fc7991 commit 17c135a

13 files changed

+300
-108
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Joint dynamics parameters
2+
# useful to specialize these for Gazebo Classic
3+
# or Gazebo Sim (Formerly Ignition Gazebo) simulations
4+
5+
joint_dynamics:
6+
shoulder_pan_joint:
7+
damping: 0.0
8+
friction: 0.0
9+
shoulder_lift_joint:
10+
damping: 0.0
11+
friction: 0.0
12+
elbow_joint:
13+
damping: 0.0
14+
friction: 0.0
15+
wrist_1_joint:
16+
damping: 0.0
17+
friction: 0.0
18+
wrist_2_joint:
19+
damping: 0.0
20+
friction: 0.0
21+
wrist_3_joint:
22+
damping: 0.0
23+
friction: 0.0
24+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Joint dynamics parameters
2+
# useful to specialize these for Gazebo Classic
3+
# or Gazebo Sim (Formerly Ignition Gazebo) simulations
4+
5+
joint_dynamics:
6+
shoulder_pan_joint:
7+
damping: 0.0
8+
friction: 0.0
9+
shoulder_lift_joint:
10+
damping: 0.0
11+
friction: 0.0
12+
elbow_joint:
13+
damping: 0.0
14+
friction: 0.0
15+
wrist_1_joint:
16+
damping: 0.0
17+
friction: 0.0
18+
wrist_2_joint:
19+
damping: 0.0
20+
friction: 0.0
21+
wrist_3_joint:
22+
damping: 0.0
23+
friction: 0.0
24+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Joint dynamics parameters
2+
# useful to specialize these for Gazebo Classic
3+
# or Gazebo Sim (Formerly Ignition Gazebo) simulations
4+
5+
joint_dynamics:
6+
shoulder_pan_joint:
7+
damping: 0.0
8+
friction: 0.0
9+
shoulder_lift_joint:
10+
damping: 0.0
11+
friction: 0.0
12+
elbow_joint:
13+
damping: 0.0
14+
friction: 0.0
15+
wrist_1_joint:
16+
damping: 0.0
17+
friction: 0.0
18+
wrist_2_joint:
19+
damping: 0.0
20+
friction: 0.0
21+
wrist_3_joint:
22+
damping: 0.0
23+
friction: 0.0
24+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Joint dynamics parameters
2+
# useful to specialize these for Gazebo Classic
3+
# or Gazebo Sim (Formerly Ignition Gazebo) simulations
4+
5+
joint_dynamics:
6+
shoulder_pan_joint:
7+
damping: 0.0
8+
friction: 0.0
9+
shoulder_lift_joint:
10+
damping: 0.0
11+
friction: 0.0
12+
elbow_joint:
13+
damping: 0.0
14+
friction: 0.0
15+
wrist_1_joint:
16+
damping: 0.0
17+
friction: 0.0
18+
wrist_2_joint:
19+
damping: 0.0
20+
friction: 0.0
21+
wrist_3_joint:
22+
damping: 0.0
23+
friction: 0.0
24+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Joint dynamics parameters
2+
# useful to specialize these for Gazebo Classic
3+
# or Gazebo Sim (Formerly Ignition Gazebo) simulations
4+
5+
joint_dynamics:
6+
shoulder_pan_joint:
7+
damping: 0.0
8+
friction: 0.0
9+
shoulder_lift_joint:
10+
damping: 0.0
11+
friction: 0.0
12+
elbow_joint:
13+
damping: 0.0
14+
friction: 0.0
15+
wrist_1_joint:
16+
damping: 0.0
17+
friction: 0.0
18+
wrist_2_joint:
19+
damping: 0.0
20+
friction: 0.0
21+
wrist_3_joint:
22+
damping: 0.0
23+
friction: 0.0
24+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Joint dynamics parameters
2+
# useful to specialize these for Gazebo Classic
3+
# or Gazebo Sim (Formerly Ignition Gazebo) simulations
4+
5+
joint_dynamics:
6+
shoulder_pan_joint:
7+
damping: 0.0
8+
friction: 0.0
9+
shoulder_lift_joint:
10+
damping: 0.0
11+
friction: 0.0
12+
elbow_joint:
13+
damping: 0.0
14+
friction: 0.0
15+
wrist_1_joint:
16+
damping: 0.0
17+
friction: 0.0
18+
wrist_2_joint:
19+
damping: 0.0
20+
friction: 0.0
21+
wrist_3_joint:
22+
damping: 0.0
23+
friction: 0.0
24+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Joint dynamics parameters
2+
# useful to specialize these for Gazebo Classic
3+
# or Gazebo Sim (Formerly Ignition Gazebo) simulations
4+
5+
joint_dynamics:
6+
shoulder_pan_joint:
7+
damping: 0.0
8+
friction: 0.0
9+
shoulder_lift_joint:
10+
damping: 0.0
11+
friction: 0.0
12+
elbow_joint:
13+
damping: 0.0
14+
friction: 0.0
15+
wrist_1_joint:
16+
damping: 0.0
17+
friction: 0.0
18+
wrist_2_joint:
19+
damping: 0.0
20+
friction: 0.0
21+
wrist_3_joint:
22+
damping: 0.0
23+
friction: 0.0
24+

urdf/inc/NOT_HERE_ur_hardware.xacro

Lines changed: 0 additions & 63 deletions
This file was deleted.

urdf/inc/ur_common.xacro

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,15 @@
4141
<mesh filename="${mesh}"/>
4242
</xacro:macro>
4343

44-
<xacro:macro name="read_model_data" params="joint_limits_parameters_file kinematics_parameters_file physical_parameters_file visual_parameters_file force_abs_paths">
44+
<xacro:macro name="read_model_data" params="joint_limits_parameters_file kinematics_parameters_file physical_parameters_file visual_parameters_file joint_dynamics_parameters_file force_abs_paths">
4545

4646
<xacro:property name="force_abs_paths" value="${force_abs_paths}" scope="parent"/>
4747
<!-- Read .yaml files from disk, load content into properties -->
4848
<xacro:property name="config_joint_limit_parameters" value="${xacro.load_yaml(joint_limits_parameters_file)}"/>
4949
<xacro:property name="config_kinematics_parameters" value="${xacro.load_yaml(kinematics_parameters_file)}"/>
5050
<xacro:property name="config_physical_parameters" value="${xacro.load_yaml(physical_parameters_file)}"/>
5151
<xacro:property name="config_visual_parameters" value="${xacro.load_yaml(visual_parameters_file)}"/>
52+
<xacro:property name="config_joint_dynamics" value="${xacro.load_yaml(joint_dynamics_parameters_file)}"/>
5253

5354
<!-- Extract subsections from yaml dictionaries -->
5455
<xacro:property name="sec_limits" value="${config_joint_limit_parameters['joint_limits']}"/>
@@ -57,6 +58,7 @@
5758
<xacro:property name="sec_inertia_parameters" value="${config_physical_parameters['inertia_parameters']}" />
5859
<xacro:property name="sec_mesh_files" value="${config_visual_parameters['mesh_files']}" scope="parent"/>
5960
<xacro:property name="sec_kinematics" value="${config_kinematics_parameters['kinematics']}" />
61+
<xacro:property name="sec_joint_dynamics" value="${config_joint_dynamics['joint_dynamics']}" />
6062

6163
<!-- JOINTS LIMIT PARAMETERS -->
6264
<xacro:property name="shoulder_pan_lower_limit" value="${sec_limits['shoulder_pan_joint']['min_position']}" scope="parent"/>
@@ -84,6 +86,20 @@
8486
<xacro:property name="wrist_3_velocity_limit" value="${sec_limits['wrist_3_joint']['max_velocity']}" scope="parent"/>
8587
<xacro:property name="wrist_3_effort_limit" value="${sec_limits['wrist_3_joint']['max_effort']}" scope="parent"/>
8688

89+
<!-- JOINT DYNAMICS PARAMETERS -->
90+
<xacro:property name="shoulder_pan_damping" value="${sec_joint_dynamics['shoulder_pan_joint']['damping']}" scope="parent"/>
91+
<xacro:property name="shoulder_pan_friction" value="${sec_joint_dynamics['shoulder_pan_joint']['friction']}" scope="parent"/>
92+
<xacro:property name="shoulder_lift_damping" value="${sec_joint_dynamics['shoulder_lift_joint']['damping']}" scope="parent"/>
93+
<xacro:property name="shoulder_lift_friction" value="${sec_joint_dynamics['shoulder_lift_joint']['friction']}" scope="parent"/>
94+
<xacro:property name="elbow_joint_damping" value="${sec_joint_dynamics['elbow_joint']['damping']}" scope="parent"/>
95+
<xacro:property name="elbow_joint_friction" value="${sec_joint_dynamics['elbow_joint']['friction']}" scope="parent"/>
96+
<xacro:property name="wrist_1_damping" value="${sec_joint_dynamics['wrist_1_joint']['damping']}" scope="parent"/>
97+
<xacro:property name="wrist_1_friction" value="${sec_joint_dynamics['wrist_1_joint']['friction']}" scope="parent"/>
98+
<xacro:property name="wrist_2_damping" value="${sec_joint_dynamics['wrist_2_joint']['damping']}" scope="parent"/>
99+
<xacro:property name="wrist_2_friction" value="${sec_joint_dynamics['wrist_2_joint']['friction']}" scope="parent"/>
100+
<xacro:property name="wrist_3_damping" value="${sec_joint_dynamics['wrist_3_joint']['damping']}" scope="parent"/>
101+
<xacro:property name="wrist_3_friction" value="${sec_joint_dynamics['wrist_3_joint']['friction']}" scope="parent"/>
102+
87103
<!-- DH PARAMETERS -->
88104
<xacro:property name="d1" value="${sec_dh_parameters['d1']}" scope="parent"/>
89105
<xacro:property name="a2" value="${sec_dh_parameters['a2']}" scope="parent"/>

urdf/ur.ros2_control.xacro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
<!--<xacro:ur_arm_transmission prefix="${prefix}" hw_interface="${transmission_hw_interface}" />-->
1515

1616
<ros2_control name="${name}" type="system">
17-
<!-- Hardware dependency injection from outside the macro-->
17+
<!-- Start hardware dependency injection from outside the macro-->
1818
<xacro:insert_block name="hardware_system" />
19-
<!-- -->
19+
<!-- End hardware dependency injection -->
2020
<joint name="${prefix}shoulder_pan_joint">
2121
<command_interface name="position">
2222
<param name="min">{-2*pi}</param>

0 commit comments

Comments
 (0)