intelligent-control-lab / StableLego

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StableLego

This repo contains the implementation of estimating the structural stability of block stacking assembly.

Dependencies

  • Gurobi
  • Numpy
  • Matplotlib

Assembly Definition

Each assembly design is defined in a json file. Each step includes the brick x, y, z positions and orientation, along with the brick id, which is defined in the lego_library.json. Examples of Lego designs are available in ./test_lego/.

Examples of Structural Stabiliby Analysis

image image image image image image image image image image image image

Top-left to top-right: 19-level stairs; 20-level stairs that collapses; improved 20-level stairs; a stick with 2 loads; a collapsing stick with 3 loads; a stable stick with 3 loads. Bottom: stability analysis of the corresponding Lego structure. Black: more stable. Red: higher internal stress. White: collapsing bricks.

Dataset

The StableLego dataset is available at here.

Each object in StableLego has

  • vox.npy: the voxel representation of the object in a 3D matrix form.
  • task_graph.json: the Lego assembly design of the object.
  • stability_score.npy: the stability analysis result of the object with the given Lego layout design.
  • vis.png: the visualization of the stability score.

image

Examples of stable Lego structures in StableLego. Top: original object. Middle: stability analysis of the Lego layout. Bottom: Lego assembly in real.

image

Examples of unstable Lego structures in StableLego. Top: original object. Middle: stability analysis of the Lego layout. Bottom: Lego assembly in real.

Execution

  1. Configurate the config file ./config.json.
    • Set Lego_fname to the desired assembly design file name.
    • Visualize_Analysis: set to 1 if you want to visualize the analysis result.
    • Print_Log: set to 1 if you want to print out the solver log.
  2. python3 stability_analysis.py.

Extensions

The stability analysis can be extended to account for external loads.

image image image image

Citation

If you find this repository helpful, please kindly cite our work.

@article{liu2024stablelego,
  title={StableLego: Stability Analysis of Block Stacking Assembly},
  author={Liu, Ruixuan and Deng, Kangle and Wang, Ziwei and Liu, Changliu},
  journal={arXiv preprint arXiv:2402.10711},
  year={2024}
}

License

This project is licensed under the MIT License.

About

License:MIT License


Languages

Language:Python 100.0%