hpp::model::CollisionObject Class Reference

Specialization of fcl::CollisionObject to add a name to objects. More...

#include <hpp/model/collision-object.hh>

Public Member Functions

CollisionObjectPtr_t clone (const JointPtr_t &joint) const
 Clone object and attach to given joint. More...
 
const std::string & name () const
 
fcl::CollisionObjectPtr_t fcl () const
 Access to fcl object. More...
 
const JointPtr_tjoint ()
 Get joint. More...
 
void joint (const JointPtr_t joint)
 Set joint. More...
 
const fcl::Transform3fpositionInJointFrame () const
 Return the position in the joint frame. More...
 
const fcl::Transform3fgetTransform () const
 Return transform of the fcl object. More...
 
void move (const Transform3f &position)
 Move object to given position. More...
 

Static Public Member Functions

static CollisionObjectPtr_t create (fcl::CollisionObjectPtr_t object, const std::string &name)
 Create collision object and return shared pointer. More...
 
static CollisionObjectPtr_t create (fcl::CollisionGeometryPtr_t geometry, const Transform3f &position, const std::string &name)
 Create collision object and return shared pointer. More...
 

Protected Member Functions

void init (const CollisionObjectWkPtr_t &self)
 
Construction, destruction and copy
 CollisionObject (fcl::CollisionObjectPtr_t object, const std::string &name)
 Wrap fcl collision object at identity position. More...
 
 CollisionObject (fcl::CollisionGeometryPtr_t geometry, const Transform3f &position, const std::string &name)
 Wrap fcl collision object and put at given position. More...
 
 CollisionObject (const CollisionObject &object)
 Copy constructor. More...
 

Detailed Description

Specialization of fcl::CollisionObject to add a name to objects.

Objects moved by a robot joint. They can collide each other and distance computation can be computed between them.

Constructor & Destructor Documentation

◆ CollisionObject() [1/3]

hpp::model::CollisionObject::CollisionObject ( fcl::CollisionObjectPtr_t  object,
const std::string &  name 
)
inlineexplicitprotected

Wrap fcl collision object at identity position.

◆ CollisionObject() [2/3]

hpp::model::CollisionObject::CollisionObject ( fcl::CollisionGeometryPtr_t  geometry,
const Transform3f position,
const std::string &  name 
)
inlineexplicitprotected

Wrap fcl collision object and put at given position.

◆ CollisionObject() [3/3]

hpp::model::CollisionObject::CollisionObject ( const CollisionObject object)
inlineexplicitprotected

Copy constructor.

Member Function Documentation

◆ clone()

CollisionObjectPtr_t hpp::model::CollisionObject::clone ( const JointPtr_t joint) const

Clone object and attach to given joint.

◆ create() [1/2]

static CollisionObjectPtr_t hpp::model::CollisionObject::create ( fcl::CollisionObjectPtr_t  object,
const std::string &  name 
)
static

Create collision object and return shared pointer.

◆ create() [2/2]

static CollisionObjectPtr_t hpp::model::CollisionObject::create ( fcl::CollisionGeometryPtr_t  geometry,
const Transform3f position,
const std::string &  name 
)
static

Create collision object and return shared pointer.

◆ fcl()

fcl::CollisionObjectPtr_t hpp::model::CollisionObject::fcl ( ) const
inline

Access to fcl object.

◆ getTransform()

const fcl::Transform3f& hpp::model::CollisionObject::getTransform ( ) const
inline

Return transform of the fcl object.

Warning
If joint linked object -as a robot body- and the robot is manually moved, this will return the non-update transform.
Note
If object is not attached to a joint, use move() to update transform between hpp and fcl.

◆ init()

void hpp::model::CollisionObject::init ( const CollisionObjectWkPtr_t &  self)
inlineprotected

◆ joint() [1/2]

const JointPtr_t& hpp::model::CollisionObject::joint ( )
inline

Get joint.

◆ joint() [2/2]

void hpp::model::CollisionObject::joint ( const JointPtr_t  joint)

Set joint.

◆ move()

void hpp::model::CollisionObject::move ( const Transform3f position)

Move object to given position.

Note
If object is attached to a joint, throw exception.

◆ name()

const std::string& hpp::model::CollisionObject::name ( ) const
inline

◆ positionInJointFrame()

const fcl::Transform3f& hpp::model::CollisionObject::positionInJointFrame ( ) const
inline

Return the position in the joint frame.