17 #ifndef _GAZEBO_DARTSPHERESHAPE_HH_
18 #define _GAZEBO_DARTSPHERESHAPE_HH_
45 gzerr <<
"Sphere shape does not support negative radius.\n";
53 gzwarn <<
"Setting sphere shape's radius to zero is not supported "
54 <<
"in DART, using 1e-4.\n";
63 if (dartCollisionParent->GetDARTCollisionShape() ==
NULL)
65 dart::dynamics::BodyNode *dtBodyNode =
67 dart::dynamics::EllipsoidShape *dtEllisoidShape =
68 new dart::dynamics::EllipsoidShape(Eigen::Vector3d(_radius*2.0,
71 dtBodyNode->addCollisionShape(dtEllisoidShape);
72 dartCollisionParent->SetDARTCollisionShape(dtEllisoidShape);
76 dart::dynamics::EllipsoidShape *dtEllipsoidShape =
77 dynamic_cast<dart::dynamics::EllipsoidShape*
>(
78 dartCollisionParent->GetDARTCollisionShape());
79 dtEllipsoidShape->setDim(Eigen::Vector3d(_radius*2.0,