Port analyze_assembly to solver/datagen/analysis.py #4

Closed
opened 2026-02-02 19:32:27 +00:00 by forbes · 0 comments
Owner

Summary

Move the analyze_assembly() function from data/synthetic/pebble-game.py (L933-1039) into solver/datagen/analysis.py.

Function overview

analyze_assembly() is the combined analysis entry point that runs both the pebble game (combinatorial) and Jacobian verification (numerical) on an assembly, returning a ConstraintAnalysis result.

Key behavior:

  • Optionally grounds a body by adding a virtual ground body (id=-1) with a fixed joint
  • Runs the pebble game incrementally over all joints
  • Builds and analyzes the constraint Jacobian
  • Computes geometric degeneracy count (combinatorial independent - Jacobian rank)
  • Determines rigidity and minimal rigidity

Requirements

  • Import from solver.datagen.types (RigidBody, Joint, JointType, ConstraintAnalysis)
  • Import from solver.datagen.pebble_game (PebbleGame3D)
  • Import from solver.datagen.jacobian (JacobianVerifier)
  • Full type annotations
  • No behavioral changes
  • __all__ = ["analyze_assembly"]

Depends on

  • #1 (shared types)
  • #2 (PebbleGame3D)
  • #3 (JacobianVerifier)
## Summary Move the `analyze_assembly()` function from `data/synthetic/pebble-game.py` (L933-1039) into `solver/datagen/analysis.py`. ## Function overview `analyze_assembly()` is the combined analysis entry point that runs both the pebble game (combinatorial) and Jacobian verification (numerical) on an assembly, returning a `ConstraintAnalysis` result. Key behavior: - Optionally grounds a body by adding a virtual ground body (id=-1) with a fixed joint - Runs the pebble game incrementally over all joints - Builds and analyzes the constraint Jacobian - Computes geometric degeneracy count (combinatorial independent - Jacobian rank) - Determines rigidity and minimal rigidity ## Requirements - [ ] Import from `solver.datagen.types` (RigidBody, Joint, JointType, ConstraintAnalysis) - [ ] Import from `solver.datagen.pebble_game` (PebbleGame3D) - [ ] Import from `solver.datagen.jacobian` (JacobianVerifier) - [ ] Full type annotations - [ ] No behavioral changes - [ ] `__all__ = ["analyze_assembly"]` ## Depends on - #1 (shared types) - #2 (PebbleGame3D) - #3 (JacobianVerifier)
forbes added the phase:1port labels 2026-02-02 19:32:27 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/solver#4