Skip to content

Unify WBT into policy_service_node; retire holosoma_node#132

Merged
tomasz-lewicki merged 2 commits into
dev/tomasz/tracker_servicefrom
dev/kingbrnd/unify-wbt-service-node
Jun 24, 2026
Merged

Unify WBT into policy_service_node; retire holosoma_node#132
tomasz-lewicki merged 2 commits into
dev/tomasz/tracker_servicefrom
dev/kingbrnd/unify-wbt-service-node

Conversation

@kingb

@kingb kingb commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Makes the Variant B service node (policy_service_node) the single entrypoint for both locomotion and WBT, and removes the separate holosoma_node. This is the unified entrypoint we deferred when picking Variant B in #128/#129.

Builds on #124 (dev/tomasz/tracker_service) — base this branch, not main.

How it works

Most of the WBT path already worked through Variant B: WholeBodyTrackingPolicy honors _target_source attribute injection (set post-build, read only at runtime in rl_inference()), and ServiceIONode already subscribes CmdDense + serves get_target(). The one gap was policy resolution — the node resolved via core _select_policy_class, which didn't honor config.task.policy_type / the holosoma.policies.by_type entry-point group.

Changes

  • dual_mode._select_policy_class — resolve config.task.policy_type against the holosoma.policies.by_type entry-point group before the existing robot_type/motion_command heuristic. Additive and generic: core reads an optional policy_type via getattr and resolves classes by string through the entry-point group, so it never imports or hardcodes any policy class.
  • teleop_with_holosoma_policy.launch.py — drive policy_service_node (was holosoma_node); keep the input_type:=smplh|dense selector + conditional retargeter; expose the velocity_input/state_input/interface/domain_id/node_name knobs.
  • Delete holosoma_node.py + its console_scripts entry. Its dense TargetSource behavior already lives in ServiceIONode (_attach_target_source).
  • Tests — resolution-order coverage for _select_policy_class; _attach_target_source/_iter_policies coverage (ROS-guarded so it skips off-container). Docs/diagram updated.

Testing

  • ruff + ruff-format: clean.
  • pytest src/holosoma_inference/.../test_select_policy_class.py: 6/6 pass (real package). Service-node attach test skips off-ROS (runs in the inference CI container).

Make the Variant B service node (policy_service_node) the single entrypoint
for both locomotion and WBT, and remove the separate holosoma_node.

- dual_mode._select_policy_class: resolve config.task.policy_type via the
  holosoma.policies.by_type entry-point group before the robot_type/obs
  heuristic. Additive and generic -- core reads an optional policy_type via
  getattr and resolves classes by string, so it never imports or names
  extension-private policy classes. This lets the service node resolve
  extension WBT presets identically to the standalone run_policy path.
- teleop_with_holosoma_policy.launch.py: drive policy_service_node (was
  holosoma_node), keep the smplh/dense input_type + conditional retargeter,
  and expose the velocity/state/interface/domain/node-name knobs.
- Delete holosoma_node.py and its console_scripts entry; the dense TargetSource
  path it provided already exists in ServiceIONode (subscribes CmdDense, serves
  get_target(), attaches via _attach_target_source).
- Tests: resolver resolution-order coverage; service-node attach/iter coverage
  (ROS-guarded). Docs/diagram updated.
@kingb kingb requested a review from tomasz-lewicki June 24, 2026 00:16
Local ruff (0.15.8) grouped first-party holosoma_* imports with third-party;
CI's pinned ruff sorts them into a separate first-party block. Import-order
only, no behavior change.
@kingb kingb requested a review from Kedaro June 24, 2026 01:22
@tomasz-lewicki tomasz-lewicki merged commit d446dd1 into dev/tomasz/tracker_service Jun 24, 2026
9 checks passed
@kingb kingb deleted the dev/kingbrnd/unify-wbt-service-node branch June 24, 2026 16:59
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.

2 participants