Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicogene committed Mar 14, 2024
1 parent 42ca45d commit 695faf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/creo2urdf/src/Creo2Urdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,15 +405,15 @@ iDynTree::SpatialInertia Creo2Urdf::computeSpatialInertiafromCreo(pfcMassPropert

iDynTree::Position com_child({ com->get(0) * scale[0] , com->get(1) * scale[1], com->get(2) * scale[2] });

// Account for root_H_link transformation
// Account for csysPart_H_link transformation
// See https://github.com/icub-tech-iit/ergocub-software/issues/224#issuecomment-1985692598 for full contents

// The COM returned by Creo's GetGravityCenter seems to be expressed in the root frame, so we need
// to transform it back to the link frame before passing it to iDynTree's fromRotationalInertiaWrtCenterOfMass
com_child = H.inverse() * com_child;

// The inertia returned by Creo's GetCenterGravityInertiaTensor seems to be expressed with the COM as the
// point in which it is expressed, and with the orientation of the root link, so we rotate it back with
// point in which it is expressed, and with the orientation of the CSYS of the part, so we rotate it back with
// the orientation of the link frame, unless an assignedInertia is used
if (!assigned_inertia_flag) {
// Note, this auto-defined methods are Eigen::Map, so they are reference to data that remains
Expand Down

0 comments on commit 695faf1

Please sign in to comment.