-
Nested Class Summary
Nested classes/interfaces inherited from class physx.NativeObject
NativeObject.Allocator<T> -
Field Summary
FieldsFields inherited from class physx.NativeObject
address, isExternallyAllocated, SIZEOF_BYTE, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_POINTER, SIZEOF_SHORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLoopJoint(PxConstraint joint) Adds a loop joint to the articulation system for inverse dynamics.voidapplyCache(PxArticulationCache cache, PxArticulationCacheFlags flags) Applies the data in the cache to the articulation.voidapplyCache(PxArticulationCache cache, PxArticulationCacheFlags flags, boolean autowake) Applies the data in the cache to the articulation.arrayGet(long baseAddress, int index) voidPrepares common articulation data based on articulation pose for inverse dynamics calculations.voidComputes the coefficient matrix for contact forces.voidComputes the joint DOF forces required to counteract Coriolis and centrifugal forces for the given articulation state.voidComputes the joint DOF forces required to counteract external spatial forces applied to articulation links.voidComputes the joint DOF forces required to counteract gravitational forces for the given articulation pose.voidCompute the joint-space inertia matrix that maps joint accelerations to joint forces: forces = M * accelerations.voidComputes the joint accelerations for the given articulation state and joint forces.voidComputes the joint forces for the given articulation state and joint accelerations, not considering gravity.voidCopies internal data of the articulation to the cache.Creates an articulation cache that can be used to read and write internal articulation data.Creates a fixed tendon to attach to the articulation with default attribute values.createLink(PxArticulationLink parent, PxTransform pose) Adds a link to the articulation with default attribute values.createSensor(PxArticulationLink link, PxTransform relativePose) Deprecated.Creates a force sensor attached to a link of the articulation.Creates a spatial tendon to attach to the articulation with default attribute values.voiddestroy()Returns the aggregate associated with the articulation.Returns the articulation's flags.intReturns the size of the articulation cache in bytes.intReturns the required size of the coefficient matrix in the articulation.intgetDofs()Returns the total number of joint degrees-of-freedom (DOFs) of the articulation.intReturns the GPU articulation index.getLinkAcceleration(int linkId) Returns the (classical) link acceleration in world space for the given low-level link index.floatGets the limit on the magnitude of the angular velocity at the articulation's center of mass.floatGets the limit on the magnitude of the linear velocity of the articulation's center of mass.getName()Returns the name string set with setName().intReturns the number of fixed tendons in the articulation.intReturns the number of links in the articulation.intReturns the number of loop joints in the articulation for inverse dynamics.intDeprecated.Returns the number of sensors in the articulation.intReturns the number of shapes in the articulation.intReturns the number of spatial tendons in the articulation.Gets the root link angular velocity.Returns the root link transform (world to actor frame).Gets the root link center-of-mass linear velocity.getScene()Returns the scene which this articulation belongs to.floatReturns the mass-normalized energy below which the articulation may go to sleep.floatReturns the mass-normalized kinetic energy below which the articulation may participate in stabilization.floatReturns the wake counter of the articulation in seconds.Returns the axis-aligned bounding box enclosing the articulation.getWorldBounds(float inflation) Returns the axis-aligned bounding box enclosing the articulation.booleanReturns true if this articulation is sleeping.voidForces the articulation to sleep.voidremoveLoopJoint(PxConstraint joint) Removes a loop joint from the articulation for inverse dynamics.voidsetArticulationFlag(PxArticulationFlagEnum flag, boolean value) Raises or clears a flag on the articulation.voidSets flags on the articulation.voidsetMaxCOMAngularVelocity(float maxAngularVelocity) Sets the limit on the magnitude of the angular velocity at the articulation's center of mass.voidsetMaxCOMLinearVelocity(float maxLinerVelocity) Sets the limit on the magnitude of the linear velocity of the articulation's center of mass.voidSets a name string for the articulation that can be retrieved with getName().voidsetRootAngularVelocity(PxVec3 angularVelocity) Sets the root link angular velocity.voidsetRootAngularVelocity(PxVec3 angularVelocity, boolean autowake) Sets the root link angular velocity.voidsetRootGlobalPose(PxTransform pose) Sets the root link transform in the world frame.voidsetRootGlobalPose(PxTransform pose, boolean autowake) Sets the root link transform in the world frame.voidsetRootLinearVelocity(PxVec3 linearVelocity) Sets the root link linear center-of-mass velocity.voidsetRootLinearVelocity(PxVec3 linearVelocity, boolean autowake) Sets the root link linear center-of-mass velocity.voidsetSleepThreshold(float threshold) Sets the mass-normalized energy threshold below which the articulation may go to sleep.voidsetSolverIterationCounts(int minPositionIters) Sets the solver iteration counts for the articulation.voidsetSolverIterationCounts(int minPositionIters, int minVelocityIters) Sets the solver iteration counts for the articulation.voidsetStabilizationThreshold(float threshold) Sets the mass-normalized kinetic energy threshold below which the articulation may participate in stabilization.voidsetWakeCounter(float wakeCounterValue) Sets the wake counter for the articulation in seconds.voidUpdate link velocities and/or positions in the articulation.voidwakeUp()Wakes up the articulation if it is sleeping.wrapPointer(long address) voidzeroCache(PxArticulationCache cache) Zeroes all data in the articulation cache, except user-provided and scratch memory, and cache version.Methods inherited from class physx.common.PxBase
getBaseFlags, getConcreteType, getConcreteTypeName, isReleasable, release, setBaseFlag, setBaseFlagsMethods inherited from class physx.NativeObject
checkNotNull, equals, getAddress, hashCode
-
Field Details
-
SIZEOF
public static final int SIZEOF -
ALIGNOF
public static final int ALIGNOF- See Also:
-
-
Constructor Details
-
PxArticulationReducedCoordinate
protected PxArticulationReducedCoordinate() -
PxArticulationReducedCoordinate
protected PxArticulationReducedCoordinate(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
destroy
public void destroy() -
getScene
Returns the scene which this articulation belongs to.- Returns:
- Owner Scene. NULL if not part of a scene.
- See Also:
-
setSolverIterationCounts
public void setSolverIterationCounts(int minPositionIters) Sets the solver iteration counts for the articulation.The solver iteration count determines how accurately contacts, drives, and limits are resolved. Setting a higher position iteration count may therefore help in scenarios where the articulation is subject to many constraints; for example, a manipulator articulation with drives and joint limits that is grasping objects, or several such articulations interacting through contacts. Other situations where higher position iterations may improve simulation fidelity are: large mass ratios within the articulation or between the articulation and an object in contact with it; or strong drives in the articulation being used to manipulate a light object.
If intersecting bodies are being depenetrated too violently, increase the number of velocity iterations. More velocity iterations will drive the relative exit velocity of the intersecting objects closer to the correct value given the restitution.
- Parameters:
minPositionIters- Number of position iterations the solver should perform for this articulation. Range: [1,255]. Default: 4.Note: This call may not be made during simulation.
-
setSolverIterationCounts
public void setSolverIterationCounts(int minPositionIters, int minVelocityIters) Sets the solver iteration counts for the articulation.The solver iteration count determines how accurately contacts, drives, and limits are resolved. Setting a higher position iteration count may therefore help in scenarios where the articulation is subject to many constraints; for example, a manipulator articulation with drives and joint limits that is grasping objects, or several such articulations interacting through contacts. Other situations where higher position iterations may improve simulation fidelity are: large mass ratios within the articulation or between the articulation and an object in contact with it; or strong drives in the articulation being used to manipulate a light object.
If intersecting bodies are being depenetrated too violently, increase the number of velocity iterations. More velocity iterations will drive the relative exit velocity of the intersecting objects closer to the correct value given the restitution.
- Parameters:
minPositionIters- Number of position iterations the solver should perform for this articulation. Range: [1,255]. Default: 4.minVelocityIters- Number of velocity iterations the solver should perform for this articulation. Range: [0,255]. Default: 1Note: This call may not be made during simulation.
-
isSleeping
public boolean isSleeping()Returns true if this articulation is sleeping.When an actor does not move for a period of time, it is no longer simulated in order to reduce computational cost. This state is called sleeping. However, because the object automatically wakes up when it is either touched by an awake object, or a sleep-affecting property is changed by the user, the entire sleep mechanism should be transparent to the user.
An articulation can only go to sleep if all links are ready for sleeping. An articulation is guaranteed to be awake if at least one of the following holds:
\li The wake counter of any link in the articulation is positive (see #setWakeCounter()). \li The mass-normalized energy of any link in the articulation is above a threshold (see #setSleepThreshold()). \li A non-zero force or torque has been applied to any joint or link.
If an articulation is sleeping, the following state is guaranteed:
\li The wake counter is zero. \li The linear and angular velocity of all links is zero. \li There is no force update pending.
When an articulation gets inserted into a scene, it will be considered asleep if all the points above hold, else it will be treated as awake.
If an articulation is asleep after the call to #PxScene::fetchResults() returns, it is guaranteed that the poses of the links were not changed. You can use this information to avoid updating the transforms of associated objects.
- Returns:
- True if the articulation is sleeping.
Note: This call may only be made on articulations that are in a scene, and may not be made during simulation, except in a split simulation in-between #PxScene::fetchCollision and #PxScene::advance.
- See Also:
-
setSleepThreshold
public void setSleepThreshold(float threshold) Sets the mass-normalized energy threshold below which the articulation may go to sleep.The articulation will sleep if the energy of each link is below this threshold.
- Parameters:
threshold- Energy below which the articulation may go to sleep. Range: [0, PX_MAX_F32)Note: This call may not be made during simulation.
Default: 5e-5f * PxTolerancesScale::speed * PxTolerancesScale::speed;
- See Also:
-
getSleepThreshold
public float getSleepThreshold()Returns the mass-normalized energy below which the articulation may go to sleep.- Returns:
- The energy threshold for sleeping.
- See Also:
-
setStabilizationThreshold
public void setStabilizationThreshold(float threshold) Sets the mass-normalized kinetic energy threshold below which the articulation may participate in stabilization.Articulations whose kinetic energy divided by their mass is above this threshold will not participate in stabilization.
This value has no effect if PxSceneFlag::eENABLE_STABILIZATION was not enabled on the PxSceneDesc.
Default: 5e-6f * PxTolerancesScale::speed * PxTolerancesScale::speed
- Parameters:
threshold- Energy below which the articulation may participate in stabilization. Range: [0,inf)Note: This call may not be made during simulation.
- See Also:
-
getStabilizationThreshold
public float getStabilizationThreshold()Returns the mass-normalized kinetic energy below which the articulation may participate in stabilization.Articulations whose kinetic energy divided by their mass is above this threshold will not participate in stabilization.
- Returns:
- The energy threshold for participating in stabilization.
- See Also:
-
setWakeCounter
public void setWakeCounter(float wakeCounterValue) Sets the wake counter for the articulation in seconds.- The wake counter value specifies a time threshold used to determine whether an articulation may be put to sleep. - The articulation will be put to sleep if all links have experienced a mass-normalised energy less than a threshold for at least a threshold time, as specified by the wake counter. - Passing in a positive value will wake up the articulation automatically.
Default: 0.4s (which corresponds to 20 frames for a time step of 0.02s)
- Parameters:
wakeCounterValue- Wake counter value in seconds. Range: [0, PX_MAX_F32)Note: This call may not be made during simulation, except in a split simulation in-between #PxScene::fetchCollision and #PxScene::advance.
- See Also:
-
getWakeCounter
public float getWakeCounter()Returns the wake counter of the articulation in seconds.- Returns:
- The wake counter of the articulation in seconds.
Note: This call may not be made during simulation, except in a split simulation in-between #PxScene::fetchCollision and #PxScene::advance.
- See Also:
-
wakeUp
public void wakeUp()Wakes up the articulation if it is sleeping.- The articulation will be woken up and might cause other touching objects to wake up as well during the next simulation step. - This will set the wake counter of the articulation to the value specified in #PxSceneDesc::wakeCounterResetValue.
Note: This call may only be made on articulations that are in a scene, and may not be made during simulation, except in a split simulation in-between #PxScene::fetchCollision and #PxScene::advance.
- See Also:
-
putToSleep
public void putToSleep()Forces the articulation to sleep.- The articulation will stay asleep during the next simulation step if not touched by another non-sleeping actor. - This will set any applied force, the velocity, and the wake counter of all bodies in the articulation to zero.
Note: This call may not be made during simulation, and may only be made on articulations that are in a scene.
- See Also:
-
setMaxCOMLinearVelocity
public void setMaxCOMLinearVelocity(float maxLinerVelocity) Sets the limit on the magnitude of the linear velocity of the articulation's center of mass.- The limit acts on the linear velocity of the entire articulation. The velocity is calculated from the total momentum and the spatial inertia of the articulation. - The limit only applies to floating-base articulations. - A benefit of the COM velocity limit is that it is evenly applied to the whole articulation, which results in fewer visual artifacts compared to link rigid-body damping or joint-velocity limits. However, these per-link or per-degree-of-freedom limits may still help avoid numerical issues.
Note: This call may not be made during simulation.
-
getMaxCOMLinearVelocity
public float getMaxCOMLinearVelocity()Gets the limit on the magnitude of the linear velocity of the articulation's center of mass.- Returns:
- The maximal linear velocity magnitude.
- See Also:
-
setMaxCOMAngularVelocity
public void setMaxCOMAngularVelocity(float maxAngularVelocity) Sets the limit on the magnitude of the angular velocity at the articulation's center of mass.- The limit acts on the angular velocity of the entire articulation. The velocity is calculated from the total momentum and the spatial inertia of the articulation. - The limit only applies to floating-base articulations. - A benefit of the COM velocity limit is that it is evenly applied to the whole articulation, which results in fewer visual artifacts compared to link rigid-body damping or joint-velocity limits. However, these per-link or per-degree-of-freedom limits may still help avoid numerical issues.
Note: This call may not be made during simulation.
- Parameters:
maxAngularVelocity- The maximal angular velocity magnitude. Range: [0, PX_MAX_F32); Default: 1e+6
-
getMaxCOMAngularVelocity
public float getMaxCOMAngularVelocity()Gets the limit on the magnitude of the angular velocity at the articulation's center of mass.- Returns:
- The maximal angular velocity magnitude.
- See Also:
-
createLink
Adds a link to the articulation with default attribute values.- Parameters:
parent- The parent link in the articulation. Must be NULL if (and only if) this is the root link.pose- The initial pose of the new link. Must be a valid transform.- Returns:
- The new link, or NULL if the link cannot be created.
Note: Creating a link is not allowed while the articulation is in a scene. In order to add a link, remove and then re-add the articulation to the scene.
Note: When the articulation is added to a scene, the root link adopts the specified pose. The pose of the root link is propagated through the ensemble of links from parent to child after accounting for each child's inbound joint frames and the joint positions set by PxArticulationJointReducedCoordinate::setJointPosition(). As a consequence, the pose of each non-root link is automatically overwritten when adding the articulation to the scene.
- See Also:
-
getNbLinks
public int getNbLinks()Returns the number of links in the articulation.- Returns:
- The number of links.
-
getNbShapes
public int getNbShapes()Returns the number of shapes in the articulation.- Returns:
- The number of shapes.
-
setName
Sets a name string for the articulation that can be retrieved with getName().This is for debugging and is not used by the SDK. The string is not copied by the SDK, only the pointer is stored.
- Parameters:
name- A pointer to a char buffer used to specify the name of the articulation.- See Also:
-
getName
Returns the name string set with setName().- Returns:
- Name string associated with the articulation.
- See Also:
-
getWorldBounds
Returns the axis-aligned bounding box enclosing the articulation.- Returns:
- The articulation's bounding box.
Note: It is not allowed to use this method while the simulation is running, except in a split simulation during #PxScene::collide() and up to #PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
- See Also:
-
getWorldBounds
Returns the axis-aligned bounding box enclosing the articulation.- Parameters:
inflation- Scale factor for computed world bounds. Box extents are multiplied by this value.- Returns:
- The articulation's bounding box.
Note: It is not allowed to use this method while the simulation is running, except in a split simulation during #PxScene::collide() and up to #PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
- See Also:
-
getAggregate
Returns the aggregate associated with the articulation.- Returns:
- The aggregate associated with the articulation or NULL if the articulation does not belong to an aggregate.
- See Also:
-
setArticulationFlags
Sets flags on the articulation.- Parameters:
flags- The articulation flags.Note: This call may not be made during simulation.
-
setArticulationFlag
Raises or clears a flag on the articulation.- Parameters:
flag- The articulation flag.value- The value to set the flag to.Note: This call may not be made during simulation.
-
getArticulationFlags
Returns the articulation's flags.- Returns:
- The articulation's flags.
-
getDofs
public int getDofs()Returns the total number of joint degrees-of-freedom (DOFs) of the articulation.- The six DOFs of the base of a floating-base articulation are not included in this count. - Example: Both a fixed-base and a floating-base double-pendulum with two revolute joints will have getDofs() == 2. - The return value is only valid for articulations that are in a scene.
- Returns:
- The number of joint DOFs, or 0xFFFFFFFF if the articulation is not in a scene.
-
createCache
Creates an articulation cache that can be used to read and write internal articulation data.- When the structure of the articulation changes (e.g. adding a link or sensor) after the cache was created, the cache needs to be released and recreated. - Free the memory allocated for the cache by calling the release() method on the cache. - Caches can only be created by articulations that are in a scene.
- Returns:
- The cache, or NULL if the articulation is not in a scene.
- See Also:
-
getCacheDataSize
public int getCacheDataSize()Returns the size of the articulation cache in bytes.- The size does not include: the user-allocated memory for the coefficient matrix or lambda values; the scratch-related memory/members; and the cache version. See comment in #PxArticulationCache. - The return value is only valid for articulations that are in a scene.
- Returns:
- The byte size of the cache, or 0xFFFFFFFF if the articulation is not in a scene.
- See Also:
-
zeroCache
Zeroes all data in the articulation cache, except user-provided and scratch memory, and cache version.Note: This call may only be made on articulations that are in a scene.
- See Also:
-
applyCache
Applies the data in the cache to the articulation.This call wakes the articulation if it is sleeping, and the autowake parameter is true (default) or: - a nonzero joint velocity is applied or - a nonzero joint force is applied or - a nonzero root velocity is applied
- Parameters:
cache- The articulation data.flags- Indicate which data in the cache to apply to the articulation. if the counter value is below the reset value.Note: This call may only be made on articulations that are in a scene, and may not be made during simulation.
-
applyCache
Applies the data in the cache to the articulation.This call wakes the articulation if it is sleeping, and the autowake parameter is true (default) or: - a nonzero joint velocity is applied or - a nonzero joint force is applied or - a nonzero root velocity is applied
- Parameters:
cache- The articulation data.flags- Indicate which data in the cache to apply to the articulation.autowake- If true, the call wakes up the articulation and increases the wake counter to #PxSceneDesc::wakeCounterResetValue if the counter value is below the reset value.Note: This call may only be made on articulations that are in a scene, and may not be made during simulation.
-
copyInternalStateToCache
Copies internal data of the articulation to the cache.- Parameters:
cache- The articulation data.flags- Indicate which data to copy from the articulation to the cache.Note: This call may only be made on articulations that are in a scene, and may not be made during simulation.
- See Also:
-
commonInit
public void commonInit()Prepares common articulation data based on articulation pose for inverse dynamics calculations.Usage: -# Set articulation pose (joint positions and base transform) via articulation cache and applyCache(). -# Call commonInit. -# Call inverse dynamics computation method.
Note: This call may only be made on articulations that are in a scene, and may not be made during simulation.
-
computeGeneralizedGravityForce
Computes the joint DOF forces required to counteract gravitational forces for the given articulation pose.- Inputs: Articulation pose (joint positions + base transform). - Outputs: Joint forces to counteract gravity (in cache).
- The joint forces returned are determined purely by gravity for the articulation in the current joint and base pose, and joints at rest; i.e. external forces, joint velocities, and joint accelerations are set to zero. Joint drives are also not considered in the computation. - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
- Parameters:
cache- Out: PxArticulationCache::jointForce.Note: This call may only be made on articulations that are in a scene, and may not be made during simulation.
- See Also:
-
computeCoriolisAndCentrifugalForce
Computes the joint DOF forces required to counteract Coriolis and centrifugal forces for the given articulation state.- Inputs: Articulation state (joint positions and velocities (in cache), and base transform and spatial velocity). - Outputs: Joint forces to counteract Coriolis and centrifugal forces (in cache).
- The joint forces returned are determined purely by the articulation's state; i.e. external forces, gravity, and joint accelerations are set to zero. Joint drives and potential damping terms, such as link angular or linear damping, or joint friction, are also not considered in the computation. - Prior to the computation, update/set the base spatial velocity with PxArticulationCache::rootLinkData and applyCache(). - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
\param[in,out] cache In: PxArticulationCache::jointVelocity; Out: PxArticulationCache::jointForce.
Note: This call may only be made on articulations that are in a scene, and may not be made during simulation.
- See Also:
-
computeGeneralizedExternalForce
Computes the joint DOF forces required to counteract external spatial forces applied to articulation links.- Inputs: External forces on links (in cache), articulation pose (joint positions + base transform). - Outputs: Joint forces to counteract the external forces (in cache).
- Only the external spatial forces provided in the cache and the articulation pose are considered in the computation. - The external spatial forces are with respect to the links' centers of mass, and not the actor's origin. - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
\param[in,out] cache In: PxArticulationCache::externalForces; Out: PxArticulationCache::jointForce.
Note: This call may only be made on articulations that are in a scene, and may not be made during simulation.
- See Also:
-
computeJointAcceleration
Computes the joint accelerations for the given articulation state and joint forces.- Inputs: Joint forces (in cache) and articulation state (joint positions and velocities (in cache), and base transform and spatial velocity). - Outputs: Joint accelerations (in cache).
- The computation includes Coriolis terms and gravity. However, joint drives and potential damping terms are not considered in the computation (for example, linear link damping or joint friction). - Prior to the computation, update/set the base spatial velocity with PxArticulationCache::rootLinkData and applyCache(). - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
\param[in,out] cache In: PxArticulationCache::jointForce and PxArticulationCache::jointVelocity; Out: PxArticulationCache::jointAcceleration.
Note: This call may only be made on articulations that are in a scene, and may not be made during simulation.
- See Also:
-
computeJointForce
Computes the joint forces for the given articulation state and joint accelerations, not considering gravity.- Inputs: Joint accelerations (in cache) and articulation state (joint positions and velocities (in cache), and base transform and spatial velocity). - Outputs: Joint forces (in cache).
- The computation includes Coriolis terms. However, joint drives and potential damping terms are not considered in the computation (for example, linear link damping or joint friction). - Prior to the computation, update/set the base spatial velocity with PxArticulationCache::rootLinkData and applyCache(). - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
\param[in,out] cache In: PxArticulationCache::jointAcceleration and PxArticulationCache::jointVelocity; Out: PxArticulationCache::jointForce.
Note: This call may only be made on articulations that are in a scene, and may not be made during simulation.
- See Also:
-
computeCoefficientMatrix
Computes the coefficient matrix for contact forces.- The matrix dimension is getCoefficientMatrixSize() = getDofs() * getNbLoopJoints(), and the DOF (column) indexing follows the internal DOF order, see PxArticulationCache::jointVelocity. - Each column in the matrix is the joint forces effected by a contact based on impulse strength 1. - The user must allocate memory for PxArticulationCache::coefficientMatrix where the required size of the PxReal array is equal to getCoefficientMatrixSize(). - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
- Parameters:
cache- Out: PxArticulationCache::coefficientMatrix.Note: This call may only be made on articulations that are in a scene, and may not be made during simulation.
- See Also:
-
computeGeneralizedMassMatrix
Compute the joint-space inertia matrix that maps joint accelerations to joint forces: forces = M * accelerations.- Inputs: Articulation pose (joint positions and base transform). - Outputs: Mass matrix (in cache).
commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
- Parameters:
cache- Out: PxArticulationCache::massMatrix.Note: This call may only be made on articulations that are in a scene, and may not be made during simulation.
- See Also:
-
addLoopJoint
Adds a loop joint to the articulation system for inverse dynamics.- Parameters:
joint- The joint to add.Note: This call may not be made during simulation.
- See Also:
-
removeLoopJoint
Removes a loop joint from the articulation for inverse dynamics.Note: This call may not be made during simulation.
- Parameters:
joint- The joint to remove.
-
getNbLoopJoints
public int getNbLoopJoints()Returns the number of loop joints in the articulation for inverse dynamics.- Returns:
- The number of loop joints.
-
getCoefficientMatrixSize
public int getCoefficientMatrixSize()Returns the required size of the coefficient matrix in the articulation.- Returns:
- Size of the coefficient matrix (equal to getDofs() * getNbLoopJoints()).
Note: This call may only be made on articulations that are in a scene.
- See Also:
-
setRootGlobalPose
Sets the root link transform in the world frame.- Use updateKinematic() after all state updates to the articulation via non-cache API such as this method, in order to update link states for the next simulation frame or querying.
- Parameters:
pose- The new root link transform. each link will be reset to #PxSceneDesc::wakeCounterResetValue.Note: This call may not be made during simulation.
Note: PxArticulationCache::rootLinkData similarly allows the root link pose to be updated and potentially offers better performance if the root link pose is to be updated along with other state variables.
- See Also:
-
setRootGlobalPose
Sets the root link transform in the world frame.- Use updateKinematic() after all state updates to the articulation via non-cache API such as this method, in order to update link states for the next simulation frame or querying.
- Parameters:
pose- The new root link transform.autowake- If true and the articulation is in a scene, the articulation will be woken up and the wake counter of each link will be reset to #PxSceneDesc::wakeCounterResetValue.Note: This call may not be made during simulation.
Note: PxArticulationCache::rootLinkData similarly allows the root link pose to be updated and potentially offers better performance if the root link pose is to be updated along with other state variables.
- See Also:
-
getRootGlobalPose
Returns the root link transform (world to actor frame).- Returns:
- The root link transform.
Note: This call is not allowed while the simulation is running except in a split simulation during #PxScene::collide() and up to #PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
Note: PxArticulationCache::rootLinkData similarly allows the root link pose to be queried and potentially offers better performance if the root link pose is to be queried along with other state variables.
- See Also:
-
setRootLinearVelocity
Sets the root link linear center-of-mass velocity.- The linear velocity is with respect to the link's center of mass and not the actor frame origin. - The articulation is woken up if the input velocity is nonzero (ignoring autowake) and the articulation is in a scene. - Use updateKinematic() after all state updates to the articulation via non-cache API such as this method, in order to update link states for the next simulation frame or querying.
- Parameters:
linearVelocity- The new root link center-of-mass linear velocity. to #PxSceneDesc::wakeCounterResetValue if the counter value is below the reset value.Note: This call may not be made during simulation, except in a split simulation in-between #PxScene::fetchCollision and #PxScene::advance.
Note: PxArticulationCache::rootLinkData similarly allows the root link linear velocity to be updated and potentially offers better performance if the root link linear velocity is to be updated along with other state variables.
- See Also:
-
setRootLinearVelocity
Sets the root link linear center-of-mass velocity.- The linear velocity is with respect to the link's center of mass and not the actor frame origin. - The articulation is woken up if the input velocity is nonzero (ignoring autowake) and the articulation is in a scene. - Use updateKinematic() after all state updates to the articulation via non-cache API such as this method, in order to update link states for the next simulation frame or querying.
- Parameters:
linearVelocity- The new root link center-of-mass linear velocity.autowake- If true and the articulation is in a scene, the call wakes up the articulation and increases the wake counter to #PxSceneDesc::wakeCounterResetValue if the counter value is below the reset value.Note: This call may not be made during simulation, except in a split simulation in-between #PxScene::fetchCollision and #PxScene::advance.
Note: PxArticulationCache::rootLinkData similarly allows the root link linear velocity to be updated and potentially offers better performance if the root link linear velocity is to be updated along with other state variables.
- See Also:
-
getRootLinearVelocity
Gets the root link center-of-mass linear velocity.- The linear velocity is with respect to the link's center of mass and not the actor frame origin.
- Returns:
- The root link center-of-mass linear velocity.
Note: This call is not allowed while the simulation is running except in a split simulation during #PxScene::collide() and up to #PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
Note: PxArticulationCache::rootLinkData similarly allows the root link linear velocity to be queried and potentially offers better performance if the root link linear velocity is to be queried along with other state variables.
- See Also:
-
setRootAngularVelocity
Sets the root link angular velocity.- The articulation is woken up if the input velocity is nonzero (ignoring autowake) and the articulation is in a scene. - Use updateKinematic() after all state updates to the articulation via non-cache API such as this method, in order to update link states for the next simulation frame or querying.
- Parameters:
angularVelocity- The new root link angular velocity. to #PxSceneDesc::wakeCounterResetValue if the counter value is below the reset value.Note: This call may not be made during simulation, except in a split simulation in-between #PxScene::fetchCollision and #PxScene::advance.
Note: PxArticulationCache::rootLinkData similarly allows the root link angular velocity to be updated and potentially offers better performance if the root link angular velocity is to be updated along with other state variables.
- See Also:
-
setRootAngularVelocity
Sets the root link angular velocity.- The articulation is woken up if the input velocity is nonzero (ignoring autowake) and the articulation is in a scene. - Use updateKinematic() after all state updates to the articulation via non-cache API such as this method, in order to update link states for the next simulation frame or querying.
- Parameters:
angularVelocity- The new root link angular velocity.autowake- If true and the articulation is in a scene, the call wakes up the articulation and increases the wake counter to #PxSceneDesc::wakeCounterResetValue if the counter value is below the reset value.Note: This call may not be made during simulation, except in a split simulation in-between #PxScene::fetchCollision and #PxScene::advance.
Note: PxArticulationCache::rootLinkData similarly allows the root link angular velocity to be updated and potentially offers better performance if the root link angular velocity is to be updated along with other state variables.
- See Also:
-
getRootAngularVelocity
Gets the root link angular velocity.- Returns:
- The root link angular velocity.
Note: This call is not allowed while the simulation is running except in a split simulation during #PxScene::collide() and up to #PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
Note: PxArticulationCache::rootLinkData similarly allows the root link angular velocity to be queried and potentially offers better performance if the root link angular velocity is to be queried along with other state variables.
- See Also:
-
getLinkAcceleration
Returns the (classical) link acceleration in world space for the given low-level link index.- The returned acceleration is not a spatial, but a classical, i.e. body-fixed acceleration (https://en.wikipedia.org/wiki/Spatial_acceleration). - The (linear) acceleration is with respect to the link's center of mass and not the actor frame origin.
- Parameters:
linkId- The low-level link index, see PxArticulationLink::getLinkIndex.- Returns:
- The link's center-of-mass classical acceleration, or 0 if the call is made before the articulation participated in a first simulation step.
Note: This call may only be made on articulations that are in a scene. It is not allowed to use this method while the simulation is running. The exceptions to this rule are a split simulation during #PxScene::collide() and up to #PxScene::advance(); in PxContactModifyCallback; and in contact report callbacks.
-
getGpuArticulationIndex
public int getGpuArticulationIndex()Returns the GPU articulation index.- Returns:
- The GPU index, or 0xFFFFFFFF if the articulation is not in a scene or PxSceneFlag::eENABLE_DIRECT_GPU_API is not set.
-
createSpatialTendon
Creates a spatial tendon to attach to the articulation with default attribute values.- Returns:
- The new spatial tendon.
Note: Creating a spatial tendon is not allowed while the articulation is in a scene. In order to add the tendon, remove and then re-add the articulation to the scene.
Note: The spatial tendon is released with PxArticulationReducedCoordinate::release()
- See Also:
-
createFixedTendon
Creates a fixed tendon to attach to the articulation with default attribute values.- Returns:
- The new fixed tendon.
Note: Creating a fixed tendon is not allowed while the articulation is in a scene. In order to add the tendon, remove and then re-add the articulation to the scene.
Note: The fixed tendon is released with PxArticulationReducedCoordinate::release()
- See Also:
-
createSensor
@Deprecated public PxArticulationSensor createSensor(PxArticulationLink link, PxTransform relativePose) Deprecated.Creates a force sensor attached to a link of the articulation.
- Parameters:
link- The link to attach the sensor to.relativePose- The sensor frame's relative pose to the link's body frame, i.e. the transform body frame -> sensor frame. The link body frame is at the center of mass and aligned with the principal axes of inertia, see PxRigidBody::getCMassLocalPose.- Returns:
- The new sensor.
Note: Creating a sensor is not allowed while the articulation is in a scene. In order to add the sensor, remove and then re-add the articulation to the scene.
Note: The sensor is released with PxArticulationReducedCoordinate::release()
- See Also:
-
getNbSpatialTendons
public int getNbSpatialTendons()Returns the number of spatial tendons in the articulation.- Returns:
- The number of tendons.
-
getNbFixedTendons
public int getNbFixedTendons()Returns the number of fixed tendons in the articulation.- Returns:
- The number of tendons.
-
getNbSensors
Deprecated.Returns the number of sensors in the articulation.
- Returns:
- The number of sensors.
-
updateKinematic
Update link velocities and/or positions in the articulation.An alternative that potentially offers better performance is to use the PxArticulationCache API.
If the application updates the root state (position and velocity) or joint state via any combination of the non-cache API calls
- setRootGlobalPose(), setRootLinearVelocity(), setRootAngularVelocity() - PxArticulationJointReducedCoordinate::setJointPosition(), PxArticulationJointReducedCoordinate::setJointVelocity()
the application needs to call this method after the state setting in order to update the link states for the next simulation frame or querying.
Use - PxArticulationKinematicFlag::ePOSITION after any changes to the articulation root or joint positions using non-cache API calls. Updates links' positions and velocities. - PxArticulationKinematicFlag::eVELOCITY after velocity-only changes to the articulation root or joints using non-cache API calls. Updates links' velocities only.
Note: This call may only be made on articulations that are in a scene, and may not be made during simulation.
-