PxArticulationJointReducedCoordinate
Defined in include/PxArticulationJointReducedCoordinate.h
-
class PxArticulationJointReducedCoordinate : public PxBase
A joint between two links in an articulation.
See also
PxArticulationReducedCoordinate, PxArticulationLink
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).
Default: PxArticulationJointType::eUNDEFINED
See also
PxArticulationJointType, getJointType
Note
Setting the joint type is not allowed while the articulation is in a scene. In order to amend 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.
See also
PxArticulationJointType, setJointType
- Returns
The joint type.
-
virtual void setMotion(PxArticulationAxis::Enum axis, PxArticulationMotion::Enum motion) = 0
Sets the joint motion for a given axis.
Default: PxArticulationMotion::eLOCKED
See also
PxArticulationAxis, PxArticulationMotion, getMotion
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.
See also
PxArticulationAxis, PxArticulationMotion, setMotion
- Parameters
axis – [in] The target axis.
- Returns
The joint motion of the given axis.
-
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.
Default: (0,0)
See also
getLimitParams, PxArticulationAxis, PxArticulationLimit
Note
This call is not allowed while the simulation is running.
Note
For PxArticulationJointType::eSPHERICAL, limit.min and limit.max must both be in range [-Pi, Pi].
Note
For PxArticulationJointType::eREVOLUTE, limit.min and limit.max must both be in range [-2*Pi, 2*Pi].
Note
For PxArticulationJointType::eREVOLUTE_UNWRAPPED, limit.min and limit.max must both be in range [-PX_MAX_REAL, PX_MAX_REAL].
Note
For PxArticulationJointType::ePRISMATIC, limit.min and limit.max must both be in range [-PX_MAX_REAL, PX_MAX_REAL].
- 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.
See also
setLimitParams, PxArticulationAxis, PxArticulationLimit
- Parameters
axis – [in] The target axis.
- Returns
The joint limits.
-
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.
Default: PxArticulationDrive(0.0f, 0.0f, 0.0f, PxArticulationDriveType::eNONE)
See also
getDriveParams, PxArticulationAxis, PxArticulationDrive
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.
See also
setDriveParams, PxArticulationAxis, PxArticulationDrive
- 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.
Default: 0.0
See also
PxArticulationAxis, getDriveTarget
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.
See also
PxArticulationAxis, setDriveTarget
- 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.
Default: 0.0
See also
PxArticulationAxis, getDriveVelocity
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.
See also
PxArticulationAxis, setDriveVelocity
- 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.
Default: 0.0
See also
PxArticulationAxis, getArmature
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.
See also
PxArticulationAxis, setArmature
- 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.
Default: 0.05
See also
getFrictionCoefficient
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.
See also
setFrictionCoefficient
- 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.
Default: 100.0
See also
getMaxJointVelocity
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.
See also
setMaxJointVelocity
- 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.
For performance, prefer PxArticulationCache::jointPosition to set joint positions in a batch articulation state update.
Use PxArticulationReducedCoordinate::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.
Default: 0.0
See also
PxArticulationAxis, getJointPosition, PxArticulationCache::jointPosition, PxArticulationReducedCoordinate::updateKinematic
Note
This call is not allowed while the simulation is running.
Note
For PxArticulationJointType::eSPHERICAL, jointPos must be in range [-Pi, Pi].
Note
For PxArticulationJointType::eREVOLUTE, jointPos must be in range [-2*Pi, 2*Pi].
Note
For PxArticulationJointType::eREVOLUTE_UNWRAPPED, jointPos must be in range [-PX_MAX_REAL, PX_MAX_REAL].
Note
For PxArticulationJointType::ePRISMATIC, jointPos must be in range [-PX_MAX_REAL, PX_MAX_REAL].
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.
See also
PxArticulationAxis, setJointPosition, PxArticulationCache::jointPosition
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.
For performance, prefer PxArticulationCache::jointVelocity to set joint velocities in a batch articulation state update.
Use PxArticulationReducedCoordinate::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.
Default: 0.0
See also
PxArticulationAxis, getJointVelocity, PxArticulationCache::jointVelocity, PxArticulationReducedCoordinate::updateKinematic
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.
See also
PxArticulationAxis, setJointVelocity, PxArticulationCache::jointVelocity
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 final override
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.
-
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.
See also
PxSerialization::isSerializable
- 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
-
virtual PxArticulationLink &getParentArticulationLink() const = 0