Skip to content

Commit d5fc6af

Browse files
authored
Adding mass to inertia tensor (#6354)
Adding mass in inertia tensor, so its values are not hard-coded. That makes the example code snippet more physically accurate. Fixes #6346
1 parent 1a70bf8 commit d5fc6af

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

source/Tutorials/Intermediate/URDF/Using-Xacro-to-Clean-Up-a-URDF-File.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ First, let's take an example of a simple macro used in R2D2.
187187
<xacro:macro name="default_inertial" params="mass">
188188
<inertial>
189189
<mass value="${mass}" />
190-
<inertia ixx="1e-3" ixy="0.0" ixz="0.0"
191-
iyy="1e-3" iyz="0.0"
192-
izz="1e-3" />
190+
<inertia ixx="${(1e-3) * mass}" ixy="0.0" ixz="0.0"
191+
iyy="${(1e-3) * mass}" iyz="0.0"
192+
izz="${(1e-3) * mass}" />
193193
</inertial>
194194
</xacro:macro>
195195

0 commit comments

Comments
 (0)