Add reproducible observation/action/metadata stream#153
Open
tomasz-lewicki wants to merge 3 commits into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_serviceREADME):/holosoma/observationObservation.msgactor_obs) fed to the policy this tick; sliceable by name via the schema on/holosoma/policy_metadata.header.stampis robot time;source_stampcarries the teleop-input stamp of the consumedCmdDense. Tagged withwandb_id./holosoma/actionAction.msgheader.stamp+source_stampwith the paired/holosoma/observation. Tagged withwandb_id./holosoma/policy_metadataPolicyMetadata.msgpolicy_action_scale,default_dof_angles,dof_names,wandb_id. Latched (transient-local), published once per policy activation./holosoma/holosoma_executed_cmdJointState.msg/holosoma/action.