Skip to content

Repository files navigation

EPFL SoftRobotics Lab

The SoftRobotics Lab provides an introduction to the concept of model-based design (MBD). In a nutshell, MBD is an engineering approach that uses models to design, simulate, and verify systems before physical prototypes are built. Typical tasks include the mechanical modelling, optimization of design parameters using simulation and development of controls. Having accurate computational models facilitates that prototypes and final products satisfy design criteria and behave as intended.

In this lab we will use a digital model of a ballon based, tendon driven soft robot and assess how design parameters such as ballon length and excitation modes affect the propulsion of the robot. The instructions in this repository further allow to build the robot hardware to compare the simulation results with the real world.

Introduction to the Robot

The robot hardware used in this repository is depicted in the figure below. It consists of several 3d printed parts, such as legs, which are mounted to a cylindrical balloon. To move the robot, we induce a bending with the help of tendons that are attached to the legs and driven by a servo motor. To realize a forward movement, the legs have a sawtooth like surface, which induces anisotropic friction. Meaning the friction depends on the direction of the feet movement. It is lower in forward direction so that the feett can glide in this direction. In backward direction the teeth of the surface cause the feet to get stuck. To observe this behaviour with the real robot, one has to operate it on a suitable surface, which is not too smooth.

Robot

To understand the robot behaviour, a computational model was implemented in MATLAB® and Simulink® and optimized to mimic the real behaviour. The results from these physical modeling simulations are made available through a graphical user interface (GUI).

What can you do with this Repository?

Depending on your interest the repository can be used for different use cases:

  1. The repository comes with a GUI (MATLAB app) that allows you to explore the parameter space of two robot configurations using simulations.
  2. The same MATLAB app can also be used to operate the real robot. This allows to investigate the sim2real gap of the computational robot models.
  3. In case you have MathWorks® licenses for the required products (see section further below), you can investigate and optimize the robot models in Simscape.

Access Options

There are three different options to access the Softrobotics Lab. Please use the following table to find the suitable solution for your licensing setup.

Access Option MATLAB Desktop1,2 Standalone MATLAB App 3 MATLAB Online 1
Parameter Exploration (App) x x x
Robot Operation x x -
Physical Modelling (Simscape) x - -

1 MathWorks account required
2 Product licenses required
3 MATLAB Runtime required (available for free)

1. MATLAB Desktop

This is the preferred way to use this repository. By cloning the repository to your desktop, you can explore all the features of the project. This comprises parameter exploration in the MATLAB app, running the real robot and performing physical simulations in Simscape. The repository comes with a project file (EPFL_SoftRobotics.prj). Opening it, will set up your workspace.

Once the project is loaded, you can access the App or the physical models from the shortcuts in the project tab.

ShortCuts

If you would like to dive deeper into the codebase you can use the folder descriptions below to find your way.

  • Application: Contains the code to run the app (Softrobotics_Demo.mlapp).
    • Standalone: Executables for the standalone application.
    • Code: Component classes that allow to visualize the robot in the app.
    • GUI_elements: Icons for the app interface
    • Sim_data: Recorded simulation runs for different parameter sets and the scripts to generate them
  • Arduino Servo: Arduino code for the motor control board
  • CAD: STP and STL files for visualization of the robot in the app, physical simulation in Simscape, and fabrication of 3d printed components
  • Physical Modelling: Simscape source models for two robots and the corresponding block library.

To access and run the full repository, you require a valid license for the following products:

  • MATLAB®
  • Simulink®
  • Simscape™
  • Simscape Multibody™
  • Parallel Computing Toolbox™
  • Signal Processing Toolbox™

Please note that if you would like to work with the Simscape model e.g. to optimize components, you might need additional toolboxes such as Simulink Control Design™ and Simulink Design Optimization™.

2. Standalone App

This version of the MATLAB app does not require a MATLAB license. Instead, it needs the MATLAB Runtime for version R2026a. In case you do not have this installed on your machine, you can download the installer in /Application/Standalone/installer/EPFL_Softrobotics_Lab_Install.exe to get it. In case you already have the runtime, you can directly download the executable from Application/Standalone/build.

3. MATLAB Online™

The online version of the lab can be accessed in MATLAB Online by clicking on the button below.

Open in MATLAB Online

This will open the GUI in MATLAB Online, where the user can simulate two robot variants and evaluate the impact of design parameters on the movement behaviour of the robot. Access to the online app does only require a MathWorks account. No MATLAB license is needed. Once you click on the button above, you must log in and accept the download of the repository to your personal MATLAB Online drive. After this, the app launches automatically.

Virtual Lab

Once you open the MATLAB app you see the following GUI:

GUI

The different components of the GUI are described below.

1. Robot Parameters (red frame)

This section is used to choose the parameters for the simulation and to run the real robot.

  • Robot: select between the vertical and horizontal inch worm robot
  • Balloon Length: length of the balloon in cm (this is only needed for simulation)
  • Frequency of the tendon actuation in Hz (full cycle of triangular excitation signal)
  • Amplitude of the oscillation in degrees. Starting from zero position x_0 of the servo

2. Simulation Controls (green frame)

The Simulate button runs a 10 second simulation for the chosen parameters. The button Delete History removes results of previous runs from the plot in (5) and resets the robot. Please note that the app does not simulate the physical system at run time. It only uses prerecorded data from physical simulations done in Simscape. This technique allows to display simulation results without significant delay.

3. Animation of Simulation Results

3D visualization of the simulation run with the Simulate button. Changing the view port is possible using the integrated icons. They appear when clicking on the three dots in the top right of the figure.

4. Navigation Buttons

The Play and Pause buttons can be used to navigate through the last simulation. This will also update the plot of the current simulation in (5).

5. Comparison of Runs

The results for the position over time are captured in this 2D plot. The y-axis shows the position of the robot, while the x-axis indicates the simulation time. If consecutive simulations are done, they are all stored in this graph and labelled accordingly. The graph can be cleared using the Delete History button in (2).

6. Hardware Controls (blue frame)

These controls can be used to connect to the real robot and to output motor setpoints. The buttons in this section are greyed out and not available if no hardware is connected. The light is indicating if the hardware is connected correctly. Grey: no port is selected, Green: correct COM port, Red: selected port is wrong.

How to Run the Robot

Connect and Run the Robot

Before connecting the robot, make sure that it has been assembled correctly and that the code for controlling the servo has been deployed to the Arduino (see next section). Further, please note that running the robot from the online app is not supported. You either need the MATLAB desktop version or the standalone executable for this.

To start, plug the Arduino to the computer and select the appropriate COM port using the Select button. If everything is ok, the status lamp should become green.

Tip

If you are not able to connect the board, please check your device settings to verify if the board was recognized correctly (i.e. does it show up in your device manager). If another program is already connected to the Arduino, the GUI will not connect, even if the correct port is selected, and the lamp will be red. Make sure to close all programs that may be using the Arduino beforehand.

Once the Arduino is connected, the Reset button becomes available. Press it to initialize the servo to its idle (zero) position. This might change the position of the pulley. This step has to be repeated if settings are altered or the type of the robot is changed.

Before you run the robot, please make sure that all screws are tightened and tendons are mounted correctly.

After resetting, the Reset button will be renamed to Run Robot and the button Run 10sec will become available. This indicates that you are ready to start the robot. To run the robot in continuous mode, press the Run Robot button. To stop the robot, you must press the same button again, which has changed to Reset after starting the robot. The Run 10sec will make the robot move for 10 seconds, similar as in the simulation. After that, it will automatically return to the reset mode. Please note, that while the robot is moving, some of the buttons (Run Robot and Run 10sec) are not available. However, you can always use the Reset button to stop the movement and revert to the idle state.

Remark: If you would like to check out the corresponding simulation, you have to run this separately.

Robot Assembly and Deployment of Controller to the Arduino Board

Hardware Components

The robot kit consists of the following components:

  • Printed legs, holders and pulley
  • Servo (SG90 - Micro Servo 9g)
  • Balloon (diameter ~36mm )
  • Tendons (diameter <0.5mm)
  • Arduino Uno board (R3)
  • Adafruit Motor Shield v2.3 (preferred) / Adafruit 16-channel 12-bit PWM/Servo Shield (alternative)
  • Screws for assembly (6xM2x6mm, 1xM2.5). The latter is typically provided with the servo motor.
  • Medium-Density Fibreboard (MDF)/napped fabric serving as the crawling surface beneath the robot.

Printing the Robot Components

The folder CAD contains the stl and stp files for the components. Both file types are used for visualization in the app and mechanical simulation in Simscape but you will only require the STL for printing the components with a 3D printer. For printing, please use 80% infill for the structure_front.stl and 15% for the remaining parts. This way, the robot's weight is balanced, which is required for the forward movement. For reference: the front structure and back structure should both be ~16g.

Assembly of the Robot

Use the assembly guide below to mount the robot components in the correct order. After assembly, connect the Arduino to the computer. The servo motor will move to the zero position. Then adjust the pulley so that the two screws are vertical.

Robot assembly steps for the vertical mode

Setting up the Arduino and Motorshield

Control of the servo motor is done using an Arduino board together with an Adafruit Motorshield onto which the control algorithm is deployed using the Arduino IDE. In order to set up the Arduino, download and install the Arduino IDE from https://www.arduino.cc/en/software/ as well as the Adafruit Motorshield library from the library manager of the IDE. Then copy the Arduino_Servo folder from this repository to your Arduino lib folder. Start the Arduino IDE and connect it to the board by selecting it in the "Tools" tab. To deploy the code, load the Arduino_Servo.ino file and use the verify and upload buttons.

The Motorshield can be plugged onto the Arduino UNO using the header pins. The servo itself is connected to the pins as shown in the left figure below. As an alternative to the motorshield you can also use an Adafruit 16-channel 12-bit PWM/Servo Shield. The connection can be made as shown in the figure on the right. Please note that you probably need to change the pin settings in the Arduino code to use this shield.

Plug in here Plug in here

Changing the Robot Configuration (Horizontal/Vertical Mode)

Click on the Robot dropdown button and select "horizontal"/"vertical".. The Run Robot button is now reverted to Reset, and the Run 10sec is no longer available. Unscrew the front part of the robot and click on Reset. The pulley moves to the new zero position. Then change the position of the tendons to the new configuration and tighten the screws on the front part again.

Once done, click on Run or Run 10sec:

Horizontal Configration Horizontal Configuration Vertical Configuration Vertical Configuration

Literature

[1] Yi-Shiun Wu et al., Accessible Soft Robotics Education with Re-configurable Balloon Robots, International Conference on Intelligent Robots and Systems (IROS), 2023*
[2] Jessica Gumowski et al., A Soft Robotics Balloon Robot Kit with Accompanying Simulator for Hybrid User Experience, IOP Conference Series: Materials Science and Engineering, 1343 012004, 2026*

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages