hpp::manipulation::Handle Class Reference

Part of an object that is aimed at being grasped. More...

#include <hpp/manipulation/handle.hh>

Inheritance diagram for hpp::manipulation::Handle:

Public Member Functions

virtual HandlePtr_t clone () const
 Return a pointer to the copy of this. More...
 
const Transform3flocalPosition () const
 Get local position in joint frame. More...
 
virtual DifferentiableFunctionPtr_t createGrasp (const GripperPtr_t &gripper) const
 Create constraint corresponding to a gripper grasping this object. More...
 
virtual DifferentiableFunctionPtr_t createGraspComplement (const GripperPtr_t &gripper) const
 Create constraint that acts on the non-constrained axis of the constraint generated by Handle::createGrasp. More...
 
virtual DifferentiableFunctionPtr_t createPreGrasp (const GripperPtr_t &gripper) const
 Create constraint corresponding to a pregrasping task. More...
 
virtual DifferentiableFunctionPtr_t createPreGraspComplement (const GripperPtr_t &gripper, const value_type &shift) const
 Create constraint that acts on the non-constrained axis of the constraint generated by Handle::createPreGrasp. More...
 
Name
const std::string & name () const
 Get name. More...
 
void name (const std::string &n)
 Set name. More...
 
Joint
const JointPtr_tjoint () const
 Get joint to which the handle is linked. More...
 
void joint (const JointPtr_t &joint)
 Set joint to which the handle is linked. More...
 

Static Public Member Functions

static HandlePtr_t create (const std::string &name, const Transform3f &localPosition, const JointPtr_t &joint)
 Create constraint corresponding to a gripper grasping this object. More...
 
static DifferentiableFunctionPtr_t createGrasp (const GripperPtr_t &gripper, const HandlePtr_t &handle)
 

Protected Member Functions

 Handle (const std::string &name, const Transform3f &localPosition, const JointPtr_t &joint)
 Constructor. More...
 
void init (HandleWkPtr_t weakPtr)
 
virtual std::ostream & print (std::ostream &os) const
 

Friends

std::ostream & operator<< (std::ostream &, const Handle &)
 

Detailed Description

Part of an object that is aimed at being grasped.

Constructor & Destructor Documentation

◆ Handle()

hpp::manipulation::Handle::Handle ( const std::string &  name,
const Transform3f localPosition,
const JointPtr_t joint 
)
inlineprotected

Constructor.

Parameters
robotthe robot that grasps the handle,
graspobject containing the grasp information
Returns
the constraint of relative position between the handle and the gripper.

Referenced by create().

Member Function Documentation

◆ clone()

virtual HandlePtr_t hpp::manipulation::Handle::clone ( ) const
virtual

Return a pointer to the copy of this.

Reimplemented in hpp::manipulation::AxialHandle.

Referenced by create().

◆ create()

static HandlePtr_t hpp::manipulation::Handle::create ( const std::string &  name,
const Transform3f localPosition,
const JointPtr_t joint 
)
inlinestatic

Create constraint corresponding to a gripper grasping this object.

Parameters
robotthe robot that grasps the handle,
graspobject containing the grasp information
Returns
the constraint of relative position between the handle and the gripper.

References clone(), Handle(), and init().

◆ createGrasp() [1/2]

virtual DifferentiableFunctionPtr_t hpp::manipulation::Handle::createGrasp ( const GripperPtr_t gripper) const
virtual

Create constraint corresponding to a gripper grasping this object.

Parameters
gripperobject containing the gripper information
Returns
the constraint of relative transformation between the handle and the gripper.
Note
The 6 DOFs of the relative transformation are constrained.

Reimplemented in hpp::manipulation::AxialHandle.

Referenced by localPosition().

◆ createGrasp() [2/2]

static DifferentiableFunctionPtr_t hpp::manipulation::Handle::createGrasp ( const GripperPtr_t gripper,
const HandlePtr_t handle 
)
inlinestatic

◆ createGraspComplement()

virtual DifferentiableFunctionPtr_t hpp::manipulation::Handle::createGraspComplement ( const GripperPtr_t gripper) const
virtual

Create constraint that acts on the non-constrained axis of the constraint generated by Handle::createGrasp.

Parameters
gripperobject containing the gripper information
Returns
a constraints that is not doing anything.

Reimplemented in hpp::manipulation::AxialHandle.

Referenced by localPosition().

◆ createPreGrasp()

virtual DifferentiableFunctionPtr_t hpp::manipulation::Handle::createPreGrasp ( const GripperPtr_t gripper) const
virtual

Create constraint corresponding to a pregrasping task.

Parameters
gripperobject containing the gripper information
Returns
the constraint of relative transformation between the handle and the gripper.
Note
Only 5 DOFs of the relative transformation between the handle and the gripper are constrained. The translation along x-axis is not constrained.

Reimplemented in hpp::manipulation::AxialHandle.

Referenced by localPosition().

◆ createPreGraspComplement()

virtual DifferentiableFunctionPtr_t hpp::manipulation::Handle::createPreGraspComplement ( const GripperPtr_t gripper,
const value_type shift 
) const
virtual

Create constraint that acts on the non-constrained axis of the constraint generated by Handle::createPreGrasp.

Parameters
gripperobject containing the gripper information
shiftthe target value along the x-axis
Returns
the constraint of relative position between the handle and the gripper.
Note
Only the x-axis of the relative transformation between the handle and the gripper is constrained.

Reimplemented in hpp::manipulation::AxialHandle.

Referenced by localPosition().

◆ init()

void hpp::manipulation::Handle::init ( HandleWkPtr_t  weakPtr)
inlineprotected

References operator<<, and print().

Referenced by create(), and hpp::manipulation::AxialHandle::init().

◆ joint() [1/2]

const JointPtr_t& hpp::manipulation::Handle::joint ( ) const
inline

Get joint to which the handle is linked.

Referenced by joint().

◆ joint() [2/2]

void hpp::manipulation::Handle::joint ( const JointPtr_t joint)
inline

Set joint to which the handle is linked.

References joint().

◆ localPosition()

const Transform3f& hpp::manipulation::Handle::localPosition ( ) const
inline

Get local position in joint frame.

References createGrasp(), createGraspComplement(), createPreGrasp(), and createPreGraspComplement().

◆ name() [1/2]

const std::string& hpp::manipulation::Handle::name ( ) const
inline

Get name.

◆ name() [2/2]

void hpp::manipulation::Handle::name ( const std::string &  n)
inline

Set name.

◆ print()

virtual std::ostream& hpp::manipulation::Handle::print ( std::ostream &  os) const
protectedvirtual

Reimplemented in hpp::manipulation::AxialHandle.

Referenced by init().

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  ,
const Handle  
)
friend

Referenced by init().