Skip to content

📝Adding mass in inertia tensor's calculation #6346

@rainingmp3

Description

@rainingmp3

Issue Type

  • 🐛 Bug / Problem
  • ✏️ Typo / Grammar
  • 📖 Outdated Content
  • 🚀 Enhancement

Generated by Generative AI

No response

Distribution

No response

Description

In Using-Xacro-to-Clean-Up-a-URDF-File.rst there is an example of how to use a macro function. The macro takes a mass as an input, but doesn't include it in inertia tensor's calculations. It doesn't really matter, but it would be better if these values get multiplied by mass, as it makes more sense physically.

As it is now:

<xacro:macro name="default_inertial" params="mass">
    <inertial>
            <mass value="${mass}" />
            <inertia ixx="1e-3" ixy="0.0" ixz="0.0"
                 iyy="1e-3" iyz="0.0"
                 izz="1e-3" />
    </inertial>
</xacro:macro>

Affected Pages/Sections

Screenshots or Examples (if applicable)

Image

Suggested Fix

Should be:

<xacro:macro name="default_inertial" params="mass">
    <inertial>
            <mass value="${mass}" />
            <inertia ixx="${(1e-3)* mass}"   ixy="0.0" ixz="0.0"
                 iyy="${(1e-3) * mass}" iyz="0.0"
                 izz="${(1e-3) * mass}" />
    </inertial>
</xacro:macro>

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions