Port SyntheticAssemblyGenerator to solver/datagen/generator.py #5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Move
SyntheticAssemblyGeneratorclass fromdata/synthetic/pebble-game.py(L1047-1275) intosolver/datagen/generator.py.Class overview
Generates assembly graphs with known minimal constraint sets for training data. Uses the pebble game to incrementally build assemblies, tracking which constraints are independent at each step.
Methods to port
__init__(seed)— initializes numpy RNGgenerate_chain_assembly(n_bodies, joint_type)— serial kinematic chain (always underconstrained)generate_rigid_assembly(n_bodies)— spanning tree with fixed joints, then relaxes to weaker types while maintaining rigiditygenerate_overconstrained_assembly(n_bodies, extra_joints)— rigid assembly + extra redundant jointsgenerate_training_batch(batch_size, n_bodies_range)— generates labeled training examples with per-joint independence/redundancy flagsRequirements
solver.datagen.types(RigidBody, Joint, JointType)solver.datagen.analysis(analyze_assembly)__all__ = ["SyntheticAssemblyGenerator"]Depends on