Applying ArticulationAction on kinematic robotic arm generates this warning. It only happens when the device is CPU. For GPU PhysX device I dont get such error. Can somebody help me in comprehending why the behavior is different for CPU and GPU? What is the appropriate way to set joint positions for kinematic only prims?
Hi @prath4 - The warning you’re seeing is due to a difference in how PhysX handles kinematic and dynamic bodies. In PhysX, a kinematic body is one that is not affected by forces or collisions, but instead has its motion explicitly controlled by setting its position or velocity. On the other hand, a dynamic body is one that is affected by forces, collisions, and can also have its motion controlled by setting its velocity.
The setAngularVelocity
function is intended for use with dynamic bodies, not kinematic ones. When you call this function on a kinematic body, PhysX issues a warning because it’s not appropriate to set the angular velocity of a body that isn’t affected by forces or collisions.
The behavior difference between CPU and GPU might be due to different versions or configurations of PhysX being used for CPU and GPU simulations. It’s also possible that the GPU version simply doesn’t issue a warning in this case, even though the operation is still not appropriate.
To control the motion of a kinematic body, you should use the setGlobalPose
function to directly set its position and orientation. If you want to control the body’s motion using velocities, you might need to switch it to be a dynamic body.
Hi @rthaker thanks for your detailed response. I tried to look for set_qpos
function in the core api docs but couldn’t find it. I am referring this link. Can you please point me to the correct documentation of the set_qpos
function.
Thanks for your help
Hi @prath4 - Please ignore the set_qpos function related comment. Did you try the other function setGlobalPose?
Hi @rthaker I am looking for a function for setting the articulation angles on kinematic robotic arms. I guess setGlobalPose function just sets the pose of the prim with respect to the World.
Hi @prath4 - articulation links cannot be kinematic, so you cannot use the reduced-coordinate system of articulations here. But there may be a workaround if you setup your robot as an articulation with very high position gains (e.g. 1e25) on the joint drives, which makes it behave like a kinematic.
Otherwise you have to setup the robot as a set of kinematic rigid bodies and you must use setGlobalPose on each link, where you can use the usual recursion to figure out the global poses from parent link poses and joint positions.
Philipp
@philipp.reist thanks for your response. I think it would be great to have functions for setting joint angles in kinematic prims. It is helpful especially for collision checking in motion planning. I am currently trying to integrate a motion planner from OMPL and I intended to use kinematic prims for it.
Thank you for the feedback - this is possible in the PhysX SDK using the update kinematic method: PxArticulationReducedCoordinate — physx 5.2.1 documentation
I.e. update the joint state, run updateKinematic, and then read out the link states.
I am not sure about IsaacSim funtionality to do this directly. Would you know, @rthaker ?
You could probably get a close approximation already if you set the joint state, run a very small time step, and then read out link states and set those on the kinematic bodies.
Philipp