74 for (
size_t j = 0; j < 2; ++j)
85 using ExecuteFilter::match;
435 size_t sealResolution =
size_t(0),
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGX_DECLARE_VECTOR_TYPES(type)
The geometry representation used by the collision detection engine.
Triangle mesh for geometric intersection tests.
agxUtil::TrimeshDeformerRef m_trimeshDeformer
agxUtil::TrimeshDeformer * getTrimeshDeformer() const
agxCollide::TrimeshRef m_trimesh
agxCollide::GeometryRef m_trimeshGeometry
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.
agxCollide::Trimesh * getDeformableTrimesh() const
virtual ~SingleCupSuctionGripper()
void setupDeformableTrimesh(SuctionCup *cup, agx::Frame *holderFrame)
agx::LockJoint * getLockJoint() const
agxCollide::Geometry * getTrimeshGeometry() const
agx::RigidBody * createDefaultHolderBody(agx::Real radius, agx::Real height) const
agx::ref_ptr< agx::LockJoint > m_lock
SingleCupSuctionGripper()
agx::Vec3 m_calculatedForce
virtual bool updateVacuumForce(const SuctionCup *cup, const VacuumSystem *vacuumSystem, agx::Real fraction)
Function responsible for updating the force from the vacuum.
agx::Vec3 m_centerNormalWorld
void renderInteraction(const SuctionCup *cup)
virtual ~SuctionCupInteraction()
agx::Real m_centerDistance
agx::Real getCurrentRelativeVelocity() const
size_t getSealCount() const
agx::Real m_calculatedScalarForce
bool hasSealInteraction(size_t sealIndex) const
SuctionCupInteraction()
A class for collecting and computing information for one RigidBody nearby a suction cup.
agx::Real getCalculatedScalarForce() const
agx::HashVector< size_t, agx::Real > m_interactedSealDepth
void setCalculatedForce(agx::Vec3 force)
agx::Vec3 getCurrentFrictionForce() const
void updateInteractedSeals(size_t sealIndex, agx::Real depth)
agx::Vec3 m_foundSurfacePosition
void setRigidBody(agx::RigidBody *body)
agx::Real getSealDepth(size_t sealIndex) const
void setFoundSurfacePositionWorld(agx::Vec3 worldPosition)
agx::Real getCenterDistance() const
agx::Vec3 getFoundSurfacePositionWorld() const
agx::RigidBody * getRigidBody()
agx::Vec3 getCalculatedForce() const
void updateEstimatedForcePosition(const SuctionCup *cup, agx::Real depth)
Updates the surface position of an interacting object where to apply the force.
agx::Vec3 getCurrentContactNormalForce() const
agx::RigidBodyObserver m_body
agx::Vec3 getCenterNormalWorld() const
void setCenterDistance(agx::Real distance)
Set distance to object along a vector considered positioned at the center of the suction cup,...
void setCenterNormalWorld(agx::Vec3 normal)
Set the surface normal of the object at the point at the center under the suction cup.
void setCalculatedScalarForce(agx::Real scalarForce)
void addTemporaryGeometryContact(agxCollide::GeometryContact *gc)
agxCollide::GeometryContactPtrVector m_tempContacts
agx::Vec3 m_calculatedForcePosition
Class for filtering objects of interest nearby a suction cup.
agxCollide::GeometryRefVector m_sensors
const agxCollide::GeometryRefVector & getGeometries() const
virtual ~SuctionCupSensorFilter()
void addGeometry(agxCollide::Geometry *geometry)
virtual bool match(const agxCollide::Geometry *g0, const agxCollide::Geometry *g1) const override
Inherited from agxSDK::ExecuteFilter.
agxCollide::GeometryRefVector m_collisionGeometries
SuctionCupSensorFilter * getSensorFilter()
const SuctionCupInteractionRefVector & getDisabledInteractions() const
agxCollide::Geometry * createSealSensor(agx::RigidBody *body, agx::Vec3 bodyLocalPosition)
agx::Real getArea() const
agx::Vec3 findSurfaceNormal(agxCollide::Shape *collidedShape, agx::Vec3 pointAtSurface, bool &success)
const agxCollide::GeometryRefSetVector & getSealSensors() const
const agx::RigidBody * getRigidBody() const
void createCupSealSensors()
agx::Vec3 m_localLineSensorVector
SuctionCupSensorFilterRef m_collisionFilter
agx::RigidBody * createDefaultCupBody()
SuctionCupInteraction * getActiveInteraction(agx::RigidBody *rigidBody)
agx::Real getLipRadius() const
agx::ref_ptr< agxUtil::GeneralContactEventListener< SuctionCup > > m_contactCallback
void invalidateInteractions()
agx::Vec3 calculateLineP2() const
agx::Vector< agxModel::SuctionCupInteraction * > getActiveInteractionsVector() const
agx::Real m_sealSensorReach
agx::Real m_calculatedAvailableVacuumForce
agx::Real getSensorDistance() const
void setMountingRadius(agx::Real radius)
Set the mounting radius.
agx::Real m_mountingRadius
agx::HashVector< agx::RigidBody *, SuctionCupInteractionRef > m_activeInteractions
agx::Real getCurrentLeakageArea() const
agx::Real getMountingRadius() const
agx::AffineMatrix4x4 m_miniSphereTransform
void addNotification(agxSDK::Simulation *simulation)
Makes sure all suction cup bodies and constraints are given to the simulation.
SuctionCupInteractionRefVector m_interactionsPool
void applyVacuumForces(const VacuumSystem *vacuumSystem)
Responsible for applying forces to rigid bodies of the cup interactions.
SuctionCup(agx::RigidBody *cupBody, agx::Real lipRadius=agx::Real(0.025), agx::Real lipHeight=agx::Real(0.01), size_t sealResolution=size_t(0), agx::Vec3 localLineSensorVector=agx::Vec3(0, 0,-0.1), agx::Real sealSensorReach=agx::Real(0.01))
The SuctionCup contains a rigid body with a local attachment frame which will be used to position it ...
agx::Vec3 getNormal() const
virtual agxModel::SuctionCupInteraction * createInteraction()
Function creating an interaction.
virtual void updateLeakageArea()
Calculates the leakage area.
agx::Real m_currentLeakageArea
agxCollide::GeometryRef m_lineSensor
agx::ref_ptr< agxCollide::Line > m_line
size_t getSealResolution() const
void separation(const agx::TimeStamp &, agxCollide::GeometryPair &)
agx::RigidBody * getRigidBody()
void removeNotification(agxSDK::Simulation *simulation)
void collectCollisionGeometries()
agx::Real getAvailableVacuumForce() const
The available vacuum force is a pre calculated value by the virtual VacuumSystem::calculateAvailableV...
agxSDK::ContactEventListener::KeepContactPolicy contact(const agx::TimeStamp &, agxCollide::GeometryContact *gc)
agxSDK::ContactEventListener::KeepContactPolicy impact(const agx::TimeStamp &, agxCollide::GeometryContact *gc)
agx::RealVector m_sealDepthMeasurements
agxCollide::GeometryRefSetVector m_sealSensors
agxCollide::SphereRef m_miniSphere
const agx::HashVector< agx::RigidBody *, SuctionCupInteractionRef > & getActiveInteractions() const
agxSDK::ContactEventListener::KeepContactPolicy handleContacts(const agx::TimeStamp &, agxCollide::GeometryContact *gc)
void updateVacuumForces(const VacuumSystem *vacuumSystem)
Will call the virtual function VacuumSystem::calculateAvailableVacuumForce; then apply the vacuum for...
bool isValid() const
Verify if the cup is valid.
This should be considered a template class used as a base for Suction Gripper simulation models.
agx::RigidBody * getHolderRigidBody()
void addSuctionCup(SuctionCup *cup)
Add one suction cup to the gripper.
SuctionCupRefVector & getSuctionCups()
virtual void last(const agx::TimeStamp &)
agxModel::SuctionCupRefVector m_suctionCups
VacuumSystem * getVacuumSystem()
VacuumSystemRef m_vacuumSystem
SuctionGripper(agx::RigidBody *holderBody)
The SuctionGripper must be initialized with a holder body.
agx::Real getCurrentLeakage() const
void setVacuumSystem(VacuumSystem *vacuumSystem)
Set a new vacuum system to the gripper.
static agx::LockJoint * positionAndLockSuctionCup(agxModel::SuctionGripper *gripper, agxModel::SuctionCup *cup, agx::Vec3 holderLocalTranslate, agx::Vec3 cupLocalTranslate)
virtual void pre(const agx::TimeStamp &)
virtual void preCollide(const agx::TimeStamp &)
const agx::RigidBody * getHolderRigidBody() const
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).
agx::RigidBodyRef m_holderBody
virtual void updateValid()
const VacuumSystem * getVacuumSystem() const
bool setHolderRigidBody(agx::RigidBody *holderBody)
Set the rigid body of the holder.
virtual void post(const agx::TimeStamp &)
const SuctionCupRefVector & getSuctionCups() const
virtual ~SuctionGripper()
agx::ref_ptr< agxUtil::GeneralStepListener< SuctionGripper > > m_stepCallback
Basic model for a vacuum system used by a SuctionGripper.
agx::Real m_timeOfPumpStateToggled
agx::Real m_outsideGasDensity
void setEnablePump(const bool &enable)
agx::Real getOutsideGasDensity() const
Get the gas density outside the vacuum system [kg / m^3].
agx::Real getOutsidePressure() const
Get the pressure outside the vacuum system in Pascal[Pa].
agx::Real getDesiredVacuum() const
Set the desired vacuum level (0-1) for the system.
void setDesiredVacuum(agx::Real vacuumLevel)
Set the current vacuum level (0-1) for the system If set outside the valid range, the value is clampe...
void setCurrentVacuum(agx::Real vacuum)
Set the current vacuum for the system.
virtual agx::Real calculateAvailableVacuumForce(SuctionCup *cup) const
A virtual function which is responsible to calculate the actual force a suction cup can apply to obje...
virtual void step(agx::Real dt, const SuctionGripper *gripper)
A virtual function for updating the vacuum system.
agx::Real calculateGasSpeedAtLip(const SuctionCup *cup) const
agx::Real getCurrentVacuum() const
void setOutsidePressure(agx::Real pressure)
Set the pressure outside the vacuum system in Pascal [Pa].
bool getEnablePump() const
void setOutsideGasDensity(agx::Real density)
Set the gas density outside the vacuum system [kg / m^3].
VacuumSystem(agx::Real desiredVacuum)
Create a vacuum system with a constant desired vacuum level.
agx::Real m_currentVacuum
agx::Real m_desiredVacuum
agx::Real calculateMaximumSuctionForce(SuctionCup *cup) const
agx::Real m_outsidePressure
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints,...
virtual void removeNotification(agxSDK::Simulation *)
Called when this assembly is removed from a simulation.
virtual void addNotification(agxSDK::Simulation *)
Called when this assembly is added to a simulation (given that it not already is in the simulation).
Abstract base class that implements a filter that selects which events should trigger a Listener.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Utility class to get step event callbacks to any class having the methods implemented.
The object defining a frame of reference and providing transformations operations.
Inheritance with partial specialization due to bug with ref_ptr containers.
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Constraint that removes all 6 DOF between two bodies, or one body and the world.
Main material class which acts as a holder of a Surface Material and a Bulk material.
Base class providing referencing counted objects.
The rigid body class, combining a geometric model and a frame of reference.
void clear(ClearPolicy policy=SHRINK_BUFFER_AVERAGED)
Remove all elements, optionally with maintained buffer allocation.
void push_back(const T2 &value)
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
agx::HashSet< SuctionCupRef > SuctionCupRefSet
The SuctionCup model owns a body which is mean to be attached somewhere on a SuctionGripper holder.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...