# `ExMujoco.Data`
[🔗](https://github.com/d-led/ex.mujoco/blob/main/lib/ex_mujoco/data.ex#L2)

The fields of `mjData`, read one at a time.

Each function is one call into MuJoCo that copies the field out, so the
answer is a value: it does not change under you when the next step runs.

  * a scalar answers a number — `narena/1` answers
    an integer;
  * an array answers an `ExMujoco.Tensor`, with the element type and the
    shape, because a bare binary would have lost both;
  * a field MuJoCo gives no extent to is not here at all, and
    `docs/coverage.md` says which, and why.

The names are MuJoCo's own — `geom_pos`, `qpos`, `efc_force` — so the
documentation for a field is MuJoCo's documentation for that field.

# `t`

```elixir
@type t() :: reference()
```

An mjData this process holds.

# `act`

```elixir
@spec act(t()) :: ExMujoco.Tensor.t()
```

`act` — actuator activation (na x 1)

`mjtNum*` in C, `na` × `1`.

# `act_dot`

```elixir
@spec act_dot(t()) :: ExMujoco.Tensor.t()
```

`act_dot` — time-derivative of actuator activation (na x 1)

`mjtNum*` in C, `na` × `1`.

# `actuator_force`

```elixir
@spec actuator_force(t()) :: ExMujoco.Tensor.t()
```

`actuator_force` — actuator force in actuation space (nout x 1)

`mjtNum*` in C, `nout` × `1`.

# `actuator_length`

```elixir
@spec actuator_length(t()) :: ExMujoco.Tensor.t()
```

`actuator_length` — actuator lengths, one per force output (nout x 1)

`mjtNum*` in C, `nout` × `1`.

# `actuator_moment`

```elixir
@spec actuator_moment(t()) :: ExMujoco.Tensor.t()
```

`actuator_moment` — actuator moments (nJmom x 1)

`mjtNum*` in C, `nJmom` × `1`.

# `actuator_velocity`

```elixir
@spec actuator_velocity(t()) :: ExMujoco.Tensor.t()
```

`actuator_velocity` — actuator velocities, one per force output (nout x 1)

`mjtNum*` in C, `nout` × `1`.

# `body_awake`

```elixir
@spec body_awake(t()) :: ExMujoco.Tensor.t()
```

`body_awake` — body sleep state (mjtSleepState) (nbody x 1)

`int*` in C, `nbody` × `1`.

# `body_awake_ind`

```elixir
@spec body_awake_ind(t()) :: ExMujoco.Tensor.t()
```

`body_awake_ind` — indices of awake and static bodies (nbody x 1)

`int*` in C, `nbody` × `1`.

# `bvh_aabb_dyn`

```elixir
@spec bvh_aabb_dyn(t()) :: ExMujoco.Tensor.t()
```

`bvh_aabb_dyn` — global bounding box (center, size) (nbvhdynamic x 6)

`mjtNum*` in C, `nbvhdynamic` × `6`.

# `bvh_active`

```elixir
@spec bvh_active(t()) :: ExMujoco.Tensor.t()
```

`bvh_active` — was bounding volume checked for collision (nbvh x 1)

`mjtBool*` in C, `nbvh` × `1`.

# `cacc`

```elixir
@spec cacc(t()) :: ExMujoco.Tensor.t()
```

`cacc` — com-based acceleration (nbody x 6)

`mjtNum*` in C, `nbody` × `6`.

# `cam_xmat`

```elixir
@spec cam_xmat(t()) :: ExMujoco.Tensor.t()
```

`cam_xmat` — Cartesian camera orientation (ncam x 9)

`mjtNum*` in C, `ncam` × `9`.

# `cam_xpos`

```elixir
@spec cam_xpos(t()) :: ExMujoco.Tensor.t()
```

`cam_xpos` — Cartesian camera position (ncam x 3)

`mjtNum*` in C, `ncam` × `3`.

# `cdof`

```elixir
@spec cdof(t()) :: ExMujoco.Tensor.t()
```

`cdof` — com-based motion axis of each dof (rot:lin) (nv x 6)

`mjtNum*` in C, `nv` × `6`.

# `cdof_dot`

```elixir
@spec cdof_dot(t()) :: ExMujoco.Tensor.t()
```

`cdof_dot` — time-derivative of cdof (rot:lin) (nv x 6)

`mjtNum*` in C, `nv` × `6`.

# `cfrc_ext`

```elixir
@spec cfrc_ext(t()) :: ExMujoco.Tensor.t()
```

`cfrc_ext` — com-based external force on body (nbody x 6)

`mjtNum*` in C, `nbody` × `6`.

# `cfrc_int`

```elixir
@spec cfrc_int(t()) :: ExMujoco.Tensor.t()
```

`cfrc_int` — com-based interaction force with parent (nbody x 6)

`mjtNum*` in C, `nbody` × `6`.

# `cinert`

```elixir
@spec cinert(t()) :: ExMujoco.Tensor.t()
```

`cinert` — com-based body inertia and mass (nbody x 10)

`mjtNum*` in C, `nbody` × `10`.

# `crb`

```elixir
@spec crb(t()) :: ExMujoco.Tensor.t()
```

`crb` — com-based composite inertia and mass (nbody x 10)

`mjtNum*` in C, `nbody` × `10`.

# `ctrl`

```elixir
@spec ctrl(t()) :: ExMujoco.Tensor.t()
```

`ctrl` — control (nu x 1)

`mjtNum*` in C, `nu` × `1`.

# `cvel`

```elixir
@spec cvel(t()) :: ExMujoco.Tensor.t()
```

`cvel` — com-based velocity (rot:lin) (nbody x 6)

`mjtNum*` in C, `nbody` × `6`.

# `dof_awake_ind`

```elixir
@spec dof_awake_ind(t()) :: ExMujoco.Tensor.t()
```

`dof_awake_ind` — indices of awake dofs (nv x 1)

`int*` in C, `nv` × `1`.

# `dof_island`

```elixir
@spec dof_island(t()) :: ExMujoco.Tensor.t()
```

`dof_island` — island id of this dof; -1: none (nv x 1)

`int*` in C, `nv@model` × `1`.

# `efc_AR`

```elixir
@spec efc_AR(t()) :: ExMujoco.Tensor.t()
```

`efc_AR` — J*inv(M)*J' + R (nA x 1)

`mjtNum*` in C, `nA@data` × `1`.

# `efc_AR_colind`

```elixir
@spec efc_AR_colind(t()) :: ExMujoco.Tensor.t()
```

`efc_AR_colind` — column indices in sparse AR (nA x 1)

`int*` in C, `nA@data` × `1`.

# `efc_AR_rowadr`

```elixir
@spec efc_AR_rowadr(t()) :: ExMujoco.Tensor.t()
```

`efc_AR_rowadr` — row start address in AR colind array (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `efc_AR_rownnz`

```elixir
@spec efc_AR_rownnz(t()) :: ExMujoco.Tensor.t()
```

`efc_AR_rownnz` — number of non-zeros in AR (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `efc_aref`

```elixir
@spec efc_aref(t()) :: ExMujoco.Tensor.t()
```

`efc_aref` — reference pseudo-acceleration (nefc x 1)

`mjtNum*` in C, `nefc@data` × `1`.

# `efc_b`

```elixir
@spec efc_b(t()) :: ExMujoco.Tensor.t()
```

`efc_b` — linear cost term: J*qacc_smooth - aref (nefc x 1)

`mjtNum*` in C, `nefc@data` × `1`.

# `efc_D`

```elixir
@spec efc_D(t()) :: ExMujoco.Tensor.t()
```

`efc_D` — constraint mass (nefc x 1)

`mjtNum*` in C, `nefc@data` × `1`.

# `efc_diagA`

```elixir
@spec efc_diagA(t()) :: ExMujoco.Tensor.t()
```

`efc_diagA` — diagonal of A matrix, approximate or exact (nefc x 1)

`mjtNum*` in C, `nefc@data` × `1`.

# `efc_force`

```elixir
@spec efc_force(t()) :: ExMujoco.Tensor.t()
```

`efc_force` — constraint force in constraint space (nefc x 1)

`mjtNum*` in C, `nefc@data` × `1`.

# `efc_frictionloss`

```elixir
@spec efc_frictionloss(t()) :: ExMujoco.Tensor.t()
```

`efc_frictionloss` — frictionloss (friction) (nefc x 1)

`mjtNum*` in C, `nefc@data` × `1`.

# `efc_id`

```elixir
@spec efc_id(t()) :: ExMujoco.Tensor.t()
```

`efc_id` — id of object of specified type (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `efc_island`

```elixir
@spec efc_island(t()) :: ExMujoco.Tensor.t()
```

`efc_island` — island id of this constraint (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `efc_J`

```elixir
@spec efc_J(t()) :: ExMujoco.Tensor.t()
```

`efc_J` — constraint Jacobian (nJ x 1)

`mjtNum*` in C, `nJ@data` × `1`.

# `efc_J_colind`

```elixir
@spec efc_J_colind(t()) :: ExMujoco.Tensor.t()
```

`efc_J_colind` — column indices in constraint Jacobian (nJ x 1)

`int*` in C, `nJ@data` × `1`.

# `efc_J_rowadr`

```elixir
@spec efc_J_rowadr(t()) :: ExMujoco.Tensor.t()
```

`efc_J_rowadr` — row start address in colind array (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `efc_J_rownnz`

```elixir
@spec efc_J_rownnz(t()) :: ExMujoco.Tensor.t()
```

`efc_J_rownnz` — number of non-zeros in constraint Jacobian row (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `efc_J_rowsuper`

```elixir
@spec efc_J_rowsuper(t()) :: ExMujoco.Tensor.t()
```

`efc_J_rowsuper` — number of subsequent rows in supernode (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `efc_KBIP`

```elixir
@spec efc_KBIP(t()) :: ExMujoco.Tensor.t()
```

`efc_KBIP` — stiffness, damping, impedance, imp' (nefc x 4)

`mjtNum*` in C, `nefc@data` × `4`.

# `efc_margin`

```elixir
@spec efc_margin(t()) :: ExMujoco.Tensor.t()
```

`efc_margin` — inclusion margin (contact) (nefc x 1)

`mjtNum*` in C, `nefc@data` × `1`.

# `efc_pos`

```elixir
@spec efc_pos(t()) :: ExMujoco.Tensor.t()
```

`efc_pos` — constraint position (equality, contact) (nefc x 1)

`mjtNum*` in C, `nefc@data` × `1`.

# `efc_R`

```elixir
@spec efc_R(t()) :: ExMujoco.Tensor.t()
```

`efc_R` — inverse constraint mass (nefc x 1)

`mjtNum*` in C, `nefc@data` × `1`.

# `efc_state`

```elixir
@spec efc_state(t()) :: ExMujoco.Tensor.t()
```

`efc_state` — constraint state (mjtConstraintState) (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `efc_type`

```elixir
@spec efc_type(t()) :: ExMujoco.Tensor.t()
```

`efc_type` — constraint type (mjtConstraint) (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `efc_vel`

```elixir
@spec efc_vel(t()) :: ExMujoco.Tensor.t()
```

`efc_vel` — velocity in constraint space: J*qvel (nefc x 1)

`mjtNum*` in C, `nefc@data` × `1`.

# `efc_Y`

```elixir
@spec efc_Y(t()) :: ExMujoco.Tensor.t()
```

`efc_Y` — whitened Jacobian Y = J*M^(-1/2) (nY x 1)

`mjtNum*` in C, `nY@data` × `1`.

# `efc_Y_colind`

```elixir
@spec efc_Y_colind(t()) :: ExMujoco.Tensor.t()
```

`efc_Y_colind` — column indices in sparse Y (nY x 1)

`int*` in C, `nY@data` × `1`.

# `efc_Y_rowadr`

```elixir
@spec efc_Y_rowadr(t()) :: ExMujoco.Tensor.t()
```

`efc_Y_rowadr` — row start address in Y colind array (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `efc_Y_rownnz`

```elixir
@spec efc_Y_rownnz(t()) :: ExMujoco.Tensor.t()
```

`efc_Y_rownnz` — number of non-zeros in Y row (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `efm_active`

```elixir
@spec efm_active(t()) :: integer()
```

`efm_active` — effective metric M+K: 0 off, 1 on, 2 on with general flex CSR

`int` in C, read as an integer.

# `efm_aid`

```elixir
@spec efm_aid(t()) :: ExMujoco.Tensor.t()
```

`efm_aid` — ids of actuators with terms in the metric (nactuator x 1)

`int*` in C, `nactuator@model` × `1`.

# `efm_ak`

```elixir
@spec efm_ak(t()) :: ExMujoco.Tensor.t()
```

`efm_ak` — actuator stiffness h*gp, aid indexed (nactuator x 1)

`mjtNum*` in C, `nactuator@model` × `1`.

# `efm_as`

```elixir
@spec efm_as(t()) :: ExMujoco.Tensor.t()
```

`efm_as` — actuator metric scale h^2*gp + h*gv, aid indexed (nactuator x 1)

`mjtNum*` in C, `nactuator@model` × `1`.

# `efm_c`

```elixir
@spec efm_c(t()) :: ExMujoco.Tensor.t()
```

`efm_c` — smooth-force shift h*K*qvel (nv x 1)

`mjtNum*` in C, `nv@model` × `1`.

# `efm_ca`

```elixir
@spec efm_ca(t()) :: ExMujoco.Tensor.t()
```

`efm_ca` — actuation-stage smooth-force shift (nv x 1)

`mjtNum*` in C, `nv@model` × `1`.

# `efm_ck`

```elixir
@spec efm_ck(t()) :: ExMujoco.Tensor.t()
```

`efm_ck` — diagonal stiffness h*k, for the smooth shift (nv x 1)

`mjtNum*` in C, `nv@model` × `1`.

# `efm_con_ind`

```elixir
@spec efm_con_ind(t()) :: ExMujoco.Tensor.t()
```

`efm_con_ind` — contact rows, packed [nnz, conid, colind...] (nefmcon x 1)

`int*` in C, `nefmcon@data` × `1`.

# `efm_con_val`

```elixir
@spec efm_con_val(t()) :: ExMujoco.Tensor.t()
```

`efm_con_val` — contact rows, packed [scale, force, val...] (nefmcon x 1)

`mjtNum*` in C, `nefmcon@data` × `1`.

# `efm_diag`

```elixir
@spec efm_diag(t()) :: ExMujoco.Tensor.t()
```

`efm_diag` — effective-metric diagonal h*D + h^2*K (nv x 1)

`mjtNum*` in C, `nv@model` × `1`.

# `efm_dofid`

```elixir
@spec efm_dofid(t()) :: ExMujoco.Tensor.t()
```

`efm_dofid` — block k -> dof address of its vertex triple (nefmdof x 1)

`int*` in C, `nefmdof@data` × `1`.

# `efm_fluid`

```elixir
@spec efm_fluid(t()) :: ExMujoco.Tensor.t()
```

`efm_fluid` — fluid drag blocks in M's sparsity pattern (nC x 1)

`mjtNum*` in C, `nC@model` × `1`.

# `efm_K_colind`

```elixir
@spec efm_K_colind(t()) :: ExMujoco.Tensor.t()
```

`efm_K_colind` — effective-stiffness CSR column indices (nefmK x 1)

`int*` in C, `nefmK@data` × `1`.

# `efm_K_rowadr`

```elixir
@spec efm_K_rowadr(t()) :: ExMujoco.Tensor.t()
```

`efm_K_rowadr` — effective-stiffness CSR row addresses (nv x 1)

`int*` in C, `nv@model` × `1`.

# `efm_K_rownnz`

```elixir
@spec efm_K_rownnz(t()) :: ExMujoco.Tensor.t()
```

`efm_K_rownnz` — effective-stiffness CSR row nonzeros (nv x 1)

`int*` in C, `nv@model` × `1`.

# `efm_K_val`

```elixir
@spec efm_K_val(t()) :: ExMujoco.Tensor.t()
```

`efm_K_val` — effective-stiffness CSR values (nefmK x 1)

`mjtNum*` in C, `nefmK@data` × `1`.

# `efm_L`

```elixir
@spec efm_L(t()) :: ExMujoco.Tensor.t()
```

`efm_L` — packed Cholesky factor of M+K or island lists (nefmL x 1)

`mjtNum*` in C, `nefmL@data` × `1`.

# `efm_sdiag`

```elixir
@spec efm_sdiag(t()) :: ExMujoco.Tensor.t()
```

`efm_sdiag` — diagonal additions to M in the backbone (nv x 1)

`mjtNum*` in C, `nv@model` × `1`.

# `efm_tid`

```elixir
@spec efm_tid(t()) :: ExMujoco.Tensor.t()
```

`efm_tid` — ids of tendons with terms in the metric (ntendon x 1)

`int*` in C, `ntendon@model` × `1`.

# `efm_tk`

```elixir
@spec efm_tk(t()) :: ExMujoco.Tensor.t()
```

`efm_tk` — tendon stiffness h*k for shift, tid indexed (ntendon x 1)

`mjtNum*` in C, `ntendon@model` × `1`.

# `efm_ts`

```elixir
@spec efm_ts(t()) :: ExMujoco.Tensor.t()
```

`efm_ts` — tendon metric scale h^2*k + h*b, tid indexed (ntendon x 1)

`mjtNum*` in C, `ntendon@model` × `1`.

# `energy`

```elixir
@spec energy(t()) :: ExMujoco.Tensor.t()
```

`energy` — potential, kinetic energy

`mjtNum` in C, `2` × `1`.

# `eq_active`

```elixir
@spec eq_active(t()) :: ExMujoco.Tensor.t()
```

`eq_active` — enable/disable constraints (neq x 1)

`mjtBool*` in C, `neq` × `1`.

# `flex_hessian_valid`

```elixir
@spec flex_hessian_valid(t()) :: ExMujoco.Tensor.t()
```

`flex_hessian_valid` — Cartesian stretch Hessian cache is current (nflex x 1)

`mjtBool*` in C, `nflex` × `1`.

# `flexedge_hessian`

```elixir
@spec flexedge_hessian(t()) :: ExMujoco.Tensor.t()
```

`flexedge_hessian` — oriented off-diagonal Hessian blocks (nflexedge x 9)

`mjtNum*` in C, `nflexedge` × `9`.

# `flexedge_J`

```elixir
@spec flexedge_J(t()) :: ExMujoco.Tensor.t()
```

`flexedge_J` — flex edge Jacobian (nJfe x 1)

`mjtNum*` in C, `nJfe` × `1`.

# `flexedge_length`

```elixir
@spec flexedge_length(t()) :: ExMujoco.Tensor.t()
```

`flexedge_length` — flex edge lengths (nflexedge x 1)

`mjtNum*` in C, `nflexedge` × `1`.

# `flexedge_velocity`

```elixir
@spec flexedge_velocity(t()) :: ExMujoco.Tensor.t()
```

`flexedge_velocity` — flex edge velocities (nflexedge x 1)

`mjtNum*` in C, `nflexedge` × `1`.

# `flexelem_aabb`

```elixir
@spec flexelem_aabb(t()) :: ExMujoco.Tensor.t()
```

`flexelem_aabb` — flex element bounding boxes (center, size) (nflexelem x 6)

`mjtNum*` in C, `nflexelem` × `6`.

# `flexelem_krot`

```elixir
@spec flexelem_krot(t()) :: ExMujoco.Tensor.t()
```

`flexelem_krot` — corotated element stiffness (implicit only) (nflexstiffness x 1)

`mjtNum*` in C, `nflexstiffness` × `1`.

# `flexvert_conage`

```elixir
@spec flexvert_conage(t()) :: ExMujoco.Tensor.t()
```

`flexvert_conage` — flex contact age: <0 loaded, >0 steps since (nflexvert x 1)

`int*` in C, `nflexvert` × `1`.

# `flexvert_hessian`

```elixir
@spec flexvert_hessian(t()) :: ExMujoco.Tensor.t()
```

`flexvert_hessian` — symmetric diagonal Hessian blocks (nflexvert x 6)

`mjtNum*` in C, `nflexvert` × `6`.

# `flexvert_lambda`

```elixir
@spec flexvert_lambda(t()) :: ExMujoco.Tensor.t()
```

`flexvert_lambda` — flex contact multiplier (nflexvert x 1)

`mjtNum*` in C, `nflexvert` × `1`.

# `flexvert_xpos`

```elixir
@spec flexvert_xpos(t()) :: ExMujoco.Tensor.t()
```

`flexvert_xpos` — Cartesian flex vertex positions (nflexvert x 3)

`mjtNum*` in C, `nflexvert` × `3`.

# `flg_energypos`

```elixir
@spec flg_energypos(t()) :: integer()
```

`flg_energypos` — has mj_energyPos been called

`mjtBool` in C, read as an integer.

# `flg_energyvel`

```elixir
@spec flg_energyvel(t()) :: integer()
```

`flg_energyvel` — has mj_energyVel been called

`mjtBool` in C, read as an integer.

# `flg_rnepost`

```elixir
@spec flg_rnepost(t()) :: integer()
```

`flg_rnepost` — has mj_rnePostConstraint been called

`mjtBool` in C, read as an integer.

# `flg_subtreevel`

```elixir
@spec flg_subtreevel(t()) :: integer()
```

`flg_subtreevel` — has mj_subtreeVel been called

`mjtBool` in C, read as an integer.

# `geom_xmat`

```elixir
@spec geom_xmat(t()) :: ExMujoco.Tensor.t()
```

`geom_xmat` — Cartesian geom orientation (ngeom x 9)

`mjtNum*` in C, `ngeom` × `9`.

# `geom_xpos`

```elixir
@spec geom_xpos(t()) :: ExMujoco.Tensor.t()
```

`geom_xpos` — Cartesian geom position (ngeom x 3)

`mjtNum*` in C, `ngeom` × `3`.

# `geom_xquat`

```elixir
@spec geom_xquat(t()) :: ExMujoco.Tensor.t()
```

`geom_xquat` — Cartesian geom orientation (ngeom x 4)

`mjtNum*` in C, `ngeom` × `4`.

# `history`

```elixir
@spec history(t()) :: ExMujoco.Tensor.t()
```

`history` — history buffer (nhistory x 1)

`mjtNum*` in C, `nhistory` × `1`.

# `iacc`

```elixir
@spec iacc(t()) :: ExMujoco.Tensor.t()
```

`iacc` — acceleration (nidof x 1)

`mjtNum*` in C, `nidof@data` × `1`.

# `iacc_smooth`

```elixir
@spec iacc_smooth(t()) :: ExMujoco.Tensor.t()
```

`iacc_smooth` — unconstrained acceleration (nidof x 1)

`mjtNum*` in C, `nidof@data` × `1`.

# `iefc_aref`

```elixir
@spec iefc_aref(t()) :: ExMujoco.Tensor.t()
```

`iefc_aref` — reference pseudo-acceleration (nefc x 1)

`mjtNum*` in C, `nefc@data` × `1`.

# `iefc_D`

```elixir
@spec iefc_D(t()) :: ExMujoco.Tensor.t()
```

`iefc_D` — constraint mass (nefc x 1)

`mjtNum*` in C, `nefc@data` × `1`.

# `iefc_force`

```elixir
@spec iefc_force(t()) :: ExMujoco.Tensor.t()
```

`iefc_force` — constraint force in constraint space (nefc x 1)

`mjtNum*` in C, `nefc@data` × `1`.

# `iefc_frictionloss`

```elixir
@spec iefc_frictionloss(t()) :: ExMujoco.Tensor.t()
```

`iefc_frictionloss` — frictionloss (friction) (nefc x 1)

`mjtNum*` in C, `nefc@data` × `1`.

# `iefc_id`

```elixir
@spec iefc_id(t()) :: ExMujoco.Tensor.t()
```

`iefc_id` — id of object of specified type (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `iefc_R`

```elixir
@spec iefc_R(t()) :: ExMujoco.Tensor.t()
```

`iefc_R` — inverse constraint mass (nefc x 1)

`mjtNum*` in C, `nefc@data` × `1`.

# `iefc_state`

```elixir
@spec iefc_state(t()) :: ExMujoco.Tensor.t()
```

`iefc_state` — constraint state (mjtConstraintState) (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `iefc_type`

```elixir
@spec iefc_type(t()) :: ExMujoco.Tensor.t()
```

`iefc_type` — constraint type (mjtConstraint) (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `ifrc_constraint`

```elixir
@spec ifrc_constraint(t()) :: ExMujoco.Tensor.t()
```

`ifrc_constraint` — constraint force (nidof x 1)

`mjtNum*` in C, `nidof@data` × `1`.

# `ifrc_smooth`

```elixir
@spec ifrc_smooth(t()) :: ExMujoco.Tensor.t()
```

`ifrc_smooth` — net unconstrained force (nidof x 1)

`mjtNum*` in C, `nidof@data` × `1`.

# `island_dofadr`

```elixir
@spec island_dofadr(t()) :: ExMujoco.Tensor.t()
```

`island_dofadr` — island start address in dof vector (nisland x 1)

`int*` in C, `nisland@data` × `1`.

# `island_idofadr`

```elixir
@spec island_idofadr(t()) :: ExMujoco.Tensor.t()
```

`island_idofadr` — island start address in idof vector (nisland x 1)

`int*` in C, `nisland@data` × `1`.

# `island_iefcadr`

```elixir
@spec island_iefcadr(t()) :: ExMujoco.Tensor.t()
```

`island_iefcadr` — start address in iefc vector (nisland x 1)

`int*` in C, `nisland@data` × `1`.

# `island_itreeadr`

```elixir
@spec island_itreeadr(t()) :: ExMujoco.Tensor.t()
```

`island_itreeadr` — island start address in itree vector (nisland x 1)

`int*` in C, `nisland@data` × `1`.

# `island_ne`

```elixir
@spec island_ne(t()) :: ExMujoco.Tensor.t()
```

`island_ne` — number of equality constraints in island (nisland x 1)

`int*` in C, `nisland@data` × `1`.

# `island_nefc`

```elixir
@spec island_nefc(t()) :: ExMujoco.Tensor.t()
```

`island_nefc` — number of constraints in island (nisland x 1)

`int*` in C, `nisland@data` × `1`.

# `island_nf`

```elixir
@spec island_nf(t()) :: ExMujoco.Tensor.t()
```

`island_nf` — number of friction constraints in island (nisland x 1)

`int*` in C, `nisland@data` × `1`.

# `island_ntree`

```elixir
@spec island_ntree(t()) :: ExMujoco.Tensor.t()
```

`island_ntree` — number of trees in this island (nisland x 1)

`int*` in C, `nisland@data` × `1`.

# `island_nv`

```elixir
@spec island_nv(t()) :: ExMujoco.Tensor.t()
```

`island_nv` — number of dofs in this island (nisland x 1)

`int*` in C, `nisland@data` × `1`.

# `light_xdir`

```elixir
@spec light_xdir(t()) :: ExMujoco.Tensor.t()
```

`light_xdir` — Cartesian light direction (nlight x 3)

`mjtNum*` in C, `nlight` × `3`.

# `light_xpos`

```elixir
@spec light_xpos(t()) :: ExMujoco.Tensor.t()
```

`light_xpos` — Cartesian light position (nlight x 3)

`mjtNum*` in C, `nlight` × `3`.

# `m`

```elixir
@spec m(t()) :: ExMujoco.Tensor.t()
```

`M` — inertia (sparse) (nC x 1)

`mjtNum*` in C, `nC` × `1`.

# `map_dof2idof`

```elixir
@spec map_dof2idof(t()) :: ExMujoco.Tensor.t()
```

`map_dof2idof` — map from dof to idof (nv x 1)

`int*` in C, `nv@model` × `1`.

# `map_efc2iefc`

```elixir
@spec map_efc2iefc(t()) :: ExMujoco.Tensor.t()
```

`map_efc2iefc` — map from efc to iefc (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `map_idof2dof`

```elixir
@spec map_idof2dof(t()) :: ExMujoco.Tensor.t()
```

`map_idof2dof` — map from idof to dof; >= nidof: unconstrained (nv x 1)

`int*` in C, `nv@model` × `1`.

# `map_iefc2efc`

```elixir
@spec map_iefc2efc(t()) :: ExMujoco.Tensor.t()
```

`map_iefc2efc` — map from iefc to efc (nefc x 1)

`int*` in C, `nefc@data` × `1`.

# `map_itree2tree`

```elixir
@spec map_itree2tree(t()) :: ExMujoco.Tensor.t()
```

`map_itree2tree` — map from itree to tree (ntree x 1)

`int*` in C, `ntree@model` × `1`.

# `maxuse_arena`

```elixir
@spec maxuse_arena(t()) :: integer()
```

`maxuse_arena` — maximum arena allocation in bytes

`mjtSize` in C, read as an integer.

# `maxuse_con`

```elixir
@spec maxuse_con(t()) :: integer()
```

`maxuse_con` — maximum number of contacts

`int` in C, read as an integer.

# `maxuse_efc`

```elixir
@spec maxuse_efc(t()) :: integer()
```

`maxuse_efc` — maximum number of scalar constraints

`int` in C, read as an integer.

# `maxuse_stack`

```elixir
@spec maxuse_stack(t()) :: integer()
```

`maxuse_stack` — maximum stack allocation in bytes (mutable)

`mjtSize` in C, read as an integer.

# `mocap_pos`

```elixir
@spec mocap_pos(t()) :: ExMujoco.Tensor.t()
```

`mocap_pos` — positions of mocap bodies (nmocap x 3)

`mjtNum*` in C, `nmocap` × `3`.

# `mocap_quat`

```elixir
@spec mocap_quat(t()) :: ExMujoco.Tensor.t()
```

`mocap_quat` — orientations of mocap bodies (nmocap x 4)

`mjtNum*` in C, `nmocap` × `4`.

# `moment_colind`

```elixir
@spec moment_colind(t()) :: ExMujoco.Tensor.t()
```

`moment_colind` — column indices in sparse Jacobian (nJmom x 1)

`int*` in C, `nJmom` × `1`.

# `moment_rowadr`

```elixir
@spec moment_rowadr(t()) :: ExMujoco.Tensor.t()
```

`moment_rowadr` — row start address in colind array (nout x 1)

`int*` in C, `nout` × `1`.

# `moment_rownnz`

```elixir
@spec moment_rownnz(t()) :: ExMujoco.Tensor.t()
```

`moment_rownnz` — number of non-zeros in actuator_moment row (nout x 1)

`int*` in C, `nout` × `1`.

# `nA`

```elixir
@spec nA(t()) :: integer()
```

`nA` — number of non-zeros in constraint inverse inertia matrix

`int` in C, read as an integer.

# `narena`

```elixir
@spec narena(t()) :: integer()
```

`narena` — size of the arena in bytes (inclusive of the stack)

`mjtSize` in C, read as an integer.

# `nbody_awake`

```elixir
@spec nbody_awake(t()) :: integer()
```

`nbody_awake` — number of awake dynamic and static bodies

`int` in C, read as an integer.

# `nbuffer`

```elixir
@spec nbuffer(t()) :: integer()
```

`nbuffer` — size of main buffer in bytes

`mjtSize` in C, read as an integer.

# `ncon`

```elixir
@spec ncon(t()) :: integer()
```

`ncon` — number of detected contacts

`int` in C, read as an integer.

# `ne`

```elixir
@spec ne(t()) :: integer()
```

`ne` — number of equality constraints

`int` in C, read as an integer.

# `nefc`

```elixir
@spec nefc(t()) :: integer()
```

`nefc` — number of constraints

`int` in C, read as an integer.

# `nefmA`

```elixir
@spec nefmA(t()) :: integer()
```

`nefmA` — number of actuators with terms in the metric

`int` in C, read as an integer.

# `nefmcon`

```elixir
@spec nefmcon(t()) :: integer()
```

`nefmcon` — packed length of the contact rank-1 rows

`int` in C, read as an integer.

# `nefmdof`

```elixir
@spec nefmdof(t()) :: integer()
```

`nefmdof` — number of covered vertex triples in the effective metric

`int` in C, read as an integer.

# `nefmK`

```elixir
@spec nefmK(t()) :: integer()
```

`nefmK` — number of non-zeros in effective-stiffness CSR

`int` in C, read as an integer.

# `nefmL`

```elixir
@spec nefmL(t()) :: integer()
```

`nefmL` — size of efm_L (packed Cholesky factor or island lists)

`int` in C, read as an integer.

# `nefmT`

```elixir
@spec nefmT(t()) :: integer()
```

`nefmT` — number of tendons with terms in the metric

`int` in C, read as an integer.

# `nf`

```elixir
@spec nf(t()) :: integer()
```

`nf` — number of friction constraints

`int` in C, read as an integer.

# `nidof`

```elixir
@spec nidof(t()) :: integer()
```

`nidof` — number of dofs in all islands

`int` in C, read as an integer.

# `nisland`

```elixir
@spec nisland(t()) :: integer()
```

`nisland` — number of detected constraint islands

`int` in C, read as an integer.

# `nJ`

```elixir
@spec nJ(t()) :: integer()
```

`nJ` — number of non-zeros in constraint Jacobian

`int` in C, read as an integer.

# `nl`

```elixir
@spec nl(t()) :: integer()
```

`nl` — number of limit constraints

`int` in C, read as an integer.

# `nparent_awake`

```elixir
@spec nparent_awake(t()) :: integer()
```

`nparent_awake` — number of bodies with awake parents

`int` in C, read as an integer.

# `nplugin`

```elixir
@spec nplugin(t()) :: integer()
```

`nplugin` — number of plugin instances

`int` in C, read as an integer.

# `ntree_awake`

```elixir
@spec ntree_awake(t()) :: integer()
```

`ntree_awake` — number of awake trees

`int` in C, read as an integer.

# `nv_awake`

```elixir
@spec nv_awake(t()) :: integer()
```

`nv_awake` — number of awake dofs

`int` in C, read as an integer.

# `nY`

```elixir
@spec nY(t()) :: integer()
```

`nY` — number of non-zeros in constraint inverse inertia square root

`int` in C, read as an integer.

# `parena`

```elixir
@spec parena(t()) :: integer()
```

`parena` — first available byte in arena

`size_t` in C, read as an integer.

# `parent_awake_ind`

```elixir
@spec parent_awake_ind(t()) :: ExMujoco.Tensor.t()
```

`parent_awake_ind` — indices of bodies with awake or static parents (nbody x 1)

`int*` in C, `nbody` × `1`.

# `pbase`

```elixir
@spec pbase(t()) :: integer()
```

`pbase` — value of pstack when mj_markStack was last called (mutable)

`size_t` in C, read as an integer.

# `plastic`

```elixir
@spec plastic(t()) :: ExMujoco.Tensor.t()
```

`plastic` — plastic state (nplastic x 1)

`mjtNum*` in C, `nplastic` × `1`.

# `plugin`

```elixir
@spec plugin(t()) :: ExMujoco.Tensor.t()
```

`plugin` — copy of m->plugin, required for deletion (nplugin x 1)

`int*` in C, `nplugin` × `1`.

# `plugin_state`

```elixir
@spec plugin_state(t()) :: ExMujoco.Tensor.t()
```

`plugin_state` — plugin state (npluginstate x 1)

`mjtNum*` in C, `npluginstate` × `1`.

# `pstack`

```elixir
@spec pstack(t()) :: integer()
```

`pstack` — first available byte in stack (mutable)

`size_t` in C, read as an integer.

# `qacc`

```elixir
@spec qacc(t()) :: ExMujoco.Tensor.t()
```

`qacc` — acceleration (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qacc_smooth`

```elixir
@spec qacc_smooth(t()) :: ExMujoco.Tensor.t()
```

`qacc_smooth` — unconstrained acceleration (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qacc_warmstart`

```elixir
@spec qacc_warmstart(t()) :: ExMujoco.Tensor.t()
```

`qacc_warmstart` — acceleration used for warmstart (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qDeriv`

```elixir
@spec qDeriv(t()) :: ExMujoco.Tensor.t()
```

`qDeriv` — d (passive + actuator - bias) / d qvel (nD x 1)

`mjtNum*` in C, `nD` × `1`.

# `qfrc_actuator`

```elixir
@spec qfrc_actuator(t()) :: ExMujoco.Tensor.t()
```

`qfrc_actuator` — actuator force in joint space (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qfrc_adhesion`

```elixir
@spec qfrc_adhesion(t()) :: ExMujoco.Tensor.t()
```

`qfrc_adhesion` — passive contact adhesion force (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qfrc_applied`

```elixir
@spec qfrc_applied(t()) :: ExMujoco.Tensor.t()
```

`qfrc_applied` — applied generalized force (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qfrc_bias`

```elixir
@spec qfrc_bias(t()) :: ExMujoco.Tensor.t()
```

`qfrc_bias` — C(qpos,qvel) (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qfrc_constraint`

```elixir
@spec qfrc_constraint(t()) :: ExMujoco.Tensor.t()
```

`qfrc_constraint` — constraint force (flag ipc: incl. flex contact) (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qfrc_damper`

```elixir
@spec qfrc_damper(t()) :: ExMujoco.Tensor.t()
```

`qfrc_damper` — passive damper force (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qfrc_fluid`

```elixir
@spec qfrc_fluid(t()) :: ExMujoco.Tensor.t()
```

`qfrc_fluid` — passive fluid force (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qfrc_gravcomp`

```elixir
@spec qfrc_gravcomp(t()) :: ExMujoco.Tensor.t()
```

`qfrc_gravcomp` — passive gravity compensation force (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qfrc_inverse`

```elixir
@spec qfrc_inverse(t()) :: ExMujoco.Tensor.t()
```

`qfrc_inverse` — net external force; should equal:

`mjtNum*` in C, `nv` × `1`.

# `qfrc_passive`

```elixir
@spec qfrc_passive(t()) :: ExMujoco.Tensor.t()
```

`qfrc_passive` — total passive force (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qfrc_smooth`

```elixir
@spec qfrc_smooth(t()) :: ExMujoco.Tensor.t()
```

`qfrc_smooth` — net unconstrained force (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qfrc_spring`

```elixir
@spec qfrc_spring(t()) :: ExMujoco.Tensor.t()
```

`qfrc_spring` — passive spring force (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qH`

```elixir
@spec qH(t()) :: ExMujoco.Tensor.t()
```

`qH` — L'*D*L factorization of modified M (nC x 1)

`mjtNum*` in C, `nC` × `1`.

# `qHDiagInv`

```elixir
@spec qHDiagInv(t()) :: ExMujoco.Tensor.t()
```

`qHDiagInv` — 1/diag(D) of modified M (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qLD`

```elixir
@spec qLD(t()) :: ExMujoco.Tensor.t()
```

`qLD` — L'*D*L factorization of M (sparse) (nC x 1)

`mjtNum*` in C, `nC` × `1`.

# `qLDiagInv`

```elixir
@spec qLDiagInv(t()) :: ExMujoco.Tensor.t()
```

`qLDiagInv` — 1/diag(D) (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `qLU`

```elixir
@spec qLU(t()) :: ExMujoco.Tensor.t()
```

`qLU` — sparse LU of (M - dt*qDeriv) (nD x 1)

`mjtNum*` in C, `nD` × `1`.

# `qpos`

```elixir
@spec qpos(t()) :: ExMujoco.Tensor.t()
```

`qpos` — position (nq x 1)

`mjtNum*` in C, `nq` × `1`.

# `qvel`

```elixir
@spec qvel(t()) :: ExMujoco.Tensor.t()
```

`qvel` — velocity (nv x 1)

`mjtNum*` in C, `nv` × `1`.

# `sensordata`

```elixir
@spec sensordata(t()) :: ExMujoco.Tensor.t()
```

`sensordata` — sensor data array (nsensordata x 1)

`mjtNum*` in C, `nsensordata` × `1`.

# `site_xmat`

```elixir
@spec site_xmat(t()) :: ExMujoco.Tensor.t()
```

`site_xmat` — Cartesian site orientation (nsite x 9)

`mjtNum*` in C, `nsite` × `9`.

# `site_xpos`

```elixir
@spec site_xpos(t()) :: ExMujoco.Tensor.t()
```

`site_xpos` — Cartesian site position (nsite x 3)

`mjtNum*` in C, `nsite` × `3`.

# `site_xquat`

```elixir
@spec site_xquat(t()) :: ExMujoco.Tensor.t()
```

`site_xquat` — Cartesian site orientation (nsite x 4)

`mjtNum*` in C, `nsite` × `4`.

# `solver_fwdinv`

```elixir
@spec solver_fwdinv(t()) :: ExMujoco.Tensor.t()
```

`solver_fwdinv` — forward-inverse comparison: qfrc, efc

`mjtNum` in C, `2` × `1`.

# `solver_niter`

```elixir
@spec solver_niter(t()) :: ExMujoco.Tensor.t()
```

`solver_niter` — number of solver iterations, per island

`int` in C, `mjNISLAND` × `1`.

# `solver_nnz`

```elixir
@spec solver_nnz(t()) :: ExMujoco.Tensor.t()
```

`solver_nnz` — number of nonzeros in solver matrix, per island

`int` in C, `mjNISLAND` × `1`.

# `subtree_angmom`

```elixir
@spec subtree_angmom(t()) :: ExMujoco.Tensor.t()
```

`subtree_angmom` — angular momentum about subtree com (nbody x 3)

`mjtNum*` in C, `nbody` × `3`.

# `subtree_com`

```elixir
@spec subtree_com(t()) :: ExMujoco.Tensor.t()
```

`subtree_com` — center of mass of each subtree (nbody x 3)

`mjtNum*` in C, `nbody` × `3`.

# `subtree_linvel`

```elixir
@spec subtree_linvel(t()) :: ExMujoco.Tensor.t()
```

`subtree_linvel` — linear velocity of subtree com (nbody x 3)

`mjtNum*` in C, `nbody` × `3`.

# `ten_J`

```elixir
@spec ten_J(t()) :: ExMujoco.Tensor.t()
```

`ten_J` — tendon Jacobian (nJten x 1)

`mjtNum*` in C, `nJten` × `1`.

# `ten_length`

```elixir
@spec ten_length(t()) :: ExMujoco.Tensor.t()
```

`ten_length` — tendon lengths (ntendon x 1)

`mjtNum*` in C, `ntendon` × `1`.

# `ten_velocity`

```elixir
@spec ten_velocity(t()) :: ExMujoco.Tensor.t()
```

`ten_velocity` — tendon velocities (ntendon x 1)

`mjtNum*` in C, `ntendon` × `1`.

# `ten_wrapadr`

```elixir
@spec ten_wrapadr(t()) :: ExMujoco.Tensor.t()
```

`ten_wrapadr` — start address of tendon's path (ntendon x 1)

`int*` in C, `ntendon` × `1`.

# `ten_wrapnum`

```elixir
@spec ten_wrapnum(t()) :: ExMujoco.Tensor.t()
```

`ten_wrapnum` — number of wrap points in path (ntendon x 1)

`int*` in C, `ntendon` × `1`.

# `tendon_efcadr`

```elixir
@spec tendon_efcadr(t()) :: ExMujoco.Tensor.t()
```

`tendon_efcadr` — first efc address involving tendon; -1: none (ntendon x 1)

`int*` in C, `ntendon@model` × `1`.

# `threadlock`

```elixir
@spec threadlock(t()) :: integer()
```

`threadlock` — disable stack freeing during threaded execution

`mjtBool` in C, read as an integer.

# `threadpool`

```elixir
@spec threadpool(t()) :: integer()
```

`threadpool` — thread pool pointer

`uintptr_t` in C, read as an integer.

# `time`

```elixir
@spec time(t()) :: float()
```

`time` — simulation time

`mjtNum` in C, read as a float.

# `tree_asleep`

```elixir
@spec tree_asleep(t()) :: ExMujoco.Tensor.t()
```

`tree_asleep` — <0: awake; >=0: index cycle of sleeping trees (ntree x 1)

`int*` in C, `ntree` × `1`.

# `tree_awake`

```elixir
@spec tree_awake(t()) :: ExMujoco.Tensor.t()
```

`tree_awake` — is tree awake; 0: asleep; 1: awake (ntree x 1)

`int*` in C, `ntree` × `1`.

# `tree_island`

```elixir
@spec tree_island(t()) :: ExMujoco.Tensor.t()
```

`tree_island` — island id of this tree; -1: none (ntree x 1)

`int*` in C, `ntree@model` × `1`.

# `userdata`

```elixir
@spec userdata(t()) :: ExMujoco.Tensor.t()
```

`userdata` — user data, not touched by engine (nuserdata x 1)

`mjtNum*` in C, `nuserdata` × `1`.

# `wrap_obj`

```elixir
@spec wrap_obj(t()) :: ExMujoco.Tensor.t()
```

`wrap_obj` — geom id; -1: site; -2: pulley (nwrap x 2)

`int*` in C, `nwrap` × `2`.

# `wrap_xpos`

```elixir
@spec wrap_xpos(t()) :: ExMujoco.Tensor.t()
```

`wrap_xpos` — Cartesian 3D points in all paths (nwrap x 6)

`mjtNum*` in C, `nwrap` × `6`.

# `xanchor`

```elixir
@spec xanchor(t()) :: ExMujoco.Tensor.t()
```

`xanchor` — Cartesian position of joint anchor (njnt x 3)

`mjtNum*` in C, `njnt` × `3`.

# `xaxis`

```elixir
@spec xaxis(t()) :: ExMujoco.Tensor.t()
```

`xaxis` — Cartesian joint axis (njnt x 3)

`mjtNum*` in C, `njnt` × `3`.

# `xfrc_applied`

```elixir
@spec xfrc_applied(t()) :: ExMujoco.Tensor.t()
```

`xfrc_applied` — applied Cartesian force/torque (nbody x 6)

`mjtNum*` in C, `nbody` × `6`.

# `ximat`

```elixir
@spec ximat(t()) :: ExMujoco.Tensor.t()
```

`ximat` — Cartesian orientation of body inertia (nbody x 9)

`mjtNum*` in C, `nbody` × `9`.

# `xipos`

```elixir
@spec xipos(t()) :: ExMujoco.Tensor.t()
```

`xipos` — Cartesian position of body com (nbody x 3)

`mjtNum*` in C, `nbody` × `3`.

# `xiquat`

```elixir
@spec xiquat(t()) :: ExMujoco.Tensor.t()
```

`xiquat` — Cartesian orientation of body inertia (nbody x 4)

`mjtNum*` in C, `nbody` × `4`.

# `xmat`

```elixir
@spec xmat(t()) :: ExMujoco.Tensor.t()
```

`xmat` — Cartesian orientation of body frame (nbody x 9)

`mjtNum*` in C, `nbody` × `9`.

# `xpos`

```elixir
@spec xpos(t()) :: ExMujoco.Tensor.t()
```

`xpos` — Cartesian position of body frame (nbody x 3)

`mjtNum*` in C, `nbody` × `3`.

# `xquat`

```elixir
@spec xquat(t()) :: ExMujoco.Tensor.t()
```

`xquat` — Cartesian orientation of body frame (nbody x 4)

`mjtNum*` in C, `nbody` × `4`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
