17 #ifndef _GAZEBO_DARTSPHERESHAPE_HH_
18 #define _GAZEBO_DARTSPHERESHAPE_HH_
46 gzerr <<
"Sphere shape does not support negative radius.\n";
54 gzwarn <<
"Setting sphere shape's radius to zero is not supported "
55 <<
"in DART, using 1e-4.\n";
62 boost::dynamic_pointer_cast<
DARTCollision>(this->collisionParent);
64 if (dartCollisionParent->GetDARTCollisionShape() ==
NULL)
66 dart::dynamics::BodyNode *dtBodyNode =
68 dart::dynamics::EllipsoidShape *dtEllisoidShape =
69 new dart::dynamics::EllipsoidShape(Eigen::Vector3d(_radius*2.0,
72 dtBodyNode->addCollisionShape(dtEllisoidShape);
73 dartCollisionParent->SetDARTCollisionShape(dtEllisoidShape);
77 dart::dynamics::EllipsoidShape *dtEllipsoidShape =
78 dynamic_cast<dart::dynamics::EllipsoidShape*
>(
79 dartCollisionParent->GetDARTCollisionShape());
80 dtEllipsoidShape->setDim(Eigen::Vector3d(_radius*2.0,