Skip to content

Commit

Permalink
Merge pull request #825 from dartsim/example_addSeleteSkles
Browse files Browse the repository at this point in the history
[addDeleteSkel] Set inertia according to size and mass
  • Loading branch information
jslee02 authored Dec 4, 2016
2 parents c6603fc + 4052d5b commit f7339ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/addDeleteSkels/MyWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ 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 f7339ae

Please sign in to comment.