Skip to content

Add reproducible observation/action/metadata stream#153

Open
tomasz-lewicki wants to merge 3 commits into
mainfrom
feature/reproducible-observation-stream
Open

Add reproducible observation/action/metadata stream#153
tomasz-lewicki wants to merge 3 commits into
mainfrom
feature/reproducible-observation-stream

Conversation

@tomasz-lewicki

@tomasz-lewicki tomasz-lewicki commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Publishes the exact policy inputs and outputs so an inference step can be replayed offline from a recording alone.

API change

New/changed Outputs (holosoma_service README):

Topic Type Description Rate
/holosoma/observation Observation.msg Raw observation vector (actor_obs) fed to the policy this tick; sliceable by name via the schema on /holosoma/policy_metadata. header.stamp is robot time; source_stamp carries the teleop-input stamp of the consumed CmdDense. Tagged with wandb_id. Policy Rate (typ. 50Hz)
/holosoma/action Action.msg Raw policy output (pre-scale network action) this tick. Shares header.stamp + source_stamp with the paired /holosoma/observation. Tagged with wandb_id. Policy Rate (typ. 50Hz)
/holosoma/policy_metadata PolicyMetadata.msg Everything needed to reproduce the obs→action→command chain offline: observation-term schema (JSON), policy_action_scale, default_dof_angles, dof_names, wandb_id. Latched (transient-local), published once per policy activation. On start + policy swap
/holosoma/holosoma_executed_cmd JointState.msg Executed joint command, always full 29-DoF. Deprecated — use /holosoma/action. Policy Rate (typ. 50Hz)

tomasz-lewicki and others added 3 commits July 4, 2026 13:27
Publish the exact policy inputs and outputs so an inference step can be
replayed offline from a recording alone. BasePolicy gains a
get_observation_terms() schema (term -> slice map, mirroring the observation
concat order) and a per-inference telemetry hook; the service node uses these
to publish /holosoma/observation (raw obs vector) and /holosoma/action (raw
pre-scale policy output) at control rate, plus a latched /holosoma/policy_metadata
carrying the schema, action scale, default joint angles, and joint names. Each
sample is tagged with the model's run id (resolved from the launch path or the
identifier stamped into the ONNX metadata at export), and the metadata is
re-published on policy swaps so every sample keys to the schema that describes
it. The legacy executed-command topic is marked deprecated in favor of
/holosoma/action.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Note that /holosoma/dense_tracking_command is produced by either a client or
the retargeter, and that the dense target is already embedded tick-exact in
/holosoma/observation so it need not be recorded separately for policy replay.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a source_stamp field to Observation.msg and Action.msg carrying the
teleop-input stamp of the CmdDense frame each tick consumed, so recorded
obs/action can be matched back to the source teleop log while header.stamp
stays robot time (used to align with other robot-time streams). The service
node stashes the consumed frame's stamp in _dense_cb and emits it on both
messages; the retargeter now forwards the source stamp onto CmdDense instead
of overwriting it with production time, so matching works on both the dense
client and SMPL-H input paths. Under hold-last-frame the same source_stamp
repeats, which reflects what the policy actually consumed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant