newton.get_joint_dof_count#
- newton.get_joint_dof_count(joint_type, num_axes)[source]#
Returns the number of degrees of freedom (DoF) in velocity and the number of coordinates in position for a given joint type.
- Parameters:
- Returns:
- A tuple (dof_count, coord_count) where:
dof_count: Number of velocity degrees of freedom for the joint.
coord_count: Number of position coordinates for the joint.
- Return type:
Notes
For PRISMATIC and REVOLUTE joints, both values are 1 (single axis).
For BALL joints, dof_count is 3 (angular velocity), coord_count is 4 (quaternion).
For FREE and DISTANCE joints, dof_count is 6 (3 translation + 3 rotation), coord_count is 7 (3 position + 4 quaternion).
For FIXED joints, both values are 0.