ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
Go to the documentation of this file.
8 #include <argos3/core/simulator/space/space.h>
15 CRange<Real>
UNIT(0.0f, 1.0f);
23 m_fLockThreshold(0.5f),
24 m_pcGrippedEntity(NULL) {
32 const std::string& str_id,
35 Real f_lock_threshold) :
39 m_cInitOffset(c_offset),
40 m_cDirection(c_direction),
41 m_cInitDirection(c_direction),
43 m_fLockThreshold(f_lock_threshold),
44 m_pcGrippedEntity(NULL) {
57 m_cInitOffset = m_cOffset;
59 m_cInitDirection = m_cDirection;
72 m_cOffset = m_cInitOffset;
73 m_cDirection = m_cInitDirection;
82 m_fLockState = f_lock_state;
90 m_fLockThreshold = f_lock_threshold;
97 if(m_pcGrippedEntity != NULL) {
98 return *m_pcGrippedEntity;
const std::string & GetId() const
Returns the id of this entity.
The namespace containing all the ARGoS related code.
Basic class for an entity that contains other entities.
The exception that wraps all errors in ARGoS.
CGripperEquippedEntity(CComposableEntity *pc_parent)
Class constructor.
REGISTER_STANDARD_SPACE_OPERATIONS_ON_ENTITY(CEntity)
This entity is a link to a body in the physics engine.
void SetLockThreshold(Real f_lock_threshold)
Sets the lock threshold of the gripper.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
An entity that stores the state of a robot gripper.
CEmbodiedEntity & GetGrippedEntity()
Returns the embodied entity currently gripped by this gripper.
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)
This macro throws an ARGoS exception with the passed message and nesting the passed exception.
#define THROW_ARGOSEXCEPTION(message)
This macro throws an ARGoS exception with the passed message.
void TruncValue(T &t_value) const
void SetLockState(Real f_lock_state)
Sets the lock state of the gripper.
void GetNodeAttributeOrDefault(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer, const T &t_default)
Returns the value of a node's attribute, or the passed default value.
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or one of the standalone constructors ...
void Disable()
Disables the entity.
void GetNodeAttribute(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer)
Returns the value of a node's attribute.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
float Real
Collects all ARGoS code.
void ClearGrippedEntity()
Clears the reference to the embodied entity currently gripped by this gripper.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
CRange< Real > UNIT(0.0f, 1.0f)