unilab.base.entity.EntityData¶
- class unilab.base.entity.EntityData[source]¶
Bases:
objectHot-path NumPy state surface backed by cached backend IDs.
- Parameters:
backend (
SimBackend)entity_name (
str)backend_type (
str)state_read_cache (
_EntityStateReadCache)
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
Read-only per-environment default joint positions.
Read-only zero default velocities from the UniLab reset contract.
Read-only 13-D community root state for every environment.
Mutable per-environment joint encoder bias used by position actions.
Read-only world-frame unit gravity vector for every environment.
Root yaw in the world frame, derived from the backend quaternion view.
Joint positions with the manager-owned encoder bias applied.
Unit gravity vector projected into the root link frame.
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:
backend (
SimBackend)entity_name (
str)backend_type (
str)state_read_cache (
_EntityStateReadCache)
- 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.
- body_link_pos_w_rows(env_ids)[source]¶
Row-scoped variant of body_link_pos_w for partial-reset rebuilds.
- body_link_quat_w_rows(env_ids)[source]¶
Row-scoped variant of body_link_quat_w for partial-reset rebuilds.
- body_link_lin_vel_w_rows(env_ids)[source]¶
Row-scoped variant of body_link_lin_vel_w for partial-reset rebuilds.
- body_link_ang_vel_w_rows(env_ids)[source]¶
Row-scoped variant of body_link_ang_vel_w for partial-reset rebuilds.
- 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.