unilab.base.entity.EntityData

class unilab.base.entity.EntityData[source]

Bases: object

Hot-path NumPy state surface backed by cached backend IDs.

Parameters:

Methods

__init__(backend, *, root_body_ids, ...)

body_link_ang_vel_w_rows(env_ids)

Row-scoped variant of body_link_ang_vel_w for partial-reset rebuilds.

body_link_lin_vel_w_rows(env_ids)

Row-scoped variant of body_link_lin_vel_w for partial-reset rebuilds.

body_link_pos_w_rows(env_ids)

Row-scoped variant of body_link_pos_w for partial-reset rebuilds.

body_link_quat_w_rows(env_ids)

Row-scoped variant of body_link_quat_w for partial-reset rebuilds.

write_ctrl(values[, env_ids, actuator_ids])

Write entity-local actuator controls into the env-owned control buffer.

Attributes

actuator_ctrl_range

body_link_ang_vel_w

body_link_lin_vel_w

body_link_pos_w

body_link_pose_w

body_link_quat_w

body_link_vel_w

default_joint_pos

Read-only per-environment default joint positions.

default_joint_vel

Read-only zero default velocities from the UniLab reset contract.

default_root_state

Read-only 13-D community root state for every environment.

encoder_bias

Mutable per-environment joint encoder bias used by position actions.

gravity_vec_w

Read-only world-frame unit gravity vector for every environment.

heading_w

Root yaw in the world frame, derived from the backend quaternion view.

joint_pos

joint_pos_biased

Joint positions with the manager-owned encoder bias applied.

joint_vel

projected_gravity_b

Unit gravity vector projected into the root link frame.

root_link_ang_vel_b

root_link_ang_vel_w

root_link_lin_vel_b

root_link_lin_vel_w

root_link_pos_w

root_link_pose_w

root_link_quat_w

root_link_vel_w

soft_joint_pos_limits

Read-only joint position limits in the declared entity joint order.

__init__(backend, *, root_body_ids, joint_pos_ids, joint_vel_ids, default_root_state, default_root_state_error, default_joint_pos, default_joint_vel, soft_joint_pos_limits, gravity_vec_w, body_ids, actuator_ids, actuator_ctrl_range, control_buffer, entity_name, backend_type, state_read_cache)[source]
Parameters:
property heading_w: ndarray

Root yaw in the world frame, derived from the backend quaternion view.

property projected_gravity_b: ndarray

Unit gravity vector projected into the root link frame.

property gravity_vec_w: ndarray

Read-only world-frame unit gravity vector for every environment.

property default_root_state: ndarray

Read-only 13-D community root state for every environment.

property joint_pos: ndarray
property joint_vel: ndarray
property joint_pos_biased: ndarray

Joint positions with the manager-owned encoder bias applied.

property default_joint_pos: ndarray

Read-only per-environment default joint positions.

property default_joint_vel: ndarray

Read-only zero default velocities from the UniLab reset contract.

property soft_joint_pos_limits: ndarray

Read-only joint position limits in the declared entity joint order.

property encoder_bias: ndarray

Mutable per-environment joint encoder bias used by position actions.

Row-scoped variant of body_link_pos_w for partial-reset rebuilds.

Parameters:

env_ids (ndarray)

Return type:

ndarray

Row-scoped variant of body_link_quat_w for partial-reset rebuilds.

Parameters:

env_ids (ndarray)

Return type:

ndarray

Row-scoped variant of body_link_lin_vel_w for partial-reset rebuilds.

Parameters:

env_ids (ndarray)

Return type:

ndarray

Row-scoped variant of body_link_ang_vel_w for partial-reset rebuilds.

Parameters:

env_ids (ndarray)

Return type:

ndarray

property actuator_ctrl_range: ndarray
write_ctrl(values, env_ids=None, *, actuator_ids=None)[source]

Write entity-local actuator controls into the env-owned control buffer.

This is an in-memory scene write, analogous to the pinned manager runtime’s entity target buffers. Physics remains owned by NpEnv/SimBackend; this method never steps or calls a backend-private API.

Parameters:
Return type:

None