Closed
Description
When adding two spatial inertia using the + override I get a AttributeError: 'SpatialInertia' object has no attribute 'I'.
I think I'm noticing 3 potential mistakes in the source code at line 637
return SpatialInertia(left.I + left.I)
- It seems
SpatialInertia
has no memberI
but rather adata[0]
- We're adding
left
twice and notright
. - I am not sure the syntax matches the definition in the constructor...
To make minimum changes, I would suggest rewritting this line as such:
total_inertia=SpatialInertia()
total_inertia.data[0] = left.data[0] + right.data[0]
return total_inertia
But I'm not familiar with the whole code corpus, and I just infer that from quickly reading the class. Does that seem correct? If so could we fix it? If it helps I am happy making a PR and expending tests so this doesn't happen anymore.
Otherwise, thanks for a cool library!
Metadata
Metadata
Assignees
Labels
No labels