Articulations, Loaders & Dynamics

Model Importers

JoltSim parses robot models in pure Python into ArticulationDesc / BodyDesc / SiteDesc descriptors:

  • joltsim.load_urdf(path, base_pos=None, fixed_base=False, ...) -> UrdfModel

  • joltsim.load_mjcf(path, base_pos=None, fixed_base=None, ...) -> MjcfModel (supports <site>, <body mocap="true">, capsules/boxes/spheres/cylinders/meshes)

  • joltsim.load_sdf(path, default_kp=100.0, default_kd=10.0) -> SdfModel

  • joltsim.get_asset_path(rel_path) — Resolves bundled assets in joltsim/assets/ (e.g. franka_panda/panda.urdf, a1/a1.urdf).

Joint Types & Motors

JointType supports Revolute, Continuous, Prismatic, Fixed, and Spherical (3-DoF ball joints represented by 4-element xyzw quaternions in qpos and 3-element angular velocities in qvel).

Actuated joints (Revolute, Continuous, Prismatic) are driven via SixDOFConstraint motors with MotorConfig:

  • MotorMode.Off: Motor disabled.

  • MotorMode.Position: Implicit spring-damper PD target in ctrl (kp, kd, max_effort).

  • MotorMode.Velocity: Velocity target in ctrl.

  • MotorMode.Torque: Direct generalized force/torque in ctrl applied via apply_external_torque / apply_external_force (internal constraint motor disabled).

Update motor gains at runtime with set_articulation_motor_config(art_idx, joint_idx, motor).

Kinematics, Dynamics & RNEA

  • Inverse Kinematics: calculate_ik(art_idx, link_idx, target_pos, target_quat=None, max_iters=64, tol=1e-4, damping=0.05) runs damped least-squares (DLS) IK over the kinematic chain.

  • Spatial Jacobian: calculate_jacobian(art_idx, link_idx, local_point=None) returns a (6, nv) float32 array [J_lin; J_ang].

  • Mass Matrix: calculate_mass_matrix(art_idx) returns the (nv, nv) joint-space inertia matrix \(M(q)\).

  • Full RNEA Inverse Dynamics: calculate_inverse_dynamics(art_idx, qpos, qvel, qacc) computes \(\tau = M(q)\ddot{q} + C(q, \dot{q})\dot{q} + g(q)\) via topological forward kinematics, velocity/acceleration propagation, and backward wrench recursion.

Runtime Constraints

Attach or detach runtime constraints between bodies (or body2 = -1 for world frame) via add_constraint(RuntimeConstraintDesc) and remove_constraint(constraint_id) supporting RuntimeConstraintType.Fixed, Point, Hinge, and Slider.