30 #include <selforg/configurable.h>
31 #include <selforg/stl_map.h>
83 conf.
name =
"Gripper";
97 virtual void addGrippables(
const std::vector<Primitive*>& ps);
103 dContact* contacts,
int numContacts,
104 dGeomID o1, dGeomID o2,
112 HashSet<dGeomID> grippables;
113 double gripStartTime;
Color color
Definition: gripper.h:46
bool attach(Primitive *p)
call this to attach the gripper to the given primitive
Definition: gripper.cpp:48
double size
diameter of the drawn sphere (if 0 nothing is drawn)
Definition: gripper.h:47
Physical substance definition, used for collision detection/treatment What we need is mu...
Definition: substance.h:103
virtual void removeGrippables(const std::vector< Primitive * > &ps)
Definition: gripper.cpp:71
bool forbitLastPrimitive
if true the last grasped object cannot be directly grasped again
Definition: gripper.h:54
std::vector< Gripper * > GripperList
Definition: gripper.h:116
bool fixedOrBallJoint
use fixed joint (true) or ball joint (false)
Definition: gripper.h:56
virtual void addGrippables(const std::vector< Primitive * > &ps)
Definition: gripper.cpp:63
double releaseDuration
releaseDuration time in seconds for how long the gripper cannot grasp after release ...
Definition: gripper.h:45
Configure object for Gripper.
Definition: gripper.h:39
Interface class for primitives represented in the physical and graphical world.
Definition: primitive.h:80
Data structure holding all essential global information.
Definition: globaldata.h:57
Abstact class for configurable objects.
Definition: configurable.h:81
std::string name
name of gripper for configuration
Definition: gripper.h:40
static GripperConf getDefaultConf()
Definition: gripper.h:81
Gripper(const GripperConf &conf=getDefaultConf())
Definition: gripper.cpp:37
A gripper can be attached to a primitive via its substance and implements gripping (a fixed joint) on...
Definition: gripper.h:69
static int onCollision(dSurfaceParameters ¶ms, GlobalData &globaldata, void *userdata, dContact *contacts, int numContacts, dGeomID o1, dGeomID o2, const Substance &s1, const Substance &s2)
Definition: gripper.cpp:81
double gripDuration
time in seconds for how long the gripper grasps
Definition: gripper.h:42
bool drawAtContactPoint
sphere is drawn at contact point (true) or at center of attached primitive (false) ...
Definition: gripper.h:51
virtual void removeAllGrippables()
Definition: gripper.cpp:77