PxArticulationJointReducedCoordinate

Defined in include/PxArticulationJointReducedCoordinate.h

Inheritance Relationships

Base Type

class PxArticulationJointReducedCoordinate : public PxBase

A joint between two links in an articulation.

Public Functions

virtual PxArticulationLink &getParentArticulationLink() const = 0

Gets the parent articulation link of this joint.

Returns

The parent link.

virtual void setParentPose(const PxTransform &pose) = 0

Sets the joint pose in the parent link actor frame.

See also

getParentPose

Note

This call is not allowed while the simulation is running.

Parameters

pose[in] The joint pose. Default: The identity transform.

virtual PxTransform getParentPose() const = 0

Gets the joint pose in the parent link actor frame.

See also

setParentPose

Returns

The joint pose.

virtual PxArticulationLink &getChildArticulationLink() const = 0

Gets the child articulation link of this joint.

Returns

The child link.

virtual void setChildPose(const PxTransform &pose) = 0

Sets the joint pose in the child link actor frame.

See also

getChildPose

Note

This call is not allowed while the simulation is running.

Parameters

pose[in] The joint pose. Default: The identity transform.

virtual PxTransform getChildPose() const = 0

Gets the joint pose in the child link actor frame.

See also

setChildPose

Returns

The joint pose.

virtual void setJointType(PxArticulationJointType::Enum jointType) = 0

Sets the joint type (e.g.

revolute).

Note

Setting the joint type is not allowed while the articulation is in a scene. In order to set the joint type, remove and then re-add the articulation to the scene.

Parameters

jointType[in] The joint type to set.

virtual PxArticulationJointType::Enum getJointType() const = 0

Gets the joint type.

Returns

The joint type.

virtual void setMotion(PxArticulationAxis::Enum axis, PxArticulationMotion::Enum motion) = 0

Sets the joint motion for a given axis.

Note

Setting the motion of joint axes is not allowed while the articulation is in a scene. In order to set the motion, remove and then re-add the articulation to the scene.

Parameters
  • axis[in] The target axis.

  • motion[in] The motion type to set.

virtual PxArticulationMotion::Enum getMotion(PxArticulationAxis::Enum axis) const = 0

Returns the joint motion for the given axis.

Parameters

axis[in] The target axis.

Returns

The joint motion of the given axis.

inline void setLimit(PxArticulationAxis::Enum axis, const PxReal lowLimit, const PxReal highLimit)

Sets the joint limits for a given axis.

  • The motion of the corresponding axis should be set to PxArticulationMotion::eLIMITED in order for the limits to be enforced.

  • The lower limit should be strictly smaller than the higher limit. If the limits should be equal, use PxArticulationMotion::eLOCKED and an appropriate offset in the parent/child joint frames.

Deprecated:

Use setLimitParams instead. Deprecated since PhysX version 5.1.

Note

This call is not allowed while the simulation is running.

Parameters
  • axis[in] The target axis.

  • lowLimit[in] The lower joint limit.Range: [-PX_MAX_F32, highLimit)Default: 0.0

  • highLimit[in] The higher joint limit.Range: (lowLimit, PX_MAX_F32]Default: 0.0

inline void getLimit(PxArticulationAxis::Enum axis, PxReal &lowLimit, PxReal &highLimit) const

Returns the joint limits for a given axis.

Deprecated:

Use getLimitParams instead. Deprecated since PhysX version 5.1.

Parameters
  • axis[in] The target axis.

  • lowLimit[out] The lower joint limit.

  • highLimit[out] The higher joint limit.

virtual void setLimitParams(PxArticulationAxis::Enum axis, const PxArticulationLimit &limit) = 0

Sets the joint limits for a given axis.

  • The motion of the corresponding axis should be set to PxArticulationMotion::eLIMITED in order for the limits to be enforced.

  • The lower limit should be strictly smaller than the higher limit. If the limits should be equal, use PxArticulationMotion::eLOCKED and an appropriate offset in the parent/child joint frames.

Note

This call is not allowed while the simulation is running.

Note

For spherical joints, limit.min and limit.max must both be in range [-Pi, Pi].

Parameters
  • axis[in] The target axis.

  • limit[in] The joint limits.

virtual PxArticulationLimit getLimitParams(PxArticulationAxis::Enum axis) const = 0

Returns the joint limits for a given axis.

Parameters

axis[in] The target axis.

Returns

The joint limits.

inline void setDrive(PxArticulationAxis::Enum axis, const PxReal stiffness, const PxReal damping, const PxReal maxForce, PxArticulationDriveType::Enum driveType = PxArticulationDriveType::eFORCE)

Configures a joint drive for the given axis.

See PxArticulationDrive for parameter details; and the manual for further information, and the drives’ implicit spring-damper (i.e. PD control) implementation in particular.

Deprecated:

Use setDriveParams instead. Deprecated since PhysX version 5.1.

Note

This call is not allowed while the simulation is running.

Parameters
  • axis[in] The target axis.

  • stiffness[in] The drive stiffness, i.e. the proportional gain of the implicit PD controller.Range: [0, PX_MAX_F32]Default: 0.0

  • damping[in] The drive damping, i.e. the derivative gain of the implicit PD controller.Range: [0, PX_MAX_F32]Default: 0.0

  • maxForce[in] The force limit of the drive (this parameter also limits the force for an acceleration-type drive).Range: [0, PX_MAX_F32]Default: 0.0

  • driveType[in] The drive type,

inline void getDrive(PxArticulationAxis::Enum axis, PxReal &stiffness, PxReal &damping, PxReal &maxForce, PxArticulationDriveType::Enum &driveType) const

Gets the joint drive configuration for the given axis.

Deprecated:

Use getDriveParams instead. Deprecated since PhysX version 5.1.

Parameters
  • axis[in] The motion axis.

  • stiffness[out] The drive stiffness.

  • damping[out] The drive damping.

  • maxForce[out] The force limit.

  • driveType[out] The drive type.

virtual void setDriveParams(PxArticulationAxis::Enum axis, const PxArticulationDrive &drive) = 0

Configures a joint drive for the given axis.

See PxArticulationDrive for parameter details; and the manual for further information, and the drives’ implicit spring-damper (i.e. PD control) implementation in particular.

Note

This call is not allowed while the simulation is running.

Parameters
  • axis[in] The target axis.

  • drive[in] The drive parameters

virtual PxArticulationDrive getDriveParams(PxArticulationAxis::Enum axis) const = 0

Gets the joint drive configuration for the given axis.

Parameters

axis[in] The target axis.

Returns

The drive parameters.

virtual void setDriveTarget(PxArticulationAxis::Enum axis, const PxReal target, bool autowake = true) = 0

Sets the joint drive position target for the given axis.

The target units are linear units (equivalent to scene units) for a translational axis, or rad for a rotational axis.

Note

This call is not allowed while the simulation is running.

Note

For spherical joints, target must be in range [-Pi, Pi].

Note

The target is specified in the parent frame of the joint. If Gp, Gc are the parent and child actor poses in the world frame and Lp, Lc are the parent and child joint frames expressed in the parent and child actor frames then the joint will drive the parent and child links to poses that obey Gp * Lp * J = Gc * Lc. For joints restricted to angular motion, J has the form PxTranfsorm(PxVec3(PxZero), PxExp(PxVec3(twistTarget, swing1Target, swing2Target))). For joints restricted to linear motion, J has the form PxTransform(PxVec3(XTarget, YTarget, ZTarget), PxQuat(PxIdentity)).

Note

For spherical joints with more than 1 degree of freedom, the joint target angles taken together can collectively represent a rotation of greater than Pi around a vector. When this happens the rotation that matches the joint drive target is not the shortest path rotation. The joint pose J that is the outcome after driving to the target pose will always be the equivalent of the shortest path rotation.

Parameters
  • axis[in] The target axis.

  • target[in] The target position.

  • autowake[in] 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.

virtual PxReal getDriveTarget(PxArticulationAxis::Enum axis) const = 0

Returns the joint drive position target for the given axis.

Parameters

axis[in] The target axis.

Returns

The target position.

virtual void setDriveVelocity(PxArticulationAxis::Enum axis, const PxReal targetVel, bool autowake = true) = 0

Sets the joint drive velocity target for the given axis.

The target units are linear units (equivalent to scene units) per second for a translational axis, or radians per second for a rotational axis.

Note

This call is not allowed while the simulation is running.

Parameters
  • axis[in] The target axis.

  • targetVel[in] The target velocity.

  • autowake[in] 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.

virtual PxReal getDriveVelocity(PxArticulationAxis::Enum axis) const = 0

Returns the joint drive velocity target for the given axis.

Parameters

axis[in] The target axis.

Returns

The target velocity.

virtual void setArmature(PxArticulationAxis::Enum axis, const PxReal armature) = 0

Sets the joint armature for the given axis.

  • The armature is directly added to the joint-space spatial inertia of the corresponding axis.

  • The armature is in mass units for a prismatic (i.e. linear) joint, and in mass units * (scene linear units)^2 for a rotational joint.

Note

This call is not allowed while the simulation is running.

Parameters
  • axis[in] The target axis.

  • armature[in] The joint axis armature.

virtual PxReal getArmature(PxArticulationAxis::Enum axis) const = 0

Gets the joint armature for the given axis.

Parameters

axis[in] The target axis.

Returns

The armature set on the given axis.

virtual void setFrictionCoefficient(const PxReal coefficient) = 0

Sets the joint friction coefficient, which applies to all joint axes.

  • The joint friction is unitless and relates the magnitude of the spatial force [F_trans, T_trans] transmitted from parent to child link to the maximal friction force F_resist that may be applied by the solver to resist joint motion, per axis; i.e. |F_resist| <= coefficient * (|F_trans| + |T_trans|), where F_resist may refer to a linear force or torque depending on the joint axis.

  • The simulated friction effect is therefore similar to static and Coulomb friction. In order to simulate dynamic joint friction, use a joint drive with zero stiffness and zero velocity target, and an appropriately dimensioned damping parameter.

Note

This call is not allowed while the simulation is running.

Parameters

coefficient[in] The joint friction coefficient.

virtual PxReal getFrictionCoefficient() const = 0

Gets the joint friction coefficient.

Returns

The joint friction coefficient.

virtual void setMaxJointVelocity(const PxReal maxJointV) = 0

Sets the maximal joint velocity enforced for all axes.

  • The solver will apply appropriate joint-space impulses in order to enforce the per-axis joint-velocity limit.

  • The velocity units are linear units (equivalent to scene units) per second for a translational axis, or radians per second for a rotational axis.

Note

This call is not allowed while the simulation is running.

Parameters

maxJointV[in] The maximal per-axis joint velocity.

virtual PxReal getMaxJointVelocity() const = 0

Gets the maximal joint velocity enforced for all axes.

Returns

The maximal per-axis joint velocity.

virtual void setJointPosition(PxArticulationAxis::Enum axis, const PxReal jointPos) = 0

Sets the joint position for the given axis.

Note

This call is not allowed while the simulation is running.

Note

For spherical joints, jointPos must be in range [-Pi, Pi].

Note

Joint position is specified in the parent frame of the joint. If Gp, Gc are the parent and child actor poses in the world frame and Lp, Lc are the parent and child joint frames expressed in the parent and child actor frames then the parent and child links will be given poses that obey Gp * Lp * J = Gc * Lc with J denoting the joint pose. For joints restricted to angular motion, J has the form PxTranfsorm(PxVec3(PxZero), PxExp(PxVec3(twistPos, swing1Pos, swing2Pos))). For joints restricted to linear motion, J has the form PxTransform(PxVec3(xPos, yPos, zPos), PxQuat(PxIdentity)).

Note

For spherical joints with more than 1 degree of freedom, the input joint positions taken together can collectively represent a rotation of greater than Pi around a vector. When this happens the rotation that matches the joint positions is not the shortest path rotation. The joint pose J that is the outcome of setting and applying the joint positions will always be the equivalent of the shortest path rotation.

Parameters
  • axis[in] The target axis.

  • jointPos[in] The joint position in linear units (equivalent to scene units) for a translational axis, or radians for a rotational axis.

virtual PxReal getJointPosition(PxArticulationAxis::Enum axis) const = 0

Gets the joint position for the given axis, i.e.

joint degree of freedom (DOF).

For performance, prefer PxArticulationCache::jointPosition to get joint positions in a batch query.

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.

Parameters

axis[in] The target axis.

Returns

The joint position in linear units (equivalent to scene units) for a translational axis, or radians for a rotational axis.

virtual void setJointVelocity(PxArticulationAxis::Enum axis, const PxReal jointVel) = 0

Sets the joint velocity for the given axis.

Note

This call is not allowed while the simulation is running.

Parameters
  • axis[in] The target axis.

  • jointVel[in] The joint velocity in linear units (equivalent to scene units) per second for a translational axis, or radians per second for a rotational axis.

virtual PxReal getJointVelocity(PxArticulationAxis::Enum axis) const = 0

Gets the joint velocity for the given axis.

For performance, prefer PxArticulationCache::jointVelocity to get joint velocities in a batch query.

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.

Parameters

axis[in] The target axis.

Returns

The joint velocity in linear units (equivalent to scene units) per second for a translational axis, or radians per second for a rotational axis.

inline virtual const char *getConcreteTypeName() const

Returns the string name of the dynamic type.

Returns

The string name.

inline virtual ~PxArticulationJointReducedCoordinate()
virtual void release() = 0

Releases the PxBase instance, please check documentation of release in derived class.

template<class T>
inline T *is()
template<class T>
inline const T *is() const
inline PxType getConcreteType() const

Returns concrete type of object.

See also

PxConcreteType

Returns

PxConcreteType::Enum of serialized object

inline void setBaseFlag(PxBaseFlag::Enum flag, bool value)

Set PxBaseFlag

Parameters
  • flag[in] The flag to be set

  • value[in] The flags new value

inline void setBaseFlags(PxBaseFlags inFlags)

Set PxBaseFlags

See also

PxBaseFlags

Parameters

inFlags[in] The flags to be set

inline PxBaseFlags getBaseFlags() const

Returns PxBaseFlags.

See also

PxBaseFlags

Returns

PxBaseFlags

inline virtual bool isReleasable() const

Whether the object is subordinate.

A class is subordinate, if it can only be instantiated in the context of another class.

Returns

Whether the class is subordinate

Public Members

void *userData

The user can assign this to whatever, usually to create a 1:1 relationship with a user object.

Protected Functions

inline PxArticulationJointReducedCoordinate(PxType concreteType, PxBaseFlags baseFlags)
inline PxArticulationJointReducedCoordinate(PxBaseFlags baseFlags)
inline virtual bool isKindOf(const char *name) const

Returns whether a given type name matches with the type of this instance.

template<class T>
inline bool typeMatch() const

Protected Attributes

PxType mConcreteType
PxBaseFlags mBaseFlags
PxU32 mBuiltInRefCount