The function int p3d_get_robot_njnt(void) returns the number of joints of the current robot.
The function int p3d_get_robot_jnt_type(int i) returns the type (P3D_ROTATE or P3D_TRANSLATE) of the i-th joint of the current robot. The function void p3d_get_robot _jnt_bounds(int i, double *vmin, double *vmax) returns the minimum and maximum bounds of the i-th joint of the current robot.