7 #ifndef DYNAMICS2D_GRIPPING_H
8 #define DYNAMICS2D_GRIPPING_H
11 class CDynamics2DEngine;
12 class CDynamics2DGripper;
13 class CDynamics2DGrippable;
14 class CGripperEquippedEntity;
17 #include <argos3/plugins/simulator/physics_engines/dynamics2d/chipmunk-physics/include/chipmunk.h>
18 #include <argos3/plugins/simulator/entities/gripper_equipped_entity.h>
30 typedef std::list<CDynamics2DGripper*>
TList;
36 cpShape* pt_gripper_shape);
41 return m_pcGrippee != NULL;
49 return m_cGripperEntity;
53 return m_ptGripperShape;
84 cpShape* m_ptGripperShape;
86 cpVect m_tGrippeeAnchor;
87 cpConstraint* m_tConstraint;
88 cpFloat m_fRestLength;
105 return m_cEmbodiedEntity;
113 return !m_listGrippers.empty();
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
int BeginCollisionBetweenGripperAndGrippable(cpArbiter *pt_arb, cpSpace *pt_space, void *p_data)
void AddConstraintBetweenGripperAndGrippable(cpSpace *pt_space, void *p_obj, void *p_data)
void RemoveConstraintBetweenGripperAndGrippable(cpSpace *pt_space, void *p_obj, void *p_data)
int ManageCollisionBetweenGripperAndGrippable(cpArbiter *pt_arb, cpSpace *pt_space, void *p_data)
This entity is a link to a body in the physics engine.
An entity that stores the state of a robot gripper.
bool IsLocked() const
Returns true if the gripper is locked.
cpConstraint * GetConstraint()
void CalculateAnchor(cpArbiter *pt_arb)
void Grip(CDynamics2DGrippable *pc_grippee)
std::list< CDynamics2DGripper * > TList
CDynamics2DGrippable * GetGrippee()
CGripperEquippedEntity & GetGripperEntity()
Real GetExtension() const
Returns the extension of the constraint.
CDynamics2DGripper(CDynamics2DEngine &c_engine, CGripperEquippedEntity &c_gripper_entity, cpShape *pt_gripper_shape)
void Release(CDynamics2DGripper &c_gripper)
void Remove(CDynamics2DGripper &c_gripper)
void Attach(CDynamics2DGripper &c_gripper)
CDynamics2DGrippable(CEmbodiedEntity &c_entity, cpShape *pt_shape)
CEmbodiedEntity & GetEmbodiedEntity()