Skip to content

Expand the xacro tests over every backend - #17

Merged
T-K-233 merged 2 commits into
mainfrom
refactor/clean-code-organization
Aug 25, 2026
Merged

Expand the xacro tests over every backend#17
T-K-233 merged 2 commits into
mainfrom
refactor/clean-code-organization

Conversation

@T-K-233

@T-K-233 T-K-233 commented Aug 24, 2026

Copy link
Copy Markdown
Member

The expansion test and the CI loop both ran with default args, which select mock hardware. The real backend is the one that emits a <ros2_control> block per bus — three for lite_biped against mock's one — so every hardware bring-up depended on a macro that nothing exercised.

  • Parametrise test_xacro_expands_and_check_urdf over all four (use_mock_hardware, sim_mujoco) selections, and do the same in the CI loop. 24 expansions now check out where 7 did.
  • Add test_real_backend_emits_one_block_per_bus, asserting one block per bus plus one per sensor, with distinct component names. Negative-controlled: forcing a duplicate component name fails it.
  • Drop the mesh_root:= override from both. The assembly never declares mesh_root as an arg, so xacro silently ignored it — the test comment claiming it avoided needing an installed ament workspace was false. The test passes only because check_urdf never resolves package://.

Paired with Berkeley-Humanoids/humanoid_control_ros2#38.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EotyWG9YmYvg5xE2v3Zkpt

T-K-233 and others added 2 commits August 22, 2026 21:32
The docstring states why each spelling is rejected, which is what the
assertions check. That the names once differed is not part of it.
The expansion test and the CI loop both ran with default args, which select
mock hardware. The real backend is the one that emits a <ros2_control> block
per bus -- three for lite_biped against mock's one -- so every hardware
bring-up depended on a macro that nothing exercised.

Parametrise over all four (use_mock_hardware, sim_mujoco) selections and add a
test asserting the real backend emits one block per bus plus one per sensor,
with distinct component names. Drop the mesh_root override from both: xacro
ignores it, because the assembly never declares it as an arg.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EotyWG9YmYvg5xE2v3Zkpt
@T-K-233
T-K-233 merged commit 4949767 into main Aug 25, 2026
2 checks passed
@T-K-233
T-K-233 deleted the refactor/clean-code-organization branch August 25, 2026 03:14
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