|
AGX Dynamics 2.42.3.1
|
Constraint implementation that constrains the velocity of the rotational dimensions of a number bodies. More...
#include <PowerLineConstraints.h>
Inheritance diagram for agxPowerLine::HolonomicGearConstraintImplementation:Public Member Functions | |
| HolonomicGearConstraintImplementation () | |
Public Member Functions inherited from agxPowerLine::GearConstraintImplementation | |
| GearConstraintImplementation () | |
| AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxPowerLine::GearConstraintImplementation) | |
Public Member Functions inherited from agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation | |
| PhysicalDimensionMultiBodyConstraintImplementation () | |
| Constructor. | |
| ~PhysicalDimensionMultiBodyConstraintImplementation () | |
| void | add (PhysicalDimension *dimension) |
| Add a physical dimension to the constraint. | |
| AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation) | |
| agx::Real | getCompliance () const |
| agx::Real | getCurrentForce () const |
| ElementaryPhysicalDimensionConstraint * | getElementaryConstraint () const |
| virtual void | postSystemCallback (agx::DynamicsSystem *system) override |
| Prepare system after solve. | |
| virtual void | prepareDimensions () |
| virtual void | preSystemCallback (agx::DynamicsSystem *system) override |
| Prepare system before solve. | |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| void | setCompliance (agx::Real compliance) |
| Set the compliance of the constraint. | |
| void | setConnector (agxPowerLine::Connector *connector) |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| virtual size_t | updateJacobian (agx::Jacobian6DOFElement *jacobians) override |
| Update the jacobians of the included dimensions. | |
| virtual bool | updateValid () override |
| Test if the constraint is still valid. | |
Public Member Functions inherited from agx::ConstraintImplementation | |
| ConstraintImplementation () | |
| Default constructor. | |
| virtual | ~ConstraintImplementation () |
| Destructor. | |
| virtual bool | addElementaryConstraint (const agx::String &name, agx::ElementaryConstraint *elementaryConstraint) |
| Add elementary constraint (like Spherical, Dot1, Dot2 etc) given name. | |
| virtual void | addNlCallbacks (agx::SparseRangeReal &sparseRangeReal, const NlmcpCallbackSolverData &solverData) const |
| Interface for non-linear callback from solver. | |
| virtual void | addNotification () |
| Callback when this constraint is added to Simulation. | |
| virtual bool | addSecondaryConstraint (const agx::String &name, agx::ElementaryConstraint *secondaryConstraint) |
| Add secondary constraint (like motor, range and/or lock etc) given name. | |
| RealVector | calculateCurrentViolation () const |
| Calculates the current violation of the ordinary degrees of freedom of this constraint, e.g., three translational and two rotational (total 5 elements) of a hinge, i.e., controllers DOF are not included. | |
| agx::UInt | calculateNumActiveRows () const |
| Calculates the current number of active rows, including both elementary and secondary constraints. | |
| agx::Real | calculateViolationVectorAverageSize () |
| Gets the average size of the elements in getViolation() by calculating the magnitude and dividing by the number of elements. | |
| template<typename T > | |
| T * | findSecondaryConstraintGivenType (const agx::UInt count=0) const |
| bool | getActive () const |
| virtual agx::Real | getAngle (agx::UInt=0) const |
| If the constraint supports angle calculations and 'dof' is in range, this method returns the angle of the given degree of freedom. | |
| virtual agx::AttachmentPair * | getAttachmentPair () const |
| agx::UInt | getBlockRowIndex () const |
| const BlockStructure & | getBlockStructure () const |
| virtual void | getBounds (agx::RangeReal *bounds, agx::Real dt) const |
| Calculates and pushes the bounds into a sparse range data structure. | |
| virtual int | getConstraintVelocity (agx::Real *v, int row) |
| Calculates and pushes the constraint velocities into array given current row. | |
| virtual agx::Real | getCurrentSpeed (agx::UInt=0) const |
| If this method is implemented, a call to this method will return the current speed of the angle. | |
| virtual agx::ElementaryConstraint * | getElementaryConstraint (const agx::String &name) const |
| virtual agx::ElementaryConstraint * | getElementaryConstraint (const agx::UInt index) const |
| agx::ElementaryConstraint::RefContainer & | getElementaryConstraints () |
| const agx::ElementaryConstraint::RefContainer & | getElementaryConstraints () const |
| virtual bool | getEnable () const |
| virtual agx::Bool | getEnableComputeForces () const |
| bool | getEnableLinearization () const |
| virtual void | getEpsilon (agx::Real *epsilon, agx::Real h) |
Writes regularization parameters for all active rows into epsilon. | |
| agx::FrictionController * | getFrictionController (agx::UInt number=0) const |
| agx::UInt | getJacobianRowUsage () const |
| virtual agx::Bool | getLastForce (agx::UInt bodyIndex, agx::Vec3 &retForce, agx::Vec3 &retTorque, agx::Bool giveForceAtCm=false) const |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body with bodyIndex. | |
| virtual agx::Bool | getLastForce (const agx::RigidBody *rb, agx::Vec3 &retForce, agx::Vec3 &retTorque, agx::Bool giveForceAtCm=false) const |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body rb. | |
| virtual agx::Bool | getLastLocalForce (agx::UInt bodyIndex, agx::Vec3 &retForce, agx::Vec3 &retTorque, agx::Bool giveForceAtCm=false) const |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body with bodyIndex. | |
| virtual agx::Bool | getLastLocalForce (const agx::RigidBody *rb, agx::Vec3 &retForce, agx::Vec3 &retTorque, agx::Bool giveForceAtCm=false) const |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body rb. | |
| agx::Lock1D * | getLock1D (agx::UInt number=0) const |
| agx::Motor1D * | getMotor1D (agx::UInt number=0) const |
| virtual void | getParameters (agx::Real *violation, agx::Real *epsilon, agx::Real *damping, bool *holonomic, agx::Real *velocity, agx::RangeReal *bounds, int8_t *indexSetState, agx::Real h, agx::Real minPerturbation=agx::Real(1E-10)) |
| Writes solver parameters such as damping and holonomic. | |
| agx::Range1D * | getRange1D (agx::UInt number=0) const |
| virtual agx::ElementaryConstraint * | getSecondaryConstraint (const agx::String &name) const |
| virtual agx::ElementaryConstraint * | getSecondaryConstraint (const agx::UInt index) const |
| agx::ElementaryConstraint::RefContainer & | getSecondaryConstraints () |
| const agx::ElementaryConstraint::RefContainer & | getSecondaryConstraints () const |
| bool | getSolveBoth () const |
| bool | getSolveIterative () const |
| SolverBodyView | getSolverView () const |
| Bodies as viewed from the solver. | |
| Constraint::SolveType | getSolveType () const |
| ConstraintImplPtrVector & | getSubConstraints () |
| const ConstraintImplPtrVector & | getSubConstraints () const |
| int | getTag () const |
| BodyView | getUserView () const |
| Bodies as viewed from the user. | |
| virtual int | getViolation (agx::Real *g, int row) |
| Calculates and pushes the constraint values into array given current row. | |
| void | incrementConstraintCount (RigidBody *rb) const |
Increment the number of constraints connection to rb. | |
| bool | isImpacting () const |
| bool | isValid () const |
| void | onDirectComplianceMatrix (Real *data, unsigned int ld) const |
| Internal callback from the direct solver with perturbation matrix data. | |
| virtual void | postSolveCallback (const agx::Jacobian6DOFElement *jacobians, const agx::Real *solution, agx::Real dt) |
| Peak at the solution after the solver is done. | |
| void | postSolveIndexSetCallback (const int8_t *state) |
| Callback after the solver is done about the state of each equation in the constraint. | |
| virtual void | postSystemCallback (DynamicsSystem *system) |
| Last in the dynamics system step forward loop, this constraint gets a call with the main system. | |
| virtual void | prepare () |
| Prepares this constraint. | |
| virtual void | preSystemCallback (DynamicsSystem *system) |
| Before prepare, and before the system writes to the data buffers, this constraint gets a call with the main system it's in. | |
| virtual bool | rebind () |
| The general version of rebind takes the first attachment frame and moves the other attachment frame so they have the exact same world transform. | |
| virtual bool | removeElementaryConstraint (agx::ElementaryConstraint *elementaryConstraint) |
| Remove elementary constraint. | |
| virtual bool | removeElementaryConstraint (const agx::String &name) |
| Remove elementary constraint. | |
| virtual void | removeNotification () |
| Callback when this constraint is removed from Simulation. | |
| virtual bool | removeSecondaryConstraint (agx::ElementaryConstraint *secondaryConstraint) |
| Remove secondary constraint. | |
| virtual bool | removeSecondaryConstraint (const agx::String &name) |
| Remove secondary constraint. | |
| void | reset () |
| Reset the solution vectors of the primary and secondary elementary constraints in the implementation. | |
| void | setBlockRowIndex (agx::UInt blockRowIndex) |
| Sets the global start index for this constraint in the global, non-permuted matrix. | |
| virtual void | setEnable (bool enable) |
| Sets the enable flag. | |
| virtual void | setEnableComputeForces (agx::Bool enable) |
| Enable (or disable) computation of the forces applied to the dynamic bodies in this constraint. | |
| void | setEnableLinearization (bool enable) |
| Control whether or not linearization should be performed on the ElementaryConstraints that require it, such as QuatLock. | |
| void | setSolveType (Constraint::SolveType type) |
| Set solve type, either DIRECT, ITERATIVE or DIRECT_AND_ITERATIVE. | |
| void | sort () |
| This method will sort this constraint by global indexing of the bodies. | |
| virtual CALLABLE_IGNORE void | updateComplianceMatrix (LSquareComplianceMatrix matrix) const |
| Callback with read/write access to the compliance matrix of this constraint in the direct solver. | |
| virtual size_t | updateJacobian (agx::Jacobian6DOFElement *jacobians) |
| Updated storing of Jacobian matrices. | |
| virtual bool | updateValid () |
| Updates the valid conditions for this constraint. | |
| virtual agx::Attachment * | userAPIgetAttachment (agx::UInt) const |
| virtual agx::Attachment * | userAPIgetAttachment (const agx::RigidBody *) const |
| agx::Real | userAPIgetCompliance (agx::UInt dof) const |
| agx::Real | userAPIgetCurrentForce (agx::UInt dof) const |
Consider using getLastForce instead. | |
| agx::Real | userAPIgetDamping (agx::UInt dof) const |
| agx::RangeReal | userAPIgetForceRange (agx::UInt dof) const |
Get the force range for DOF dof. | |
| agx::RegularizationParameters * | userAPIgetRegularizationParameters (agx::UInt i) const |
| Get the regularization parameter i, i.e., the regularization parameter for equation i which is constraint dependent. | |
| void | userAPIsetCompliance (agx::Real compliance, int dof) |
| Set the compliance for constraint row i of this constraint. | |
| void | userAPIsetDamping (agx::Real damping, int dof) |
| Set the damping for constraint row i of this constraint. | |
| void | userAPIsetForceRange (agx::RangeReal forceRange, agx::Int dof) |
| Assign force range, of an elementary constraint, for a given DOF. | |
Public Member Functions inherited from agxStream::Serializable | |
| virtual | ~Serializable () |
| Destructor for normal C++ use but hidden from SWIG bindings. | |
| virtual const char * | getClassName () const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. | |
| virtual StorageAgent * | getStorageAgent () const =0 |
| agx::Uuid | getUuid () const |
| bool | isFinished () const |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. | |
Additional Inherited Members | |
Public Types inherited from agx::ConstraintImplementation | |
| enum | Tags { NONE = 0 , MANY_BODY = (1<<0) , DEFAULT_BINARY_TAG = NONE , DEFAULT_MANY_BODY_TAG = MANY_BODY } |
Static Public Member Functions inherited from agxPowerLine::GearConstraintImplementation | |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
Static Public Member Functions inherited from agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation | |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
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. | |
Public Attributes inherited from agx::ConstraintImplementation | |
| void * | customData |
| Custom data for the solvers to store data into. | |
Protected Types inherited from agx::ConstraintImplementation | |
| using | LocalState = agx::BitState< State, Int32 > |
| enum | State : Int32 { VALID = 1 << 0 , IMPACTING = 1 << 1 , SUPPORTS_COMPLIANCE_MATRIX = 1 << 2 } |
Protected Member Functions inherited from agxPowerLine::GearConstraintImplementation | |
| virtual | ~GearConstraintImplementation () |
Protected Member Functions inherited from agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation | |
| PhysicalDimensionMultiBodyConstraintImplementation (ElementaryPhysicalDimensionConstraint *elementaryConstraint) | |
| void | initialize () |
Protected Member Functions inherited from agx::ConstraintImplementation | |
| void | setSimulation (agxSDK::Simulation *simulation) |
| Set the Simulation this constraint belongs to. | |
| void | setSupportsComplianceMatrix (Bool supportsComplianceMatrix) |
| Enable/disable compliance matrix callbacks from the direct solver where read/write access to the compliance matrix will be available in an implementation of updateComplianceMatrix. | |
Protected Member Functions inherited from agxStream::Serializable | |
| Serializable () | |
| Default constructor. | |
| Serializable (const Serializable &other) | |
| Copy constructor. | |
| void | generateUuid () |
Protected Attributes inherited from agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation | |
| RigidBodyPtrIntHashVector | m_bodyToIndexTable |
| PhysicalDimensionPtrIntTable | m_dimensionToIndexTable |
| ElementaryPhysicalDimensionConstraint * | m_elementaryConstraint |
| size_t | m_indexCounter |
| agx::Vector< agx::observer_ptr< agx::RigidBody > > | m_observedBodies |
Protected Attributes inherited from agx::ConstraintImplementation | |
| UInt | m_blockRowIndex |
| Start block row for this constraint in the global matrix. | |
| BlockStructure | m_blockStructure |
| The block structure; number of block, rows, dynamic blocks etc. | |
| ConstraintRigidBodyContainer | m_bodies |
| Vector with observer pointers to bodies. | |
| ConstrainedBodiesState | m_constrainedBodiesState |
| State of the included bodies, updated in updateValid. | |
| ElementaryConstraint::RefContainer | m_ec |
| Vector of elementary constraints. | |
| bool | m_enable |
| User controlled enable flag, constraint ignored by solver if false. | |
| bool | m_enableLinearization |
| When necessary, tweak the values sent to the solver to make violation depend linearly on force or torque. | |
| LocalState | m_localState |
| Current local state, updated all the time, not serialized. | |
| UInt | m_numRows |
| Number of rows used by this constraint. | |
| ElementaryConstraint::RefContainer | m_sc |
| Vector of secondary constraints. | |
| Constraint::SolveType | m_solveType |
| Only for supported solvers. | |
| ConstraintImplPtrVector | m_subConstraints |
| Vector with sub-constraints. | |
| int | m_tag |
| Tag for this constraint. | |
Constraint implementation that constrains the velocity of the rotational dimensions of a number bodies.
Definition at line 284 of file PowerLineConstraints.h.
| agxPowerLine::HolonomicGearConstraintImplementation::HolonomicGearConstraintImplementation | ( | ) |