PxArticulationCache#

Defined in include/PxArticulationReducedCoordinate.h

class PxArticulationCache#

Data structure used to read and write internal articulation data.

Public Functions

inline PxArticulationCache()#
void release()#

Releases an articulation cache.

Public Members

PxSpatialForce *externalForces#

External forces acting on the articulation links for inverse dynamics computation.

PxReal *denseJacobian#

Dense Jacobian data.

PxReal *massMatrix#

The generalized mass matrix used in inverse dynamics algorithms.

  • N = (getDofs() + 6) * (getDofs() + 6) -> size includes possible floating-base DOFs regardless of PxArticulationFlag::eFIX_BASE flag.

  • If PxArticulationFlag::eFIX_BASE is true, the terms corresponding to the root DoFs are included in the top left block of the matrix. For these terms, column indices correspond to linear acceleration first then angular acceleration, row indices correspond to force first then torque. The bottom right block of the matrix corresponds to the joint DoFs terms, column indices correspond to joint acceleration, row indices correspond to joint force.

  • If PxArticulationFlag::eFIX_BASE is false, only the terms corresponding to the joint DoFs are included, column indices correspond to joint acceleration, row indices correspond to joint force.

  • The indexing follows the internal DOF index order, see PxArticulationCache::jointVelocity.

  • The mass matrix is indexed [nCols * row + column].

PxReal *coriolisForce#

The Coriolis and centrifugal compensation forces used in inverse dynamics algorithms.

PxReal *gravityCompensationForce#

The gravity compensation forces used in inverse dynamics algorithms.

PxReal *centroidalMomentumMatrix#

The centroidal momentum matrix that maps velocities to centroidal momentum.

  • N = 6 * (getDofs() + 6).

  • Each row includes first the term related to the DOF of the root (linear, then angular), then the joint DOF following the internal DOF index order, see PxArticulationCache::jointVelocity.

  • The centroidal momentum includes first the linear and then the angular contribution.

PxReal *centroidalMomentumBias#

The centroidal momentum bias force.

This is a second-order term to calculate the derivative of the centroidal momentum.

  • N = 6.

  • The centroidal momentum includes first the linear and then the angular contribution.

PxReal *jointVelocity#

The articulation joint DOF velocities.

  • N = getDofs().

  • Read/write using PxArticulationCacheFlag::eVELOCITY.

  • The indexing follows the internal DOF index order. Therefore, the application should calculate the DOF data indices by summing the joint DOFs in the order of the links’ low-level indices (see the manual Section “Cache Indexing” for a snippet for this calculation):

    Low-level link index:   | link 0 | link 1 | link 2 | link 3 | ... | <- PxArticulationLink::getLinkIndex()
    
    Link inbound joint DOF: | 0      | 1      | 2      | 1      | ... | <- PxArticulationLink::getInboundJointDof()
    
    Low-level DOF index:    | -      | 0      | 1, 2   | 3      | ... |
    
    The root link always has low-level index 0 and always has zero inbound joint DOFs. The link DOF indexing follows the order in PxArticulationAxis::Enum. For example, assume that low-level link 2 has an inbound spherical joint with two DOFs: eSWING1 and eSWING2. The corresponding low-level joint DOF indices are therefore 1 for eSWING1 and 2 for eSWING2.

PxReal *jointAcceleration#

The articulation joint DOF accelerations.

PxReal *jointPosition#

The articulation joint DOF positions.

PxReal *jointForce#

The articulation joint DOF forces.

PxReal *jointTargetPositions#

The articulation joint drive target positions.

PxReal *jointTargetVelocities#

The articulation joint drive target velocities.

PxSpatialVelocity *linkVelocity#

Link spatial velocity.

PxSpatialVelocity *linkAcceleration#

Link classical acceleration.

PxSpatialForce *linkIncomingJointForce#

Link incoming joint force, i.e.

the total force transmitted from the parent link to this link.

Note

The root link reports a zero spatial force.

PxVec3 *linkForce#

Link force, i.e.

an external force applied to the link’s center of mass.

PxVec3 *linkTorque#

Link torque, i.e.

an external torque applied to the link.

PxArticulationRootLinkData *rootLinkData#

Root link transform, velocities, and accelerations.

PxReal *coefficientMatrix#

Constraint coefficient matrix.

Deprecated:

The API related to loop joints will be removed in a future version once a replacement is made available.

  • N = getCoefficentMatrixSize().

  • The user needs to allocate memory and set this member to the allocated memory.

PxReal *lambda#

Constraint lambda values (impulses applied by the respective constraints).

Deprecated:

The API related to loop joints will be removed in a future version once a replacement is made available.

  • N = getNbLoopJoints().

  • The user needs to allocate memory and set this member to the allocated memory.

void *scratchMemory#

The scratch memory is used for internal calculations.

void *scratchAllocator#

The scratch allocator is used for internal calculations.

PxU32 version#

The cache version used internally to check compatibility with the articulation, i.e. detect if the articulation configuration changed after the cache was created.