Starting with the SoftRobots plugin & SOFA

Our contribution is relying on the SOFA framework (www.sofa-framework.org). SOFA is an open-source project dedicated to real-time simulation of soft tissues for medical simulation that implements a wide range of mechanical models as well as numerical solvers and associated tools. As our approach requires precise mechanical modeling of the soft robots we implement it as SOFA plugin called SoftRobots.

SOFA is a rather complex piece of software to install but we provide a virtual machine image that embeds a version of the software ready for use. The image can then be executed on operating systems like Windows, MacOS and Linux with free tools such as VirtualBox.

Download & Install

Minimal specification: 2.5 GB of free space on your hard drive, 2 GB of RAM and a multi-core CPU.
You need to download:

Then you simply need to start VirtualBox and go to File → Import Appliance to select the file sofa4softrobot.ova. The virtual machine then emulates a Linux system based on the resources of your computer. After a few seconds, you should see this following desktop screen:


Important notes

  • Using a virtual machine image impacts the performance of the software. Therefore, performance of our approach shouldn’t be evaluated using this virtualized version of SOFA whose aim is an easy discovery of our tool. If performance is a key factor for your project, please consider compiling a complete version of sofa for your system, as described in: https://www.sofa-framework.org/download/ and contact us to get the sources of the soft-robot plugin.
  • Because of the virtualization of USB connection it is not simple to ship a generic virtual machine version of our framework that can control physical robots. Nevertheless upon request, we can provide a specific version of the image where this functionality is activated.
  • Note that the VM considers an US keyboard.
  • If the interaction with the mouse does not work properly or if you have big issues with performance (we found this problem with some configurations on MacOS) you may need to activate the "Settings/Display/Video/Enable 3D Acceleration" option. However, with this configurations you may encounter some z-order artefacts between the windowsand the 3D viewport. So by default, don't activate this option. 



Hand on the SOFA GUI


To test the examples, you first need to start SOFA. The following window should appear once it is launched. It contains the default SOFA scene with which you can interact to have a first look at the capabilities of the software.

caduceus.png



To start the simulation, you need to press the “Animate” button (top left of the screen).
To control the position and orientation of the camera used to render the 3d visualization, you need to use:

  • left-click to rotate the camera
  • right-click to translate the camera
  • middle-click to zoom-in/zoom-out.

A running simulation can be interactively manipulated with the mouse. To do so, you need to hold the SHIFT key and left-click on a mechanical element in the 3D view that you can then control through the motion of your mouse. In the particular case of this scene, you can also control the motion of the orange sphere (representing the desired position of the effector) and let the inverse simulation computes the force to be applied on the cables to follow the desired position.

On the left side of the interface, you can see a hierarchical representation of the scene modeled. In SOFA, the modeling is done through a hierarchical structure called SceneGraph. Nodes of this scene graph allow to describe entities and can contain specific components. The Scene is described either in an XML or a Python file.

To open a new file you can go through the “File → Open” Menu (Ctrl+O), and run it by simply pressing the “Animate” button. You can find several examples of soft robot modelings in the soft-robot example directory. Some of them use XML to describe the model and have a .scn extension while others rely on a programmatic description made with the Python language and have a .py extension.

You are now ready to try the different examples we are providing by clicking on the shortcut available on the desktop or by manually loading them using the SOFA GUI. The examples description is also available with video at the following adress: http://sandbox.softroboticstoolkit.com/book/examples-features-softrobots-plugin

For more information about SOFA, you can read: "SOFA: A Multi-Model Framework for Interactive Physical Simulation" (https://hal.inria.fr/hal-00681539).