AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agxModel::SuctionCupInteraction Class Reference

#include <SuctionGripper.h>

+ Inheritance diagram for agxModel::SuctionCupInteraction:

Public Member Functions

 SuctionCupInteraction ()
 A class for collecting and computing information for one RigidBody nearby a suction cup.
 
agx::Vec3 getCalculatedForce () const
 
agx::Real getCalculatedScalarForce () const
 
agx::Real getCenterDistance () const
 
bool getCentered () const
 
agx::Vec3 getCenterNormalWorld () const
 
agx::Vec3 getCurrentContactNormalForce () const
 
agx::Vec3 getCurrentFrictionForce () const
 
agx::Real getCurrentRelativeVelocity () const
 
agx::Vec3 getFoundSurfacePositionWorld () const
 
agx::RigidBody * getRigidBody ()
 
size_t getSealCount () const
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor.
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting.
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match.
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test.
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object.
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 

Protected Member Functions

virtual ~SuctionCupInteraction ()
 
void addTemporaryGeometryContact (agxCollide::GeometryContact *gc)
 
agx::Real getSealDepth (size_t sealIndex) const
 
bool hasSealInteraction (size_t sealIndex) const
 
void renderInteraction (const SuctionCup *cup)
 
void reset ()
 
void setCalculatedForce (agx::Vec3 force)
 
void setCalculatedScalarForce (agx::Real scalarForce)
 
void setCenterDistance (agx::Real distance)
 Set distance to object along a vector considered positioned at the center of the suction cup, normal to the suction cup plane.
 
void setCenterNormalWorld (agx::Vec3 normal)
 Set the surface normal of the object at the point at the center under the suction cup.
 
void setFoundSurfacePositionWorld (agx::Vec3 worldPosition)
 
void setRigidBody (agx::RigidBody *body)
 
void updateEstimatedForcePosition (const SuctionCup *cup, agx::Real depth)
 Updates the surface position of an interacting object where to apply the force.
 
void updateInteractedSeals (size_t sealIndex, agx::Real depth)
 
virtual bool updateVacuumForce (const SuctionCup *cup, const VacuumSystem *vacuumSystem, agx::Real fraction)
 Function responsible for updating the force from the vacuum.
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Protected Attributes

agx::RigidBodyObserver m_body
 
agx::Vec3 m_calculatedForce
 
agx::Vec3 m_calculatedForcePosition
 
agx::Real m_calculatedScalarForce
 
agx::Real m_centerDistance
 
bool m_centered
 
agx::Vec3 m_centerNormalWorld
 
agx::Vec3 m_foundSurfacePosition
 
agx::HashVector< size_t, agx::Real > m_interactedSealDepth
 
agxCollide::GeometryContactPtrVector m_tempContacts
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Additional Inherited Members

- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- 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.
 

Detailed Description

Definition at line 119 of file SuctionGripper.h.

Constructor & Destructor Documentation

◆ SuctionCupInteraction()

agxModel::SuctionCupInteraction::SuctionCupInteraction ( )

A class for collecting and computing information for one RigidBody nearby a suction cup.

◆ ~SuctionCupInteraction()

virtual agxModel::SuctionCupInteraction::~SuctionCupInteraction ( )
protectedvirtual

Member Function Documentation

◆ addTemporaryGeometryContact()

void agxModel::SuctionCupInteraction::addTemporaryGeometryContact ( agxCollide::GeometryContact *  gc)
protected

◆ getCalculatedForce()

agx::Vec3 agxModel::SuctionCupInteraction::getCalculatedForce ( ) const
Returns
the 3D force in world frame calculated for the rigid body during the call to updateVacuumForce() which is called from SuctionGripper::pre.

◆ getCalculatedScalarForce()

agx::Real agxModel::SuctionCupInteraction::getCalculatedScalarForce ( ) const
Returns
the scalar force calculated for the rigid body during the call to updateVacuumForce() which is called from SuctionGripper::pre.

◆ getCenterDistance()

agx::Real agxModel::SuctionCupInteraction::getCenterDistance ( ) const
Returns
distance to object along a vector considered positioned at the center of the suction cup, normal to the suction cup plane. Note that the distance is only valid if also getCentered() returns true.

◆ getCentered()

bool agxModel::SuctionCupInteraction::getCentered ( ) const
Returns
if the rigid body of the interaction is centered under the suction cup.

◆ getCenterNormalWorld()

agx::Vec3 agxModel::SuctionCupInteraction::getCenterNormalWorld ( ) const
Returns
the surface normal of the object at the point at the center under the suction cup. Note that the normal is only valid if also getCentered() returns true.

◆ getCurrentContactNormalForce()

agx::Vec3 agxModel::SuctionCupInteraction::getCurrentContactNormalForce ( ) const
Returns
the accumulated normal forces (from solver) between the suction cup and the body which is in interaction with.

◆ getCurrentFrictionForce()

agx::Vec3 agxModel::SuctionCupInteraction::getCurrentFrictionForce ( ) const
Returns
the accumulated friction forces (from solver) between the suction cup and the body which is in interaction with.

◆ getCurrentRelativeVelocity()

agx::Real agxModel::SuctionCupInteraction::getCurrentRelativeVelocity ( ) const
Returns
the maximal found velocity between the suction cup and the body which is in interaction with.

◆ getFoundSurfacePositionWorld()

agx::Vec3 agxModel::SuctionCupInteraction::getFoundSurfacePositionWorld ( ) const
Returns
the world position for applying the vacuum force on the rigid body during the call to updateVacuumForce() which is called from SuctionGripper::pre.

◆ getRigidBody()

agx::RigidBody * agxModel::SuctionCupInteraction::getRigidBody ( )
Returns
the rigid body which will be affected by the vacuum force.

◆ getSealCount()

size_t agxModel::SuctionCupInteraction::getSealCount ( ) const
Returns
the number of seal sensors any of the Geometries of the RigidBody is colliding with.

◆ getSealDepth()

agx::Real agxModel::SuctionCupInteraction::getSealDepth ( size_t  sealIndex) const
protected

◆ hasSealInteraction()

bool agxModel::SuctionCupInteraction::hasSealInteraction ( size_t  sealIndex) const
protected

◆ renderInteraction()

void agxModel::SuctionCupInteraction::renderInteraction ( const SuctionCup *  cup)
protected

◆ reset()

void agxModel::SuctionCupInteraction::reset ( )
protected

◆ setCalculatedForce()

void agxModel::SuctionCupInteraction::setCalculatedForce ( agx::Vec3  force)
protected

◆ setCalculatedScalarForce()

void agxModel::SuctionCupInteraction::setCalculatedScalarForce ( agx::Real  scalarForce)
protected

◆ setCenterDistance()

void agxModel::SuctionCupInteraction::setCenterDistance ( agx::Real  distance)
protected

Set distance to object along a vector considered positioned at the center of the suction cup, normal to the suction cup plane.

◆ setCenterNormalWorld()

void agxModel::SuctionCupInteraction::setCenterNormalWorld ( agx::Vec3  normal)
protected

Set the surface normal of the object at the point at the center under the suction cup.

◆ setFoundSurfacePositionWorld()

void agxModel::SuctionCupInteraction::setFoundSurfacePositionWorld ( agx::Vec3  worldPosition)
protected

◆ setRigidBody()

void agxModel::SuctionCupInteraction::setRigidBody ( agx::RigidBody *  body)
protected
Parameters
-body, the rigid body which will be affected by the calculated vacuum force.

◆ updateEstimatedForcePosition()

void agxModel::SuctionCupInteraction::updateEstimatedForcePosition ( const SuctionCup *  cup,
agx::Real  depth 
)
protected

Updates the surface position of an interacting object where to apply the force.

Will always be along the suction cup normal, but only updated with the depth is shorter than any previous registrated depth.

◆ updateInteractedSeals()

void agxModel::SuctionCupInteraction::updateInteractedSeals ( size_t  sealIndex,
agx::Real  depth 
)
protected

◆ updateVacuumForce()

virtual bool agxModel::SuctionCupInteraction::updateVacuumForce ( const SuctionCup *  cup,
const VacuumSystem *  vacuumSystem,
agx::Real  fraction 
)
protectedvirtual

Function responsible for updating the force from the vacuum.

By calling setCalculatedScalarForce and setCalculatedForce

Parameters
cup- the suction cup interacting with objects
vacuumSystem- the vacuum system for the suction gripper where this suction cup is attached
fraction- the fraction of the total force that this interaction is allowed to use, given seal sensor interactions

Member Data Documentation

◆ m_body

agx::RigidBodyObserver agxModel::SuctionCupInteraction::m_body
protected

Definition at line 261 of file SuctionGripper.h.

◆ m_calculatedForce

agx::Vec3 agxModel::SuctionCupInteraction::m_calculatedForce
protected

Definition at line 259 of file SuctionGripper.h.

◆ m_calculatedForcePosition

agx::Vec3 agxModel::SuctionCupInteraction::m_calculatedForcePosition
protected

Definition at line 260 of file SuctionGripper.h.

◆ m_calculatedScalarForce

agx::Real agxModel::SuctionCupInteraction::m_calculatedScalarForce
protected

Definition at line 258 of file SuctionGripper.h.

◆ m_centerDistance

agx::Real agxModel::SuctionCupInteraction::m_centerDistance
protected

Definition at line 255 of file SuctionGripper.h.

◆ m_centered

bool agxModel::SuctionCupInteraction::m_centered
protected

Definition at line 254 of file SuctionGripper.h.

◆ m_centerNormalWorld

agx::Vec3 agxModel::SuctionCupInteraction::m_centerNormalWorld
protected

Definition at line 256 of file SuctionGripper.h.

◆ m_foundSurfacePosition

agx::Vec3 agxModel::SuctionCupInteraction::m_foundSurfacePosition
protected

Definition at line 257 of file SuctionGripper.h.

◆ m_interactedSealDepth

agx::HashVector<size_t, agx::Real> agxModel::SuctionCupInteraction::m_interactedSealDepth
protected

Definition at line 262 of file SuctionGripper.h.

◆ m_tempContacts

agxCollide::GeometryContactPtrVector agxModel::SuctionCupInteraction::m_tempContacts
protected

Definition at line 263 of file SuctionGripper.h.


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