Skip to content

Commit

Permalink
[addDeleteSkel] Set inertia according to size and mass
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Dec 4, 2016
1 parent bcd9f99 commit cf9bafb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/addDeleteSkels/MyWindow.cpp
Expand Up @@ -86,6 +86,7 @@ void MyWindow::spawnCube(const Eigen::Vector3d& _position,
dart::dynamics::BodyNode::Properties body;
body.mName = "cube_link";
body.mInertia.setMass(_mass);
body.mInertia.setMoment(dart::dynamics::BoxShape::computeInertia(_size, _mass));
dart::dynamics::ShapePtr newBoxShape(new dart::dynamics::BoxShape(_size));

dart::dynamics::FreeJoint::Properties joint;
Expand Down

0 comments on commit cf9bafb

Please sign in to comment.