Configuration

Configuration#

class mink_warp.Configuration[source]#

Bases: object

Batched robot configuration backed by MuJoCo Warp.

Holds q with shape (nworld, nq), device FK buffers, and body-frame Jacobians. Configuration-dependent quantities (frame poses, CoM, contacts) are valid after forward kinematics on wp_data.

Device-native API: hot-path arrays are wp.array. Use .numpy() or SE3 helpers only at host boundaries.

update(q: TypeAliasForwardRef('ArrayLike') | array | None = None) None[source]#

Run forward kinematics on device.

Parameters:

qwp.array of shape (nworld, nq) or (nq,), or a NumPy array (uploaded once). Prefer device arrays in the hot path.

update_from_keyframe(key_name: str) None[source]#
get_frame_jacobian(frame_name: str, frame_type: str) array[source]#

Body-frame Jacobian on device, shape (nworld, 6, nv).

The returned buffer is owned by this configuration and overwritten on the next Jacobian query — wp.copy if you need to keep it.

get_transform_frame_to_world(frame_name: str, frame_type: str) array[source]#

Frame poses on device as wxyz_xyz, shape (nworld, 7).

The returned buffer is owned by this configuration and overwritten on the next pose query — wp.copy if you need to keep it.

get_transform_frame_to_world_se3(frame_name: str, frame_type: str) SE3[source]#

Host SE3 for world 0 (optional convenience).

get_transform(frame_name: str, frame_type: str, root_name: str, root_type: str) array[source]#

Relative pose root^{-1} @ frame on device, shape (nworld, 7).

set_integration_dt(dt: float) None[source]#

Write the integrate timestep to device (call outside CUDA graphs).

integrate(velocity: TypeAliasForwardRef('ArrayLike') | array, dt: float) array[source]#

Integrate velocity on device; returns new q of shape (nworld, nq).

Uses MuJoCo Warp’s _next_position kernel (free / ball / hinge / slide).

integrate_inplace(velocity: TypeAliasForwardRef('ArrayLike') | array, dt: float | None = None) None[source]#

Integrate velocity into q on device and refresh kinematics.

If dt is None, uses the value last written by set_integration_dt() (needed inside CUDA graphs, which cannot host-assign).

property q: array#

Device configuration, shape (nworld, nq).

property nv: int#
property nq: int#