Warning: include(php/utility.php): Failed to open stream: No such file or directory in /home/argos/argos3/doc/api/embedded/a03210.php on line 2

Warning: include(): Failed opening 'php/utility.php' for inclusion (include_path='.:/usr/lib64/php') in /home/argos/argos3/doc/api/embedded/a03210.php on line 2
The ARGoS Website

argos::CGripperEquippedEntity Class Reference

An entity that stores the state of a robot gripper. More...

#include <gripper_equipped_entity.h>

Inheritance diagram for argos::CGripperEquippedEntity:
Collaboration diagram for argos::CGripperEquippedEntity:

Public Member Functions

 ENABLE_VTABLE ()
 
 CGripperEquippedEntity (CComposableEntity *pc_parent)
 Class constructor. More...
 
 CGripperEquippedEntity (CComposableEntity *pc_parent, const std::string &str_id, const CVector3 &c_offset, const CVector3 &c_direction, Real f_lock_threshold=0.5f)
 Class constructor. More...
 
virtual void Init (TConfigurationNode &t_tree)
 Initializes the state of the entity from the XML configuration tree. More...
 
virtual void Reset ()
 Resets the state of the entity to whatever it was after Init() or one of the standalone constructors was called. More...
 
const CVector3GetOffset () const
 Returns the offset of the gripper with respect to the reference point. More...
 
const CVector3GetInitOffset () const
 Returns the initial offset of the gripper with respect to the reference point. More...
 
void SetOffset (const CVector3 &c_offset)
 Sets the offset of the gripper with respect to the reference point. More...
 
void SetInitOffset (const CVector3 &c_offset)
 Sets the initial offset of the gripper with respect to the reference point. More...
 
const CVector3GetDirection () const
 Returns the facing direction of the gripper with respect to the local X-axis. More...
 
const CVector3GetInitDirection () const
 Returns the initial facing direction of the gripper with respect to the local X-axis. More...
 
void SetDirection (const CVector3 &c_direction)
 Sets the facing direction of the gripper with respect to the local X-axis. More...
 
void SetInitDirection (const CVector3 &c_direction)
 Sets the initial facing direction of the gripper with respect to the local X-axis. More...
 
Real GetLockState () const
 Returns the lock state of the gripper. More...
 
void SetLockState (Real f_lock_state)
 Sets the lock state of the gripper. More...
 
Real GetLockThreshold () const
 Returns the lock threshold of the gripper. More...
 
void SetLockThreshold (Real f_lock_threshold)
 Sets the lock threshold of the gripper. More...
 
bool IsLocked () const
 Returns true if the gripper is locked. More...
 
bool IsGripping () const
 Returns true if this gripper is gripping something. More...
 
CEmbodiedEntityGetGrippedEntity ()
 Returns the embodied entity currently gripped by this gripper. More...
 
void SetGrippedEntity (CEmbodiedEntity &c_entity)
 Sets the embodied entity currently gripped by this gripper. More...
 
void ClearGrippedEntity ()
 Clears the reference to the embodied entity currently gripped by this gripper. More...
 
virtual std::string GetTypeDescription () const
 Returns a string label for this class. More...
 
- Public Member Functions inherited from argos::CEntity
 ENABLE_VTABLE ()
 
 CEntity (CComposableEntity *pc_parent)
 Class constructor. More...
 
 CEntity (CComposableEntity *pc_parent, const std::string &str_id)
 Class constructor. More...
 
virtual ~CEntity ()
 Class destructor. More...
 
virtual void Destroy ()
 Destroys the entity, undoing whatever was done by Init() or by the standalone constructor. More...
 
const std::string & GetId () const
 Returns the id of this entity. More...
 
std::string GetContext () const
 Returns the context of this entity. More...
 
bool HasParent () const
 Returns true if this entity has a parent. More...
 
CEntityGetRootEntity ()
 Returns the root entity containing this entity. More...
 
const CEntityGetRootEntity () const
 Returns the root entity containing this entity. More...
 
CComposableEntityGetParent ()
 Returns this entity's parent. More...
 
const CComposableEntityGetParent () const
 Returns this entity's parent. More...
 
void SetParent (CComposableEntity &c_parent)
 Sets this entity's parent. More...
 
virtual void Update ()
 Updates the state of this entity. More...
 
ssize_t GetIndex () const
 Returns the entity index. More...
 
void SetIndex (ssize_t n_idx)
 Sets the entity index. More...
 
bool IsEnabled () const
 Returns true if the entity is enabled. More...
 
void Enable ()
 Enables the entity. More...
 
void Disable ()
 Disables the entity. More...
 
virtual void SetEnabled (bool b_enabled)
 Enables or disables an entity. More...
 
TConfigurationNodeGetConfigurationNode ()
 Returns a pointer to the configuration node that was used to create this entity. More...
 
- Public Member Functions inherited from argos::CBaseConfigurableResource
virtual ~CBaseConfigurableResource ()
 Class destructor. More...
 
- Public Member Functions inherited from argos::EnableVTableFor< CEntity >
size_t GetTagHelper (const DERIVED *) const
 

Additional Inherited Members

- Public Types inherited from argos::CEntity
typedef std::vector< CEntity * > TVector
 A vector of entities. More...
 
typedef unordered_map< std::string, CEntity * > TMap
 A map of entities. More...
 
typedef std::multimap< std::string, CEntity * > TMultiMap
 A multi-map of entities. More...
 

Detailed Description

An entity that stores the state of a robot gripper.

This class provides a component that stores the state of a robot gripper. The state is represented by a Real value between 0 and 1, where 0 means unlocked and 1 means locked. In-between values are also allowed. The transition between locked and unlocked state is when the lock state exceeds m_fLockThreshold, which is set to 0.5 by default.

The gripper can also be oriented, acting on its offset and direction attributes. The offset refers to the position of the gripper with respect to the reference point of the robot. The direction refers to where the gripper is facing.

Definition at line 37 of file gripper_equipped_entity.h.

Constructor & Destructor Documentation

◆ CGripperEquippedEntity() [1/2]

argos::CGripperEquippedEntity::CGripperEquippedEntity ( CComposableEntity pc_parent)

Class constructor.

This constructor is meant to be used with the Init() method.

Parameters
pc_parentThe parent of this entity.

Definition at line 20 of file gripper_equipped_entity.cpp.

◆ CGripperEquippedEntity() [2/2]

argos::CGripperEquippedEntity::CGripperEquippedEntity ( CComposableEntity pc_parent,
const std::string &  str_id,
const CVector3 c_offset,
const CVector3 c_direction,
Real  f_lock_threshold = 0.5f 
)

Class constructor.

This constructor is meant to be standalone. You should not call Init() after using this constructor, or memory leaks are likely to happen.

Parameters
pc_parentThe parent of this entity.
str_idThe id of this entity.
c_offsetThe positional offset of this gripper with respect to the robot reference point.
c_directionThe facing direction of this gripper.
f_lock_thresholdThe lock value above which the gripper is considered locked.

Definition at line 31 of file gripper_equipped_entity.cpp.

Member Function Documentation

◆ ClearGrippedEntity()

void argos::CGripperEquippedEntity::ClearGrippedEntity ( )
inline

Clears the reference to the embodied entity currently gripped by this gripper.

Definition at line 217 of file gripper_equipped_entity.h.

◆ ENABLE_VTABLE()

argos::CGripperEquippedEntity::ENABLE_VTABLE ( )

◆ GetDirection()

const CVector3& argos::CGripperEquippedEntity::GetDirection ( ) const
inline

Returns the facing direction of the gripper with respect to the local X-axis.

Returns
The facing direction of the gripper with respect to the local X-axis

Definition at line 118 of file gripper_equipped_entity.h.

◆ GetGrippedEntity()

CEmbodiedEntity & argos::CGripperEquippedEntity::GetGrippedEntity ( )

Returns the embodied entity currently gripped by this gripper.

Returns
The embodied entity currently gripped by this gripper.
Exceptions
CARGoSExceptionif no entity is being gripped.

Definition at line 96 of file gripper_equipped_entity.cpp.

◆ GetInitDirection()

const CVector3& argos::CGripperEquippedEntity::GetInitDirection ( ) const
inline

Returns the initial facing direction of the gripper with respect to the local X-axis.

Returns
The initial facing direction of the gripper with respect to the local X-axis
See also
Reset()

Definition at line 127 of file gripper_equipped_entity.h.

◆ GetInitOffset()

const CVector3& argos::CGripperEquippedEntity::GetInitOffset ( ) const
inline

Returns the initial offset of the gripper with respect to the reference point.

Returns
The initial offset of the gripper with respect to the reference point.
See also
Reset()

Definition at line 93 of file gripper_equipped_entity.h.

◆ GetLockState()

Real argos::CGripperEquippedEntity::GetLockState ( ) const
inline

Returns the lock state of the gripper.

The lock state is a Real in the range [0:1].

Returns
The lock state of the gripper.

Definition at line 153 of file gripper_equipped_entity.h.

◆ GetLockThreshold()

Real argos::CGripperEquippedEntity::GetLockThreshold ( ) const
inline

Returns the lock threshold of the gripper.

The lock threshold is a Real in the range [0:1].

Returns
The lock threshold of the gripper.

Definition at line 169 of file gripper_equipped_entity.h.

◆ GetOffset()

const CVector3& argos::CGripperEquippedEntity::GetOffset ( ) const
inline

Returns the offset of the gripper with respect to the reference point.

Returns
The offset of the gripper with respect to the reference point.

Definition at line 84 of file gripper_equipped_entity.h.

◆ GetTypeDescription()

virtual std::string argos::CGripperEquippedEntity::GetTypeDescription ( ) const
inlinevirtual

Returns a string label for this class.

Returns
A string label for this class.

Reimplemented from argos::CEntity.

Definition at line 221 of file gripper_equipped_entity.h.

◆ Init()

void argos::CGripperEquippedEntity::Init ( TConfigurationNode t_tree)
virtual

Initializes the state of the entity from the XML configuration tree.

Exceptions
CARGoSExceptionif a parse error occurs

Reimplemented from argos::CEntity.

Definition at line 51 of file gripper_equipped_entity.cpp.

◆ IsGripping()

bool argos::CGripperEquippedEntity::IsGripping ( ) const
inline

Returns true if this gripper is gripping something.

Returns
true if this gripper is gripping something.

Definition at line 195 of file gripper_equipped_entity.h.

◆ IsLocked()

bool argos::CGripperEquippedEntity::IsLocked ( ) const
inline

Returns true if the gripper is locked.

The gripper is considered locked if its state is greater than the lock threshold.

Returns
true if the gripper is locked.
See also
GetLockState()
GetLockThreshold()

Definition at line 187 of file gripper_equipped_entity.h.

◆ Reset()

void argos::CGripperEquippedEntity::Reset ( )
virtual

Resets the state of the entity to whatever it was after Init() or one of the standalone constructors was called.

Reimplemented from argos::CEntity.

Definition at line 70 of file gripper_equipped_entity.cpp.

◆ SetDirection()

void argos::CGripperEquippedEntity::SetDirection ( const CVector3 c_direction)
inline

Sets the facing direction of the gripper with respect to the local X-axis.

Parameters
c_directionThe facing direction of the gripper with respect to the local X-axis

Definition at line 135 of file gripper_equipped_entity.h.

◆ SetGrippedEntity()

void argos::CGripperEquippedEntity::SetGrippedEntity ( CEmbodiedEntity c_entity)
inline

Sets the embodied entity currently gripped by this gripper.

Parameters
c_entityThe embodied entity currently gripped by this gripper.

Definition at line 210 of file gripper_equipped_entity.h.

◆ SetInitDirection()

void argos::CGripperEquippedEntity::SetInitDirection ( const CVector3 c_direction)
inline

Sets the initial facing direction of the gripper with respect to the local X-axis.

Parameters
c_directionThe initial facing direction of the gripper with respect to the local X-axis
See also
Reset()

Definition at line 144 of file gripper_equipped_entity.h.

◆ SetInitOffset()

void argos::CGripperEquippedEntity::SetInitOffset ( const CVector3 c_offset)
inline

Sets the initial offset of the gripper with respect to the reference point.

Parameters
c_offsetThe initial offset of the gripper with respect to the reference point.
See also
Reset()

Definition at line 110 of file gripper_equipped_entity.h.

◆ SetLockState()

void argos::CGripperEquippedEntity::SetLockState ( Real  f_lock_state)

Sets the lock state of the gripper.

The lock state is a Real in the range [0:1]. The passed value is clamped internally.

Returns
The lock state of the gripper.

Definition at line 80 of file gripper_equipped_entity.cpp.

◆ SetLockThreshold()

void argos::CGripperEquippedEntity::SetLockThreshold ( Real  f_lock_threshold)

Sets the lock threshold of the gripper.

The lock threshold is a Real in the range [0:1]. The passed value is clamped internally.

Returns
The lock threshold of the gripper.

Definition at line 88 of file gripper_equipped_entity.cpp.

◆ SetOffset()

void argos::CGripperEquippedEntity::SetOffset ( const CVector3 c_offset)
inline

Sets the offset of the gripper with respect to the reference point.

Parameters
c_offsetThe offset of the gripper with respect to the reference point.

Definition at line 101 of file gripper_equipped_entity.h.