AGX Dynamics  2.37.2.0
agxModel::SingleCupSuctionGripper Class Reference

#include <SuctionGripper.h>

+ Inheritance diagram for agxModel::SingleCupSuctionGripper:

Public Member Functions

 SingleCupSuctionGripper (size_t sealResolution, agx::Real gripperRadius=agx::Real(0.025), agx::Real gripperHeight=agx::Real(0.01), agx::Real cupHeight=agx::Real(0.05), agx::Real lipHeight=agx::Real(0.01), agxCollide::Trimesh *deformableMesh=nullptr, agx::Material *cupMaterial=nullptr, agx::RigidBody *holderBody=nullptr, agx::RigidBody *cupBody=nullptr)
 Create a SuctionGripper with one holder body and one suction cup. More...
 
const char * getClassName () const override
 
agxCollide::Trimesh * getDeformableTrimesh () const
 
agx::LockJoint * getLockJoint () const
 
agxStream::StorageAgent * getStorageAgent () const override
 
agxUtil::TrimeshDeformer * getTrimeshDeformer () const
 
agxCollide::Geometry * getTrimeshGeometry () const
 
virtual void restore (agxStream::InputArchive &in) override
 
virtual void store (agxStream::OutputArchive &out) const override
 
- Public Member Functions inherited from agxModel::SuctionGripper
 SuctionGripper (agx::RigidBody *holderBody)
 The SuctionGripper must be initialized with a holder body. More...
 
void addSuctionCup (SuctionCup *cup)
 Add one suction cup to the gripper. More...
 
agx::Real getCurrentLeakage () const
 
agx::RigidBody * getHolderRigidBody ()
 
const agx::RigidBody * getHolderRigidBody () const
 
const SuctionCupRefVector & getSuctionCups () const
 
SuctionCupRefVector & getSuctionCups ()
 
const VacuumSystem * getVacuumSystem () const
 
VacuumSystem * getVacuumSystem ()
 
bool isValid () const
 
bool setHolderRigidBody (agx::RigidBody *holderBody)
 Set the rigid body of the holder. More...
 
void setVacuumSystem (VacuumSystem *vacuumSystem)
 Set a new vacuum system to the gripper. More...
 
- Public Member Functions inherited from agxSDK::Assembly
 Assembly ()
 Default constructor. More...
 
bool add (agx::Constraint *constraint)
 Add a constraint to the assembly. More...
 
bool add (agx::Interaction *interaction)
 Add an interaction to this assembly. More...
 
bool add (agxSDK::EventListener *listener)
 Add a listener to the assembly. More...
 
bool add (agx::RigidBody *body)
 Add a rigid body to the assembly. More...
 
bool add (agxCollide::Geometry *geometry)
 Add a geometry to the assembly. More...
 
bool add (Assembly *assembly)
 Add another assembly as child to this assembly. More...
 
bool add (agx::ContactMaterial *contactMaterial)
 Add a contact material to this assembly. More...
 
bool add (agx::Emitter *emitter)
 Add an emitter to this assembly. More...
 
bool add (agx::ObserverFrame *observerFrame)
 Add an ObserverFrame to this assembly. More...
 
bool add (agx::MergedBody *mergedBody)
 Add a MergedBody to this assembly. More...
 
bool add (agxStream::Serializable *object)
 Add an object of type serialized. More...
 
virtual void addNotification (Assembly *)
 Called when this assembly is added to another assembly. More...
 
bool empty () const
 
const AssemblyRefSetVector & getAssemblies () const
 
const agxSDK::Assembly * getAssembly (const agx::Name &name, bool recursive=true) const
 Find (linear search) and return named Assembly. More...
 
agxSDK::Assembly * getAssembly (const agx::Name &name, bool recursive=true)
 Find (linear search) and return named Assembly. More...
 
const agxSDK::Assembly * getAssembly (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return an Assembly matching the given uuid. More...
 
agxSDK::Assembly * getAssembly (const agx::Uuid &uuid, bool recursive=true)
 Find (linear search) and return an Assembly matching the given uuid. More...
 
const char * getClassName () const override
 
const agx::Constraint * getConstraint (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return a pointer to a Constraint with the given uuid. More...
 
agx::Constraint * getConstraint (const agx::Uuid &uuid, bool recursive=true)
 Find and return a pointer to a Constraint with the given uuid. More...
 
const agx::Constraint * getConstraint (const agx::Name &name, bool recursive=true) const
 Find (linear search) and return named Constraint. More...
 
agx::Constraint * getConstraint (const agx::Name &name, bool recursive=true)
 Find (linear search) and return named Constraint. More...
 
template<typename T >
T * getConstraint (const agx::Name &name, bool recursive=true)
 Find and return named Constraint of a template type, for example Hinge: More...
 
template<typename T >
const T * getConstraint (const agx::Name &name, bool recursive=true) const
 Find and return named Constraint of a template type, for example Hinge: More...
 
agx::Constraint1DOF * getConstraint1DOF (const agx::Name &name, bool recursive=true)
 
agx::Constraint2DOF * getConstraint2DOF (const agx::Name &name, bool recursive=true)
 
const agx::ConstraintRefSetVector & getConstraints () const
 
const agx::EmitterRefSetVector & getEmitters () const
 
const EventListenerRefSetVector & getEventListeners () const
 
virtual agx::Frame * getFrame ()
 Return a reference to the frame containing transformation and velocity information for this assembly. More...
 
virtual const agx::Frame * getFrame () const
 
const agxCollide::GeometryRefSetVector & getGeometries () const
 
const agxCollide::Geometry * getGeometry (const agx::Name &name, bool recursive=true) const
 Find (linear search) and return named collision Geometry. More...
 
agxCollide::Geometry * getGeometry (const agx::Name &name, bool recursive=true)
 Find (linear search) and return named collision Geometry. More...
 
const agxCollide::Geometry * getGeometry (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return a Geometry matching the given uuid. More...
 
agxCollide::Geometry * getGeometry (const agx::Uuid &uuid, bool recursive=true)
 Find (linear search) and return a Geometry matching the given uuid. More...
 
const agx::InteractionRefSetVector & getInteractions () const
 
agx::Vec3 getLocalPosition () const
 
agx::Quat getLocalRotation () const
 
const agx::AffineMatrix4x4 & getLocalTransform () const
 
const agx::MergedBodyRefSetVector & getMergedBodies () const
 
const agx::MergedBody * getMergedBody (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return an MergedBody matching the given uuid. More...
 
agx::MergedBody * getMergedBody (const agx::Uuid &uuid, bool recursive=true)
 Find (linear search) and return an MergedBody matching the given uuid. More...
 
agx::Name getName () const
 
const agx::ObserverFrame * getObserverFrame (const agx::Name &name, bool recursive=true) const
 Find (linear search) and return an ObserverFrame matching the given uuid. More...
 
agx::ObserverFrame * getObserverFrame (const agx::Name &name, bool recursive=true)
 Find (linear search) and return an ObserverFrame matching the given uuid. More...
 
const agx::ObserverFrame * getObserverFrame (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return an ObserverFrame matching the given uuid. More...
 
agx::ObserverFrame * getObserverFrame (const agx::Uuid &uuid, bool recursive=true)
 Find (linear search) and return an ObserverFrame matching the given uuid. More...
 
const agx::ObserverFrameRefSetVector & getObserverFrames () const
 
Assembly * getParent ()
 
const Assembly * getParent () const
 
agx::Frame * getParentFrame ()
 
const agx::Frame * getParentFrame () const
 
const agx::ParticleSystemRefSetVector & getParticleSystems () const
 
const agx::RigidBodyRefSetVector & getRigidBodies () const
 
agx::RigidBody * getRigidBody (const agx::Name &name, bool recursive=true)
 Find (linear search) and return named RigidBody. More...
 
const agx::RigidBody * getRigidBody (const agx::Name &name, bool recursive=true) const
 Find (linear search) and return named RigidBody. More...
 
agx::RigidBody * getRigidBody (const agx::Uuid &uuid, bool recursive=true)
 Find (linear search) and return a pointer to a RigidBody with the given uuid. More...
 
const agx::RigidBody * getRigidBody (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return a pointer to a RigidBody with the given uuid. More...
 
agxSDK::Simulation * getSimulation ()
 
const agxSDK::Simulation * getSimulation () const
 
agxStream::StorageAgent * getStorageAgent () const override
 
Type getType () const
 
bool remove (agx::Constraint *constraint)
 Remove a constraint from this assembly (does not recurse down in tree). More...
 
bool remove (agx::Interaction *interaction)
 Remove an interaction from this assembly. More...
 
bool remove (EventListener *listener)
 Remove an EventListener from the assembly. More...
 
bool remove (agx::RigidBody *body, bool removeAssociatedGeometries=false, bool resetParentFrame=true)
 Remove a rigid body from this assembly (does not recurse down in tree). More...
 
bool remove (agxCollide::Geometry *geometry, bool resetParentFrame=true)
 Remove a geometry from this assembly (does not recurse down in tree). More...
 
bool remove (Assembly *assembly, bool resetParentFrame=true)
 Remove a child assembly from a parent. More...
 
bool remove (agx::ContactMaterial *contactMaterial)
 Remove a contact material from this assembly. More...
 
bool remove (agx::Emitter *emitter)
 Remove an emitter from this assembly. More...
 
bool remove (agx::ObserverFrame *observerFrame, bool resetParentFrame=true)
 Remove an ObserverFrame from this assembly. More...
 
bool remove (agx::MergedBody *mergedBody)
 Remove a MergedBody from this assembly. More...
 
virtual void removeNotification (Assembly *)
 Called when this assembly is removed from another assembly. More...
 
bool reset (bool resetParentFrame=true)
 If this assembly is not added to a simulation it will clear all added bodies etc. More...
 
virtual void setAngularVelocity (const agx::Vec3 &velocity)
 Set the angular velocity (in world frame) recursively for all rigid bodies stored in assembly. More...
 
void setLocalPosition (const agx::Vec3 &p)
 Set the position of the assembly relative to its frame's parent frame. More...
 
void setLocalPosition (agx::Real x, agx::Real y, agx::Real z)
 Set the position of the assembly relative to its frame's parent frame. More...
 
void setLocalRotation (const agx::Quat &q)
 Set the rotation of the assembly relative to its frame's parent frame. More...
 
void setLocalRotation (const agx::EulerAngles &e)
 Set the rotation of the assembly relative to its frame's parent frame. More...
 
void setLocalTransform (const agx::AffineMatrix4x4 &matrix)
 Assign the local transformation matrix for this assembly, ignoring any eventual parent transformation. More...
 
void setName (const agx::Name &name)
 Set the name of this Assembly. More...
 
bool setParentFrame (agx::Frame *frame)
 Set the parent frame of this assembly's frame. More...
 
void setPosition (const agx::Vec3 &p)
 Set the position of the frame in world coordinates. More...
 
void setPosition (agx::Real x, agx::Real y, agx::Real z)
 Set the position of the frame in world coordinates. More...
 
void setRotation (const agx::Quat &q)
 Set the rotation of the assembly relative to world frame. More...
 
void setRotation (const agx::EulerAngles &e)
 Set the rotation of the assembly relative to world frame. More...
 
void setRotation (const agx::OrthoMatrix3x3 &m)
 Set the rotation of the assembly relative to world frame. More...
 
void setTransform (const agx::AffineMatrix4x4 &matrix)
 Set the transform of the assembly. More...
 
virtual void setVelocity (const agx::Vec3 &velocity)
 Set the linear velocity (in world frame) recursively for all rigid bodies stored in assembly. More...
 
bool transfer (agxSDK::Assembly *target)
 Transfer all the content from this assembly to the target, including name and transformation. More...
 
virtual void traverse (AssemblyVisitor *visitor)
 Traverse the assembly tree recursively using a visitor. More...
 
virtual void traverse (const AssemblyVisitor *visitor) const
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor. More...
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object. More...
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings. More...
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object. More...
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More...
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object. More...
 

Static Public Member Functions

static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agxModel::SuctionGripper
static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
static agx::LockJoint * positionAndLockSuctionCup (agxModel::SuctionGripper *gripper, agxModel::SuctionCup *cup, agx::Vec3 holderLocalTranslate, agx::Vec3 cupLocalTranslate)
 
- Static Public Member Functions inherited from agxSDK::Assembly
static Assembly * asAssembly (agxStream::Serializable *obj)
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static agxStream::Serializable * create ()
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More...
 

Protected Member Functions

 SingleCupSuctionGripper ()
 
virtual ~SingleCupSuctionGripper ()
 
agx::RigidBody * createDefaultHolderBody (agx::Real radius, agx::Real height) const
 
void setupDeformableTrimesh (SuctionCup *cup, agx::Frame *holderFrame)
 
- Protected Member Functions inherited from agxModel::SuctionGripper
 SuctionGripper ()
 
virtual ~SuctionGripper ()
 
virtual void addNotification (agxSDK::Simulation *simulation) override
 Called when this assembly is added to a simulation (given that it not already is in the simulation). More...
 
virtual void last (const agx::TimeStamp &)
 
virtual void post (const agx::TimeStamp &)
 
virtual void pre (const agx::TimeStamp &)
 
virtual void preCollide (const agx::TimeStamp &)
 
virtual void removeNotification (agxSDK::Simulation *simulation) override
 Called when this assembly is removed from a simulation. More...
 
virtual void updateValid ()
 
- Protected Member Functions inherited from agxSDK::Assembly
 Assembly (Type type)
 
virtual ~Assembly ()
 Destructor. More...
 
bool addParticleSystem (agx::ParticleSystem *particleSystem)
 Add a particle system to this assembly. More...
 
void addToSimulation (Simulation *simulation)
 
void removeFromSimulation (Simulation *simulation)
 
bool removeParticleSystem (agx::ParticleSystem *particleSystem)
 Remove a particle system from this assembly. More...
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor. More...
 
 Serializable (const Serializable &other)
 Copy constructor. More...
 
void generateUuid ()
 

Protected Attributes

agx::ref_ptr< agx::LockJoint > m_lock
 
agxCollide::TrimeshRef m_trimesh
 
agxUtil::TrimeshDeformerRef m_trimeshDeformer
 
agxCollide::GeometryRef m_trimeshGeometry
 
- Protected Attributes inherited from agxModel::SuctionGripper
agx::RigidBodyRef m_holderBody
 
agx::ref_ptr< agxUtil::GeneralStepListener< SuctionGripper > > m_stepCallback
 
agxModel::SuctionCupRefVector m_suctionCups
 
VacuumSystemRef m_vacuumSystem
 
bool m_valid
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Additional Inherited Members

- Public Types inherited from agxSDK::Assembly
enum  Type { ASSEMBLY, COLLECTION }
 Specifies the type an assembly is. More...
 
- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 

Detailed Description

Definition at line 764 of file SuctionGripper.h.

Constructor & Destructor Documentation

◆ SingleCupSuctionGripper() [1/2]

agxModel::SingleCupSuctionGripper::SingleCupSuctionGripper ( size_t  sealResolution,
agx::Real  gripperRadius = agx::Real(0.025),
agx::Real  gripperHeight = agx::Real(0.01),
agx::Real  cupHeight = agx::Real(0.05),
agx::Real  lipHeight = agx::Real(0.01),
agxCollide::Trimesh *  deformableMesh = nullptr,
agx::Material *  cupMaterial = nullptr,
agx::RigidBody *  holderBody = nullptr,
agx::RigidBody *  cupBody = nullptr 
)

Create a SuctionGripper with one holder body and one suction cup.

Both with cylindrical collision geometry. The default holder body can be ignored by the holderBody argument. The default suction cup geometry can be ignored by the cupBody argument If no deformableMesh is given, a default one is created. The deformable mesh does not collide, an its solo purpose is to populate any visual resource with updated vertex positions.

Parameters
sealResolution- number of seal sensors for the suction cup
gripperRadius- radius for both cylinder geometries (holder and cup)
gripperHeight- height for the cylinder geometry of the holder
cupHeight- height for the suction cup in relaxed state
lipHeight- height for the cylinder geometry for the suction cup
deformableMesh- will be transformed according to the cup / holder relative transform
cupMaterial- the material for the cup geometry, if cupBody is nullptr
holderBody- will override the creation of a default holder rigid body
cupBody- will override the default suction cup body

◆ SingleCupSuctionGripper() [2/2]

agxModel::SingleCupSuctionGripper::SingleCupSuctionGripper ( )
protected

◆ ~SingleCupSuctionGripper()

virtual agxModel::SingleCupSuctionGripper::~SingleCupSuctionGripper ( )
protectedvirtual

Member Function Documentation

◆ create() [1/2]

static agxStream::Serializable* agxModel::SingleCupSuctionGripper::create ( )
inlinestatic

Definition at line 816 of file SuctionGripper.h.

◆ create() [2/2]

static agxStream::Serializable* agxModel::SingleCupSuctionGripper::create ( agxStream::InputArchive &  )
inlinestatic

Definition at line 816 of file SuctionGripper.h.

◆ createDefaultHolderBody()

agx::RigidBody* agxModel::SingleCupSuctionGripper::createDefaultHolderBody ( agx::Real  radius,
agx::Real  height 
) const
protected

◆ getClassName()

const char* agxModel::SingleCupSuctionGripper::getClassName ( ) const
inlineoverridevirtual
Returns
the class name of this class.

Reimplemented from agxModel::SuctionGripper.

Definition at line 816 of file SuctionGripper.h.

◆ getConstructClassId()

static const char* agxModel::SingleCupSuctionGripper::getConstructClassId ( )
inlinestatic

Definition at line 816 of file SuctionGripper.h.

◆ getDeformableTrimesh()

agxCollide::Trimesh* agxModel::SingleCupSuctionGripper::getDeformableTrimesh ( ) const
Returns
the trimesh shape assigned by the deformableMesh attribute

◆ getLockJoint()

agx::LockJoint* agxModel::SingleCupSuctionGripper::getLockJoint ( ) const
Returns
the created lock joint between the holder and cup.

◆ getStorageAgent()

agxStream::StorageAgent* agxModel::SingleCupSuctionGripper::getStorageAgent ( ) const
inlineoverridevirtual
Returns
the storage agent

Reimplemented from agxModel::SuctionGripper.

Definition at line 816 of file SuctionGripper.h.

◆ getTrimeshDeformer()

agxUtil::TrimeshDeformer* agxModel::SingleCupSuctionGripper::getTrimeshDeformer ( ) const
Returns
the trimesh deformer

◆ getTrimeshGeometry()

agxCollide::Geometry* agxModel::SingleCupSuctionGripper::getTrimeshGeometry ( ) const
Returns
the geometry created if the deformable mesh is not nullptr

◆ restore()

virtual void agxModel::SingleCupSuctionGripper::restore ( agxStream::InputArchive &  in)
overridevirtual

Reimplemented from agxModel::SuctionGripper.

◆ setupDeformableTrimesh()

void agxModel::SingleCupSuctionGripper::setupDeformableTrimesh ( SuctionCup *  cup,
agx::Frame *  holderFrame 
)
protected

◆ store()

virtual void agxModel::SingleCupSuctionGripper::store ( agxStream::OutputArchive &  out) const
overridevirtual

Reimplemented from agxModel::SuctionGripper.

Member Data Documentation

◆ m_lock

agx::ref_ptr<agx::LockJoint> agxModel::SingleCupSuctionGripper::m_lock
protected

Definition at line 825 of file SuctionGripper.h.

◆ m_trimesh

agxCollide::TrimeshRef agxModel::SingleCupSuctionGripper::m_trimesh
protected

Definition at line 826 of file SuctionGripper.h.

◆ m_trimeshDeformer

agxUtil::TrimeshDeformerRef agxModel::SingleCupSuctionGripper::m_trimeshDeformer
protected

Definition at line 828 of file SuctionGripper.h.

◆ m_trimeshGeometry

agxCollide::GeometryRef agxModel::SingleCupSuctionGripper::m_trimeshGeometry
protected

Definition at line 827 of file SuctionGripper.h.


The documentation for this class was generated from the following file: