17 #ifndef _GAZEBO_DARTBOXSHAPE_HH_
18 #define _GAZEBO_DARTBOXSHAPE_HH_
50 if (_size.
x < 0 || _size.
y < 0 || _size.
z < 0)
52 gzerr <<
"Box shape does not support negative size\n";
61 gzwarn <<
"Setting box shape's x to zero is not supported in DART, "
68 gzwarn <<
"Setting box shape's y to zero is not supported in DART, "
75 gzwarn <<
"Setting box shape's z to zero is not supported in DART "
83 boost::dynamic_pointer_cast<
DARTCollision>(this->collisionParent);
85 if (dartCollisionParent->GetDARTCollisionShape() ==
NULL)
87 dart::dynamics::BodyNode *dtBodyNode =
89 dart::dynamics::BoxShape *dtBoxShape =
91 dtBodyNode->addCollisionShape(dtBoxShape);
92 dartCollisionParent->SetDARTCollisionShape(dtBoxShape);
96 dart::dynamics::BoxShape *dtBoxShape =
97 dynamic_cast<dart::dynamics::BoxShape*
>(
98 dartCollisionParent->GetDARTCollisionShape());
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:43
virtual ~DARTBoxShape()
Destructor.
Definition: DARTBoxShape.hh:45
virtual void SetSize(const math::Vector3 &_size)
Set the size of the box.
Definition: DARTBoxShape.hh:48
virtual void SetSize(const math::Vector3 &_size)
Set the size of the box.
double x
X location.
Definition: Vector3.hh:302
#define gzwarn
Output a warning message.
Definition: Console.hh:44
double z
Z location.
Definition: Vector3.hh:308
#define gzerr
Output an error message.
Definition: Console.hh:47
default namespace for gazebo
bool equal(const T &_a, const T &_b, const T &_epsilon=1e-6)
check if two values are equal, within a tolerance
Definition: Helpers.hh:168
DART wrapper forward declarations and typedefs.
Base class for all DART collisions.
Definition: DARTCollision.hh:34
Box geometry primitive.
Definition: BoxShape.hh:37
DARTBoxShape(DARTCollisionPtr _parent)
Constructor.
Definition: DARTBoxShape.hh:41
dart::dynamics::BodyNode * GetDARTBodyNode() const
Get DART body node.
#define NULL
Definition: CommonTypes.hh:30
static Eigen::Vector3d ConvVec3(const math::Vector3 &_vec3)
Definition: DARTTypes.hh:57
boost::shared_ptr< DARTCollision > DARTCollisionPtr
Definition: DARTTypes.hh:45
DART Box shape.
Definition: DARTBoxShape.hh:37
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48
double y
Y location.
Definition: Vector3.hh:305