Skip to content

Commit aac2577

Browse files
committed
Added gazebo changes
1 parent a222ba2 commit aac2577

13 files changed

Lines changed: 118 additions & 64 deletions

meldog_description/controllers/meldog_chained_joint_controllers.yaml

Lines changed: 44 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
controller_manager:
22
ros__parameters:
3-
update_rate: 500
3+
update_rate: 200
44

55
joint_controller:
66
type: joint_controller/JointController
@@ -11,15 +11,15 @@ controller_manager:
1111
imu_sensor_broadcaster:
1212
type: imu_sensor_broadcaster/IMUSensorBroadcaster
1313

14-
forward_position_controller:
15-
type: forward_command_controller/ForwardCommandController
14+
joint_forward_trajectory_controller:
15+
type: joint_forward_trajectory_controller/JointForwardTrajectoryController
1616

1717
imu_sensor_broadcaster:
1818
ros__parameters:
1919
sensor_name: "imu_sensor"
2020
frame_id: "imu"
2121

22-
forward_position_controller:
22+
joint_forward_trajectory_controller:
2323
ros__parameters:
2424
joints:
2525
- joint_controller/LFT_joint
@@ -34,7 +34,15 @@ forward_position_controller:
3434
- joint_controller/RRT_joint
3535
- joint_controller/RRH_joint
3636
- joint_controller/RRK_joint
37-
interface_name: position
37+
38+
command_interfaces:
39+
- position
40+
- velocity
41+
- effort
42+
43+
interpolate_from_desired_state: true
44+
45+
allow_partial_joints_goal: true
3846

3947
joint_controller:
4048
ros__parameters:
@@ -52,6 +60,11 @@ joint_controller:
5260
- RRH_joint
5361
- RRK_joint
5462

63+
reference_interfaces:
64+
- "position"
65+
- "velocity"
66+
- "effort"
67+
5568
joint_params:
5669
LFT_joint:
5770
position_max: 3.14
@@ -137,66 +150,66 @@ joint_controller:
137150
velocity_max: 15.0
138151
effort_max: 34.895
139152

140-
frequency: 500.0
153+
frequency: 1000.0
141154

142155
pid_gains:
143156
LFT_joint:
144-
p: 209.06
145-
d: 1.5
157+
p: 235.0
158+
d: 5.0
146159
i: 0.0
147160
ilimit: 0.0
148161
LFH_joint:
149-
p: 209.06
150-
d: 1.5
162+
p: 235.0
163+
d: 5.0
151164
i: 0.0
152165
ilimit: 0.0
153166
LFK_joint:
154-
p: 209.06
155-
d: 1.5
156-
i: 15.0
167+
p: 235.0
168+
d: 5.0
169+
i: 0.0
157170
ilimit: 0.0
158171
RFT_joint:
159-
p: 209.06
160-
d: 1.5
172+
p: 235.0
173+
d: 5.0
161174
i: 0.0
162175
ilimit: 0.0
163176
RFH_joint:
164-
p: 209.06
165-
d: 1.5
177+
p: 235.0
178+
d: 5.0
166179
i: 0.0
167180
ilimit: 0.0
168181
RFK_joint:
169-
p: 209.06
170-
d: 1.5
182+
p: 235.0
183+
d: 5.0
171184
i: 0.0
172185
ilimit: 0.0
173186
LRT_joint:
174-
p: 209.06
175-
d: 1.5
187+
p: 235.0
188+
d: 5.0
176189
i: 0.0
177190
ilimit: 0.0
178191
LRH_joint:
179-
p: 209.06
180-
d: 1.5
192+
p: 235.0
193+
d: 5.0
181194
i: 0.0
182195
ilimit: 0.0
183196
LRK_joint:
184-
p: 209.06
185-
d: 1.5
197+
p: 235.0
198+
d: 5.0
186199
i: 0.0
187200
ilimit: 0.0
188201
RRT_joint:
189-
p: 209.06
190-
d: 1.5
202+
p: 235.0
203+
d: 5.0
191204
i: 0.0
192205
ilimit: 0.0
193206
RRH_joint:
194-
p: 209.06
195-
d: 1.5
207+
p: 235.0
208+
d: 5.0
196209
i: 0.0
197210
ilimit: 0.0
198211
RRK_joint:
199-
p: 209.06
200-
d: 1.5
212+
p: 235.0
213+
d: 5.0
201214
i: 0.0
202215
ilimit: 0.0

meldog_description/description/gazebo/gazebo_properties.urdf.xacro

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<xacro:property name="implicitSpringDamper_value" value="1" />
1212
<xacro:property name="springStiffness_value" value="0" />
1313
<xacro:property name="springReference_value" value="0" />
14-
<xacro:property name="implicitSpringDamper_value" value="0" />
14+
<!-- <xacro:property name="implicitSpringDamper_value" value="0" /> -->
1515
<xacro:property name="stopErp_value" value="0" />
1616
<xacro:property name="stopCfm_value" value="0" />
1717

@@ -24,12 +24,26 @@
2424
<xacro:property name="dampingFactor_value" value="0" />
2525

2626
<!-- Gazebo link parameters for feet -->
27-
<xacro:property name="mu1_value_foot" value="0" />
28-
<xacro:property name="mu2_value_foot" value="0" />
29-
<xacro:property name="kp_value_foot" value="0" />
30-
<xacro:property name="kd_value_foot" value="0" />
31-
<xacro:property name="maxVel_value_foot" value="0" />
32-
<xacro:property name="dampingFactor_value_foot" value="0" />
27+
<xacro:property name="mu1_value_foot" value="1.0" />
28+
<xacro:property name="mu2_value_foot" value="1.0" />
29+
30+
<xacro:property name="kp_value_foot" value="100000.0" />
31+
<xacro:property name="kd_value_foot" value="5000.0" />
32+
33+
<xacro:property name="maxVel_value_foot" value="0.01" />
34+
<xacro:property name="minDepth_value_foot" value="0.001" />
35+
36+
<xacro:property name="dampingFactor_value_foot" value="0.25" />
37+
<!-- <xacro:property name="mu1_value_foot" value="2.0" />
38+
<xacro:property name="mu2_value_foot" value="2.0" />
39+
<xacro:property name="kp_value_foot" value="1000000.0" />
40+
<xacro:property name="kd_value_foot" value="1000.0" />
41+
<xacro:property name="maxVel_value_foot" value="0.0" />
42+
<xacro:property name="dampingFactor_value_foot" value="0.1" /> -->
43+
<!-- <xacro:property name="kp_value_foot" value="10000.0"/>
44+
<xacro:property name="kd_value_foot" value="10000.0"/>
45+
<xacro:property name="maxVel_value_foot" value="0.0"/>
46+
<xacro:property name="dampingFactor_value_foot" value="10.1"/> -->
3347

3448

3549
<!-- GAZEBO IMU NOICE PARAMETERS -->

meldog_description/description/gazebo/meldog_gazebo.urdf.xacro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<kd value="${kd}" />
1616
<maxVel value="${maxVel}"/>
1717
<dampingFactor value="${dampingFactor}"/>
18+
<minDepth value="0.0002"/>
1819
</gazebo>
1920

2021
</xacro:macro>

meldog_description/description/joints/properties/H_joint_properties.urdf.xacro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<xacro:property name="H_velocity" value="${motor_max_vel*pi/30.0/actuator_reduction}" />
1616

1717
<!-- Hip joint friction and damping -->
18-
<xacro:property name="H_damping" value="0"/>
19-
<xacro:property name="H_friction" value="0.0312"/>
18+
<xacro:property name="H_damping" value="0.2"/>
19+
<xacro:property name="H_friction" value="0.1312"/>
2020

2121
</robot>

meldog_description/description/joints/properties/K_joint_properties.urdf.xacro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<xacro:property name="K_velocity" value="${motor_max_vel*pi/30.0/actuator_reduction}" />
1111

1212
<!-- Knee joint friction and damping -->
13-
<xacro:property name="K_damping" value="0"/>
14-
<xacro:property name="K_friction" value="0.0312"/>
13+
<xacro:property name="K_damping" value="0.2"/>
14+
<xacro:property name="K_friction" value="0.1312"/>
1515

1616
</robot>

meldog_description/description/joints/properties/T_joint_properties.urdf.xacro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<xacro:property name="T_velocity" value="${motor_max_vel*pi/30.0/actuator_reduction}" />
1111

1212
<!-- Trunk joint friction and damping -->
13-
<xacro:property name="T_damping" value="0"/>
14-
<xacro:property name="T_friction" value="0.0312"/>
13+
<xacro:property name="T_damping" value="0.2"/>
14+
<xacro:property name="T_friction" value="0.1312"/>
1515

1616
</robot>

meldog_description/description/meldog_core.urdf.xacro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727

2828
<!-- LINKS -->
2929

30-
<!-- Base link -->
31-
<link name="base_link" />
30+
<!-- Base link
31+
<link name="base_link" /> -->
3232

3333
<!-- Trunk link -->
3434
<xacro:include filename="links/trunk.urdf.xacro" />
@@ -94,11 +94,11 @@
9494

9595
<!-- JOINTS -->
9696

97-
<joint name="base_joint" type="fixed">
97+
<!-- <joint name="base_joint" type="fixed">
9898
<parent link="base_link" />
9999
<child link="trunk_link" />
100100
<origin xyz="0 0 0.55" rpy="0 0 0" />
101-
</joint>
101+
</joint> -->
102102

103103
<!-- IMU joint -->
104104
<xacro:include filename="joints/sensors/imu_joint.urdf.xacro"/>

meldog_description/description/meldog_real.urdf.xacro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
<!-- LINKS -->
2222

23-
<!-- Base link -->
24-
<link name="base_link" />
23+
<!-- Base link
24+
<link name="base_link" /> -->
2525

2626
<!-- Trunk link -->
2727
<xacro:include filename="links/trunk.urdf.xacro" />
@@ -87,11 +87,11 @@
8787

8888
<!-- JOINTS -->
8989

90-
<joint name="base_joint" type="fixed">
90+
<!-- <joint name="base_joint" type="fixed">
9191
<parent link="base_link" />
9292
<child link="trunk_link" />
9393
<origin xyz="0 0 0.55" rpy="0 0 0" />
94-
</joint>
94+
</joint> -->
9595

9696
<!-- IMU joint -->
9797
<xacro:include filename="joints/sensors/imu_joint.urdf.xacro"/>

meldog_description/description/ros2_control/hardware_properties.urdf.xacro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
33

4-
<xacro:property name="motor_max_eff" value="3.5" />
4+
<xacro:property name="motor_max_eff" value="2.0" />
55
<xacro:property name="motor_max_vel" value="1800" />
66
<xacro:property name="actuator_reduction" value="9.97" />
77

meldog_description/description/ros2_control/meldog_gazebo_ros2_control.urdf.xacro

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,15 @@
7575
</ros2_control>
7676

7777

78-
79-
78+
<gazebo>
79+
<plugin
80+
filename="libBaseTransformTwistPublisher.so"
81+
name="gazebo_plugins::BaseTransformTwistPublisher">
82+
<base_frame_name>trunk_link</base_frame_name>
83+
<reference_frame_name>world</reference_frame_name>
84+
<max_publish_frequency>200</max_publish_frequency>
85+
</plugin>
86+
</gazebo>
8087

8188
<gazebo>
8289
<plugin filename="gz_ros2_control-system"

0 commit comments

Comments
 (0)