-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gz sdf --print
should be able to print auto-computed inertial values
#1348
Comments
The |
see also the discussion in #1335 (comment) |
this feature will help me with other work, so I've attempted to implement it in #1422 |
implemented for simple shapes (not meshes) in #1422. A similar command could be implemented in |
Desired behavior
We should add a command-line option to
gz sdf --print
that will replace<inertial auto="true"/>
elements with the explicit, auto-computed inertial values. This will only work for simple shapes, but this could potentially be extended by agz sim
command.Alternatives considered
Implementation suggestion
Add a configuration to the PrintConfig class to configure whether to expand auto-inertial elements with explicitly computed inertial values and a corresponding command-line option to
gz sdf --print
.For example:
bool PrintConfig::ExpandAutoInertials() const
void PrintConfig::SetExpandAutoInertials(bool)
gz sdf --print <file> --expand-auto-inertials
For shapes that don't have a way to compute auto-inertials (such as mesh), they should either print the default inertial values or retain the
<inertial auto="true"/>
element.Additional context
The text was updated successfully, but these errors were encountered: