Closed ebianchi closed 1 year ago
Adding in another inertia-related comment here, without the accompanying code changes to implement. I find the drake
versus drake_spatial_inertia
inertial parameter definitions to be confusing, since their names seem to indicate the opposite of their current definitions. I would expect drake_spatial_inertia
to be a Drake pydrake.multibody.tree.SpatialInertia
object, and for drake
parameters to not. Currently this is the opposite way around.
This would be a straightforward set of changes to make that I could easily add into this PR. However given this is a stylistic choice rather than a bug, I'll leave this decision to @mshalm as the original architect of this code to approve or not.
This pull request fixes a couple of inertia-related bugs in the original code:
urdf_utils.py
correctly defines_IYY = "iyy"
instead of the original erroneous definition_IYY = "ixy"
.theta
representation expects inertial parameters about the body frame origin instead of the center of mass, as the code originally expected. To make these consistent, this pull request includes a change ininertia.py
to defineI_BBcm_B
properly (requiring aShift()
andCalcRotationalInertia()
) as well as a change inmultibody_terms.py
(usingMakeFromCentralInertia()
).