We introduce a simple simulation tool to model the dynamics of soft bodies with impacts and friction. A mass-spring method is implemented in Mathworks rigid multibody simulation environment SimMechanics. The “SoftRobot.slx” library available on this page helps to model hybrid systems of soft and rigid bodies to create virtual robots within minutes. The intuitive flowchart like structure of SimMechanics helps to easily build and extend models without prior knowledge of soft body dynamics, while keeping the ability to implement further system properties or more complex physical laws. We suggest users to go through the tutorial presented on this page. It will only take a couple of minutes and will clarify the basic functions of the “SoftRobot.slx” library.


This tutorial gives users a quickstart to the “SoftRobot.slx” library. Download the library in the subsequent link. Please note that your version of Matlab must be more recent than R2012a. You can find useful simulation examples in the “Soft Robot Library/Examples” folder. Click here to download the library.

1. Extract the files in the downloaded “Soft Robot Library” folder and double click on the “SoftRobot.slx” file. It may take a while to start Simmechanics.

2. Now open the “NewModel.slx” file, located in the “Soft Robot Library” folder. This will automatically initialise the parameters in the “SoftParameters.m” file. If you wish to create a new model yourself, make sure to run this file before running the simulations.

3. Every simulation starts with the three main blocks “Solver Configuration”, “World Frame”, and “Mechanism”. They are already located in the “NewModel.slx” file.


4. Drag and drop a ground block from the “SoftRobotics.slx” library to the “NewModel.slx” and connect as shown in the figure above.

5. The first element that is attached to the ground must be labelled with the appendix “(initial)”. Add and connect a “SoftElement (Initial)” element as depicted in the figure below.


6. Any element which is connected to another element must be labelled with the appendix “(Follower)”, i.e. “SoftElement (Follower)”. Add three follower elements to the system according to the figure below.


7. Start the simulation by clicking the Run button.

8. Change the relative position of the second element to the third element by double clicking on the third element and then double clicking the “Element Centre” block. Change the values in the translation offset according to the figure below. Run the simulation again and observe the result.


9. Add a tendon force between the initial and the last follower element as shown in the figure below. To do this, drag and drop the “TendonForce Direction” to the current file and connect accordingly


10. Tendon forces can be applied to arbitrary positions on the element relative to the centre of mass. To change the position open the according element by double clicking on it and change the value of the translation offset in the force attachment point block (similar procedure to step 8).

11. Change geometrical and physical parameters like e.g. tendon forces for the simulation in the “SoftParameter.m” file in the “Soft Robot Library” folder and observe how they influence the simulation.