7 #ifndef GRIPPER_EQUIPPED_ENTITY_H
8 #define GRIPPER_EQUIPPED_ENTITY_H
11 class CGripperEquippedEntity;
12 class CEmbodiedEntity;
15 #include <argos3/core/simulator/entity/entity.h>
16 #include <argos3/core/utility/math/vector3.h>
17 #include <argos3/core/utility/math/quaternion.h>
64 const std::string& str_id,
67 Real f_lock_threshold = 0.5f);
102 m_cOffset = c_offset;
111 m_cInitOffset = c_offset;
128 return m_cInitDirection;
136 m_cDirection = c_direction;
145 m_cInitDirection = c_direction;
170 return m_fLockThreshold;
188 return m_fLockState > m_fLockThreshold;
196 return (m_pcGrippedEntity != NULL);
211 m_pcGrippedEntity = &c_entity;
218 m_pcGrippedEntity = NULL;
243 Real m_fLockThreshold;
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
Basic class for an entity that contains other entities.
This entity is a link to a body in the physics engine.
An entity that stores the state of a robot gripper.
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or one of the standalone constructors ...
void SetGrippedEntity(CEmbodiedEntity &c_entity)
Sets the embodied entity currently gripped by this gripper.
CEmbodiedEntity & GetGrippedEntity()
Returns the embodied entity currently gripped by this gripper.
void SetOffset(const CVector3 &c_offset)
Sets the offset of the gripper with respect to the reference point.
void SetInitOffset(const CVector3 &c_offset)
Sets the initial offset of the gripper with respect to the reference point.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
bool IsGripping() const
Returns true if this gripper is gripping something.
void SetLockState(Real f_lock_state)
Sets the lock state of the gripper.
const CVector3 & GetDirection() const
Returns the facing direction of the gripper with respect to the local X-axis.
Real GetLockState() const
Returns the lock state of the gripper.
void SetDirection(const CVector3 &c_direction)
Sets the facing direction of the gripper with respect to the local X-axis.
Real GetLockThreshold() const
Returns the lock threshold of the gripper.
void SetLockThreshold(Real f_lock_threshold)
Sets the lock threshold of the gripper.
void ClearGrippedEntity()
Clears the reference to the embodied entity currently gripped by this gripper.
const CVector3 & GetInitDirection() const
Returns the initial facing direction of the gripper with respect to the local X-axis.
void SetInitDirection(const CVector3 &c_direction)
Sets the initial facing direction of the gripper with respect to the local X-axis.
const CVector3 & GetInitOffset() const
Returns the initial offset of the gripper with respect to the reference point.
CGripperEquippedEntity(CComposableEntity *pc_parent)
Class constructor.
virtual std::string GetTypeDescription() const
Returns a string label for this class.
bool IsLocked() const
Returns true if the gripper is locked.
const CVector3 & GetOffset() const
Returns the offset of the gripper with respect to the reference point.