SofaDefrost / SoftRobots.DesignOptimization

Open Source Framework directed towards Design Optimization of Soft Robots using SOFA
GNU Affero General Public License v3.0
6 stars 6 forks source link

Soft Robots Design Optimization Toolbox using SOFA Framework for Simulation

SOFA

This software toolkit contains components for exploring parametric design of any SOFA scene. We provide a unified framework for implementing a single parametric Sofa scene and use it both for multi-objective design optimization and model-based control.

This toolkit is provided with the example of the optimization of a soft finger parametric design. This example illustrates how to couple heuristic search and automatic mesh generation for efficiently exploring the soft finger geometry. We also introduce scripts for automatically generating the molds necessary for manufacturing a given design.

More examples will be available in the future.

Table of Contents

  1. Installation
  2. Quick Start
    1. Baseline Simulation
    2. Sensitivity Analysis
    3. Design Optimization
    4. Simulating Results from Optimization
  3. Examples
    1. Tutorial for Creating Parametric Designs with Gmsh
    2. Design Optimization of a Sensorized Finger
    3. Design Optimization of a Contact-Aided Manipulator
  4. Known Issues
  5. Citing

Installation

Python requirements

Python3 is needed to make use of toolbox. The required basic python libraries can be installed with the following bash command:

pip install pathlib importlib numpy logging plotly

Additionally, the provided example expects an installation of the following libraries:

Both this libraries can be installed using the following bash command:

pip install gmsh==4.11.1 optuna==2.10.0

SOFA and mandatory plugins

This toolbox was tested with the SOFA v22.12 installation. The following plugins are mandatory:

Please refer to the following tutorial for a complete overview of the installation process.

Quick Start

Soft Robot Modeling for Design Optimization

A soft robot model is described through a set of different scripts:

User Interface

In this section we introduce the main commands for using the toolbox with the SensorFinger example. For testing these commands, first open a command prompt in the project directory, then type the command provided bellow. A list of all available commands can be read in the main.py file.

Testing a baseline SOFA scene

For running a parametric scene without optimization, the following command is available:

python3 main.py -n SensorFinger -op 0 -sd -so ba 

Sensitivity Analysis

Running a sensitivity analysis for measuring the local impact of each design variable on the optimization objectives is performed through:

python3 main.py -n SensorFinger -op 0 -sa -nsa 2

Design Optimization

Design optimization of a parametric design is launched using:

python3 main.py -n SensorFinger -op 0 -o -ni 100

Multithreading Feature

To start a multithreaded design optimization, simply run the design optimizaiton command in several different terminals. The number of design optimization iterations "ni" provided is then the number of iterations for each process.

Simulate a Design obtained through Optimization

For selecting and visualizing any design encountered during design optimization in the SOFA GUI, consider the following command:

python3 main.py -n SensorFinger -op 0 -sd -so fo

Once launched, a command prompt will ask you the id of the design to simulate.

Examples

Gmsh Tutorial for Parametric Construction of a Deformable Pawn with Accordion Structure and Internal Cavity

In the folder "GmshTutorial" there is a tutorial explaining step-by-step how a parametric design can be implemented with Gmsh using the Python 3 bindings. In the same subfolder, there is a more detailed README about the tutorial. The following are some images extracted from design generation steps and SOFA simulation from the aforementioned tutorial:

Design Optimization of a Sensorized Finger

The Sensorized Finger is a cable-actuated soft finger with pneumatic chambers located at the joints. These chambers are used as sensors. The measurement of their volume change enables finding the Sensorized Finger actuation state through inverse modeling. The robot parameterization as well as our results are described in this article. We also provide scripts for automatic mold generation for manufacturing any optimized robot.

Alt text

As the work on the toolbox is still in progress, there may be slight changes with the results from the article.

Design Optimization of the Tripod Finger, a Contact-Aided Manipulator

The Contact-Aided Manipulator is composed of three soft fingers actuated by one servomotor each. The aim is to make use of localized self-contacts for better energy consumption and grasping performances. The robot parameterization as well as our results are described in this article.

Alt text

Known Issues

During the exploration of design parameters, it is possible that no meshes can be created by Gmsh. In fact, it is possible that the call to Gmsh will not automatically terminate. In this case, the whole optimization loop will be stalled, making it necessary to abort and restart or to keep the partial results only. We are currently working on fixing this issue.

Citing

If you use the project in your work, please consider citing it with:

@misc{navarro2023open,
      title={An Open Source Design Optimization Toolbox Evaluated on a Soft Finger}, 
      author={Stefan Escaida Navarro and Tanguy Navez and Olivier Goury and Luis Molina and Christian Duriez},
      year={2023},
      journal={IEEE Robotics and Automation Letters},
      volume={8},
      number={9},
      pages={6044--6051},
      publisher={IEEE},
      doi={10.1109/LRA.2023.3301272},
}