Skip to content

Development code for a dry-stone and -timber stacking technique in AR.

License

Notifications You must be signed in to change notification settings

ibois-epfl/augmented-stacking

Repository files navigation

augmented-stacking




Alt

🪨🪨🪨 For more detailed info, have a look at our publication in Construction Robotics titled "Projector‑based augmented stacking framework for irregularly shaped objects" 🪨🪨🪨

Development code for a dry-stone and -timber stacking technique in AR. Augmented Stacking is a CLI software developed and tested on Ubuntu 20.04 LTS.

Augmented Stacking is an augmented system designed to guide inexperienced users through the stacking of complex and irregular geometries. This digital fabrication system was applied to the assembly of one layer of a half-timber dry-stone wall. Augmented Stacking is composed of two components: the stacking algorithm (which calculates the pose for each stone or irregular object fed to the system) and the augmented pipeline to display the information.

For more info contact andrea.settimi@epfl.ch.

To run the code

[00] The software is made to be used with any type of LED projector. Nevertheless you will need a camera ZED2i to work with the current version. The code can be easily adapted to any type of 3D sensor.

[0] The address of your digitized library of digital-twins to assemble need to be replaced in dataset_IO.py, our dataset is here:

# GitHub Raw version of dataset address
URL_MESH_DIR = 'https://raw.githubusercontent.com/ibois-epfl/augmented-stacking-dataset/main/stones/mesh_high_res/'
# Global variable to store the label of the stone
global stone_label
# Loop until a good label is given
while True:
# Ask for user input
stone_label = terminal.user_input('Enter the stone label: \n>>> ')
filename = f'remeshed_high_res_{stone_label}.ply'
url_path = os.path.join(URL_MESH_DIR, filename)
print(f'>>> Downloading the mesh: {filename}')
# Check if the file is already downloaded
if os.path.isfile(filename):
print(f"File {filename} already downloaded")
mesh = o3d.io.read_triangle_mesh(filename)
delete_file(filename)
return filename, mesh
# Download the file and write .ply file
try:
with tqdm.tqdm(unit='A', unit_scale=True, miniters=1, desc=filename) as t:
r = requests.get(url_path, stream=True)
if r.status_code == 404:
terminal.error_print(f"File {filename} not found in the dataset")
continue
else:
total_size = int(r.headers.get('content-length', 0))
block_size = 1024
wrote = 0
with open(filename, 'wb') as f:
for data in r.iter_content(block_size):
wrote = wrote + len(data)
f.write(data)
t.update(len(data))
print(f'\n>>> File {filename} successfully downloaded and imported')
mesh = o3d.io.read_triangle_mesh(filename)
delete_file(filename)
return filename, mesh
except Exception as e:
terminal.error_print(f"Error while downloading {filename}")
terminal.error_print(e)
sys.exit(1)

[1] Install the ZED2i SDK

[2] Run the virtual environment with fish:

source ./venv/bin/activate

[3] Run a calibration and follow the instraction in the console:

python ./calib/calib.py

[4] Run augmented stacking:

python ./augmented_stacking.py

Credits

  • IBOIS, the Laboratory for Timber Construction: Andrea Settimi (PhD researcher, conceptualization, software&hardware development, AR interface design) David Rebiffe (intern, software development) Julien Gamerro (Post-Doc, conceptualization, supervision) Yves Weinand (Lab head, supervision)

  • EESD, the group Earthquake Engineering and Structural Dynamics: Qianqing Wang (PhD researcher, stacking algorithm) Katrin Beyer (Lab head, supervision)

  • Image Analysis Hub, EPFL Center for Imaging: Edwardo Andò (scientist, hardware development, image analysis)

Augmented Stacking was funded by the Cluster ENAC initiative 2021-2022.

How to cite the paper

@article{Settimi2023,
doi = {10.1007/s41693-023-00099-2},
url = {https://doi.org/10.1007/s41693-023-00099-2},
year = {2023},
month = may,
publisher = {Springer Science and Business Media {LLC}},
author = {Andrea Settimi and Qianqing Wang and Edward And{\`{o}} and Julien Gamerro and Katrin Beyer and Yves Weinand},
title = {Projector-based augmented stacking framework for irregularly shaped objects},
journal = {Construction Robotics}
}