(Last update: May 28, 2024)
This code is for simultaneous optimization of the structure and self-actuation of soft robots using the 4D topology optimization.
python 3.9.17
taichi 1.6.0
numpy 1.25.2
numpy-ml 0.1.2
matplotlib 3.7.2
pyevtk 1.6.0
pyyaml 6.0.1
Taichi only supports Python ver. 3.7/3.8/3.9/3.10.
Environment under Anaconda for Windows is tested. Below is an example of the installation commands.
conda create -n 4dto_env python=3.9
activate 4dto_env
python -m pip install taichi==1.6.0
python -m pip install jupyter notebook==6.4.12
python -m pip install matplotlib
python -m pip install numpy-ml==0.1.2
python -m pip install pyevtk
python -m pip install pyyaml
(For jupyter notebook users) If jupyter notebook does not work, please execute the following.
pip uninstall traitlets
python -m pip install traitlets==5.9.0
Run "4dtopopt.py."
python 4dtopopt.py
Running the code opens a window that displays the animation of the soft body's movement at every iteration in real time.
Optimization results can be visualized conveniently using, e.g., Paraview with the following output VTK files.
4dtopopt > hist > vtk > particle_iter****.vtu
: Visualization of changes in the structure and actuator layout over iterations
4dtopopt > iter**** > vtk > particle*****.vtu
: Visualization of the structure, actuator layout, time-varying actuation, and movement at each iteration (output every 50 iterations by default)
https://youtu.be/sPY2jcAsNYs?si=muQL6DyJmcPshzLe
If you find our paper or this code useful or relevant to your work please consider citing us.
C. Yuhn, Y. Sato, H. Kobayashi, A. Kawamoto, T. Nomura, 4D topology optimization: Integrated optimization of the structure and self-actuation of soft bodies for dynamic motions, Computer Methods in Applied Mechanics and Engineering 414 (2023) 116187, https://doi.org/10.1016/j.cma.2023.116187.
In bibtex format:
@article{yuhn20234d,
title={4D topology optimization: Integrated optimization of the structure and self-actuation of soft bodies for dynamic motions},
author={Yuhn, Changyoung and Sato, Yuki and Kobayashi, Hiroki and Kawamoto, Atsushi and Nomura, Tsuyoshi},
journal={Computer Methods in Applied Mechanics and Engineering},
volume={414},
pages={116187},
year={2023},
publisher={Elsevier},
doi={10.1016/j.cma.2023.116187}
}
This project is licensed under the Apache License Version 2.0.
The portion of this code pertaining to the physical simulation of soft bodies using the material point method has been adapted from the Taichi sample code "mpm3d.py," which is provided under the Apache 2.0 license.
The original code has been modified for this project, including the replacement of the material model with a neo-Hookean hyperelastic solid model, as well as various minor additions and modifications.