Skip to content

Commit 7c61f1b

Browse files
committed
Update MulticopterMotorModel tests.
Signed-off-by: Benjamin Perseghetti <[email protected]>
1 parent ff5ca13 commit 7c61f1b

6 files changed

+483
-483
lines changed

examples/worlds/multicopter_velocity_control.sdf

+167-167
Large diffs are not rendered by default.

examples/worlds/quadcopter.sdf

+60-60
Original file line numberDiff line numberDiff line change
@@ -83,82 +83,82 @@
8383
<plugin
8484
filename="gz-sim-multicopter-motor-model-system"
8585
name="gz::sim::systems::MulticopterMotorModel">
86-
<robotNamespace>X3</robotNamespace>
87-
<jointName>X3/rotor_0_joint</jointName>
88-
<linkName>X3/rotor_0</linkName>
89-
<turningDirection>ccw</turningDirection>
90-
<timeConstantUp>0.0125</timeConstantUp>
91-
<timeConstantDown>0.025</timeConstantDown>
92-
<maxRotVelocity>800.0</maxRotVelocity>
93-
<motorConstant>8.54858e-06</motorConstant>
94-
<momentConstant>0.016</momentConstant>
95-
<commandSubTopic>gazebo/command/motor_speed</commandSubTopic>
86+
<robot_namespace>X3</robot_namespace>
87+
<joint_name>X3/rotor_0_joint</joint_name>
88+
<link_name>X3/rotor_0</link_name>
89+
<turning_direction>ccw</turning_direction>
90+
<time_constant_up>0.0125</time_constant_up>
91+
<time_constant_down>0.025</time_constant_down>
92+
<max_rot_velocity>800.0</max_rot_velocity>
93+
<motor_constant>8.54858e-06</motor_constant>
94+
<moment_constant>0.016</moment_constant>
95+
<sub_topic>gazebo/command/motor_speed</sub_topic>
9696
<actuator_number>0</actuator_number>
97-
<rotorDragCoefficient>8.06428e-05</rotorDragCoefficient>
98-
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
99-
<motorSpeedPubTopic>motor_speed/0</motorSpeedPubTopic>
100-
<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
101-
<motorType>velocity</motorType>
97+
<rotor_drag_coefficient>8.06428e-05</rotor_drag_coefficient>
98+
<rolling_moment_coefficient>1e-06</rolling_moment_coefficient>
99+
<motor_speed_pub_topic>motor_speed/0</motor_speed_pub_topic>
100+
<rotor_velocity_slowdown_sim>10</rotor_velocity_slowdown_sim>
101+
<motor_type>velocity</motor_type>
102102
</plugin>
103103
<plugin
104104
filename="gz-sim-multicopter-motor-model-system"
105105
name="gz::sim::systems::MulticopterMotorModel">
106-
<robotNamespace>X3</robotNamespace>
107-
<jointName>X3/rotor_1_joint</jointName>
108-
<linkName>X3/rotor_1</linkName>
109-
<turningDirection>ccw</turningDirection>
110-
<timeConstantUp>0.0125</timeConstantUp>
111-
<timeConstantDown>0.025</timeConstantDown>
112-
<maxRotVelocity>800.0</maxRotVelocity>
113-
<motorConstant>8.54858e-06</motorConstant>
114-
<momentConstant>0.016</momentConstant>
115-
<commandSubTopic>gazebo/command/motor_speed</commandSubTopic>
106+
<robot_namespace>X3</robot_namespace>
107+
<joint_name>X3/rotor_1_joint</joint_name>
108+
<link_name>X3/rotor_1</link_name>
109+
<turning_direction>ccw</turning_direction>
110+
<time_constant_up>0.0125</time_constant_up>
111+
<time_constant_down>0.025</time_constant_down>
112+
<max_rot_velocity>800.0</max_rot_velocity>
113+
<motor_constant>8.54858e-06</motor_constant>
114+
<moment_constant>0.016</moment_constant>
115+
<sub_topic>gazebo/command/motor_speed</sub_topic>
116116
<actuator_number>1</actuator_number>
117-
<rotorDragCoefficient>8.06428e-05</rotorDragCoefficient>
118-
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
119-
<motorSpeedPubTopic>motor_speed/1</motorSpeedPubTopic>
120-
<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
121-
<motorType>velocity</motorType>
117+
<rotor_drag_coefficient>8.06428e-05</rotor_drag_coefficient>
118+
<rolling_moment_coefficient>1e-06</rolling_moment_coefficient>
119+
<motor_speed_pub_topic>motor_speed/1</motor_speed_pub_topic>
120+
<rotor_velocity_slowdown_sim>10</rotor_velocity_slowdown_sim>
121+
<motor_type>velocity</motor_type>
122122
</plugin>
123123
<plugin
124124
filename="gz-sim-multicopter-motor-model-system"
125125
name="gz::sim::systems::MulticopterMotorModel">
126-
<robotNamespace>X3</robotNamespace>
127-
<jointName>X3/rotor_2_joint</jointName>
128-
<linkName>X3/rotor_2</linkName>
129-
<turningDirection>cw</turningDirection>
130-
<timeConstantUp>0.0125</timeConstantUp>
131-
<timeConstantDown>0.025</timeConstantDown>
132-
<maxRotVelocity>800.0</maxRotVelocity>
133-
<motorConstant>8.54858e-06</motorConstant>
134-
<momentConstant>0.016</momentConstant>
135-
<commandSubTopic>gazebo/command/motor_speed</commandSubTopic>
126+
<robot_namespace>X3</robot_namespace>
127+
<joint_name>X3/rotor_2_joint</joint_name>
128+
<link_name>X3/rotor_2</link_name>
129+
<turning_direction>cw</turning_direction>
130+
<time_constant_up>0.0125</time_constant_up>
131+
<time_constant_down>0.025</time_constant_down>
132+
<max_rot_velocity>800.0</max_rot_velocity>
133+
<motor_constant>8.54858e-06</motor_constant>
134+
<moment_constant>0.016</moment_constant>
135+
<sub_topic>gazebo/command/motor_speed</sub_topic>
136136
<actuator_number>2</actuator_number>
137-
<rotorDragCoefficient>8.06428e-05</rotorDragCoefficient>
138-
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
139-
<motorSpeedPubTopic>motor_speed/2</motorSpeedPubTopic>
140-
<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
141-
<motorType>velocity</motorType>
137+
<rotor_drag_coefficient>8.06428e-05</rotor_drag_coefficient>
138+
<rolling_moment_coefficient>1e-06</rolling_moment_coefficient>
139+
<motor_speed_pub_topic>motor_speed/2</motor_speed_pub_topic>
140+
<rotor_velocity_slowdown_sim>10</rotor_velocity_slowdown_sim>
141+
<motor_type>velocity</motor_type>
142142
</plugin>
143143
<plugin
144144
filename="gz-sim-multicopter-motor-model-system"
145145
name="gz::sim::systems::MulticopterMotorModel">
146-
<robotNamespace>X3</robotNamespace>
147-
<jointName>X3/rotor_3_joint</jointName>
148-
<linkName>X3/rotor_3</linkName>
149-
<turningDirection>cw</turningDirection>
150-
<timeConstantUp>0.0125</timeConstantUp>
151-
<timeConstantDown>0.025</timeConstantDown>
152-
<maxRotVelocity>800.0</maxRotVelocity>
153-
<motorConstant>8.54858e-06</motorConstant>
154-
<momentConstant>0.016</momentConstant>
155-
<commandSubTopic>gazebo/command/motor_speed</commandSubTopic>
146+
<robot_namespace>X3</robot_namespace>
147+
<joint_name>X3/rotor_3_joint</joint_name>
148+
<link_name>X3/rotor_3</link_name>
149+
<turning_direction>cw</turning_direction>
150+
<time_constant_up>0.0125</time_constant_up>
151+
<time_constant_down>0.025</time_constant_down>
152+
<max_rot_velocity>800.0</max_rot_velocity>
153+
<motor_constant>8.54858e-06</motor_constant>
154+
<moment_constant>0.016</moment_constant>
155+
<sub_topic>gazebo/command/motor_speed</sub_topic>
156156
<actuator_number>3</actuator_number>
157-
<rotorDragCoefficient>8.06428e-05</rotorDragCoefficient>
158-
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
159-
<motorSpeedPubTopic>motor_speed/3</motorSpeedPubTopic>
160-
<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
161-
<motorType>velocity</motorType>
157+
<rotor_drag_coefficient>8.06428e-05</rotor_drag_coefficient>
158+
<rolling_moment_coefficient>1e-06</rolling_moment_coefficient>
159+
<motor_speed_pub_topic>motor_speed/3</motor_speed_pub_topic>
160+
<rotor_velocity_slowdown_sim>10</rotor_velocity_slowdown_sim>
161+
<motor_type>velocity</motor_type>
162162
</plugin>
163163
</include>
164164
</world>

test/worlds/odometry_publisher_3d.sdf

+61-61
Original file line numberDiff line numberDiff line change
@@ -263,87 +263,87 @@
263263
<plugin
264264
filename="gz-sim-multicopter-motor-model-system"
265265
name="gz::sim::systems::MulticopterMotorModel">
266-
<robotNamespace>X3</robotNamespace>
267-
<jointName>rotor_0_joint</jointName>
268-
<linkName>rotor_0</linkName>
269-
<turningDirection>ccw</turningDirection>
270-
<timeConstantUp>0.0125</timeConstantUp>
271-
<timeConstantDown>0.025</timeConstantDown>
272-
<maxRotVelocity>8000.0</maxRotVelocity>
273-
<motorConstant>8.54858e-06</motorConstant>
274-
<momentConstant>0.016</momentConstant>
275-
<commandSubTopic>gazebo/command/motor_speed</commandSubTopic>
266+
<robot_namespace>X3</robot_namespace>
267+
<joint_name>rotor_0_joint</joint_name>
268+
<link_name>rotor_0</link_name>
269+
<turning_direction>ccw</turning_direction>
270+
<time_constant_up>0.0125</time_constant_up>
271+
<time_constant_down>0.025</time_constant_down>
272+
<max_rot_velocity>8000.0</max_rot_velocity>
273+
<motor_constant>8.54858e-06</motor_constant>
274+
<moment_constant>0.016</moment_constant>
275+
<sub_topic>gazebo/command/motor_speed</sub_topic>
276276
<actuator_number>0</actuator_number>
277-
<rotorDragCoefficient>8.06428e-05</rotorDragCoefficient>
278-
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
279-
<motorSpeedPubTopic>motor_speed/0</motorSpeedPubTopic>
280-
<rotorVelocitySlowdownSim>1</rotorVelocitySlowdownSim>
281-
<motorType>velocity</motorType>
277+
<rotor_drag_coefficient>8.06428e-05</rotor_drag_coefficient>
278+
<rolling_moment_coefficient>1e-06</rolling_moment_coefficient>
279+
<motor_speed_pub_topic>motor_speed/0</motor_speed_pub_topic>
280+
<rotor_velocity_slowdown_sim>1</rotor_velocity_slowdown_sim>
281+
<motor_type>velocity</motor_type>
282282
</plugin>
283283
<plugin
284284
filename="gz-sim-multicopter-motor-model-system"
285285
name="gz::sim::systems::MulticopterMotorModel">
286-
<robotNamespace>X3</robotNamespace>
287-
<jointName>rotor_1_joint</jointName>
288-
<linkName>rotor_1</linkName>
289-
<turningDirection>ccw</turningDirection>
290-
<timeConstantUp>0.0125</timeConstantUp>
291-
<timeConstantDown>0.025</timeConstantDown>
292-
<maxRotVelocity>8000.0</maxRotVelocity>
293-
<motorConstant>8.54858e-06</motorConstant>
294-
<momentConstant>0.016</momentConstant>
295-
<commandSubTopic>gazebo/command/motor_speed</commandSubTopic>
286+
<robot_namespace>X3</robot_namespace>
287+
<joint_name>rotor_1_joint</joint_name>
288+
<link_name>rotor_1</link_name>
289+
<turning_direction>ccw</turning_direction>
290+
<time_constant_up>0.0125</time_constant_up>
291+
<time_constant_down>0.025</time_constant_down>
292+
<max_rot_velocity>8000.0</max_rot_velocity>
293+
<motor_constant>8.54858e-06</motor_constant>
294+
<moment_constant>0.016</moment_constant>
295+
<sub_topic>gazebo/command/motor_speed</sub_topic>
296296
<actuator_number>1</actuator_number>
297-
<rotorDragCoefficient>8.06428e-05</rotorDragCoefficient>
298-
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
299-
<motorSpeedPubTopic>motor_speed/1</motorSpeedPubTopic>
300-
<rotorVelocitySlowdownSim>1</rotorVelocitySlowdownSim>
301-
<motorType>velocity</motorType>
297+
<rotor_drag_coefficient>8.06428e-05</rotor_drag_coefficient>
298+
<rolling_moment_coefficient>1e-06</rolling_moment_coefficient>
299+
<motor_speed_pub_topic>motor_speed/1</motor_speed_pub_topic>
300+
<rotor_velocity_slowdown_sim>1</rotor_velocity_slowdown_sim>
301+
<motor_type>velocity</motor_type>
302302
</plugin>
303303
<plugin
304304
filename="gz-sim-multicopter-motor-model-system"
305305
name="gz::sim::systems::MulticopterMotorModel">
306-
<robotNamespace>X3</robotNamespace>
307-
<jointName>rotor_2_joint</jointName>
308-
<linkName>rotor_2</linkName>
309-
<turningDirection>cw</turningDirection>
310-
<timeConstantUp>0.0125</timeConstantUp>
311-
<timeConstantDown>0.025</timeConstantDown>
312-
<maxRotVelocity>8000.0</maxRotVelocity>
313-
<motorConstant>8.54858e-06</motorConstant>
314-
<momentConstant>0.016</momentConstant>
315-
<commandSubTopic>gazebo/command/motor_speed</commandSubTopic>
306+
<robot_namespace>X3</robot_namespace>
307+
<joint_name>rotor_2_joint</joint_name>
308+
<link_name>rotor_2</link_name>
309+
<turning_direction>cw</turning_direction>
310+
<time_constant_up>0.0125</time_constant_up>
311+
<time_constant_down>0.025</time_constant_down>
312+
<max_rot_velocity>8000.0</max_rot_velocity>
313+
<motor_constant>8.54858e-06</motor_constant>
314+
<moment_constant>0.016</moment_constant>
315+
<sub_topic>gazebo/command/motor_speed</sub_topic>
316316
<actuator_number>2</actuator_number>
317-
<rotorDragCoefficient>8.06428e-05</rotorDragCoefficient>
318-
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
319-
<motorSpeedPubTopic>motor_speed/2</motorSpeedPubTopic>
320-
<rotorVelocitySlowdownSim>1</rotorVelocitySlowdownSim>
321-
<motorType>velocity</motorType>
317+
<rotor_drag_coefficient>8.06428e-05</rotor_drag_coefficient>
318+
<rolling_moment_coefficient>1e-06</rolling_moment_coefficient>
319+
<motor_speed_pub_topic>motor_speed/2</motor_speed_pub_topic>
320+
<rotor_velocity_slowdown_sim>1</rotor_velocity_slowdown_sim>
321+
<motor_type>velocity</motor_type>
322322
</plugin>
323323
<plugin
324324
filename="gz-sim-multicopter-motor-model-system"
325325
name="gz::sim::systems::MulticopterMotorModel">
326-
<robotNamespace>X3</robotNamespace>
327-
<jointName>rotor_3_joint</jointName>
328-
<linkName>rotor_3</linkName>
329-
<turningDirection>cw</turningDirection>
330-
<timeConstantUp>0.0125</timeConstantUp>
331-
<timeConstantDown>0.025</timeConstantDown>
332-
<maxRotVelocity>8000.0</maxRotVelocity>
333-
<motorConstant>8.54858e-06</motorConstant>
334-
<momentConstant>0.016</momentConstant>
335-
<commandSubTopic>gazebo/command/motor_speed</commandSubTopic>
326+
<robot_namespace>X3</robot_namespace>
327+
<joint_name>rotor_3_joint</joint_name>
328+
<link_name>rotor_3</link_name>
329+
<turning_direction>cw</turning_direction>
330+
<time_constant_up>0.0125</time_constant_up>
331+
<time_constant_down>0.025</time_constant_down>
332+
<max_rot_velocity>8000.0</max_rot_velocity>
333+
<motor_constant>8.54858e-06</motor_constant>
334+
<moment_constant>0.016</moment_constant>
335+
<sub_topic>gazebo/command/motor_speed</sub_topic>
336336
<actuator_number>3</actuator_number>
337-
<rotorDragCoefficient>8.06428e-05</rotorDragCoefficient>
338-
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
339-
<motorSpeedPubTopic>motor_speed/3</motorSpeedPubTopic>
340-
<rotorVelocitySlowdownSim>1</rotorVelocitySlowdownSim>
341-
<motorType>velocity</motorType>
337+
<rotor_drag_coefficient>8.06428e-05</rotor_drag_coefficient>
338+
<rolling_moment_coefficient>1e-06</rolling_moment_coefficient>
339+
<motor_speed_pub_topic>motor_speed/3</motor_speed_pub_topic>
340+
<rotor_velocity_slowdown_sim>1</rotor_velocity_slowdown_sim>
341+
<motor_type>velocity</motor_type>
342342
</plugin>
343343
<plugin
344344
filename="gz-sim-multicopter-control-system"
345345
name="gz::sim::systems::MulticopterVelocityControl">
346-
<robotNamespace>X3</robotNamespace>
346+
<robot_namespace>X3</robot_namespace>
347347
<commandSubTopic>gazebo/command/twist</commandSubTopic>
348348
<enableSubTopic>enable</enableSubTopic>
349349
<comLinkName>base_link</comLinkName>

0 commit comments

Comments
 (0)