Test Bench
The main components are the pneumatic supply, a development computer (Dev-PC), a real-time computer (RT-PC), several EtherCAT slaves, proportional piezo valves (Festo VEAA-B-3-D2-F-V1-1R1) with integrated pressure control and the robots. The pneumatic supply can be enabled and disabled using a shut-off valve. A filter removes particles and sets the supply pressure approximately to a constant level with a manual regulator. Connected in series to the supply unit is an array of piezo valves. The user can select how many pneumatic connections are needed for the particular application. For the modular SPONGE, one valve needs to be connected regardless of its length to precisely control the supply pressure of the robot. The semi-modular ASR with n actuators needs 2n valves. The sensor values and desired pressures of the semi-modular ASR are read or set using input and output terminals (EL3702 and EL4102). The modular robot is connected via the I2C controller to the test bench.
The communication is realized using EtherCAT protocol and the corresponding open-source tool EtherLab with an added external-mode patch and a shared-memory real-time interface. Note that this enables (hard) real-time system control, data acquisition, online visualization and alteration of settings during runtime via Simulink. The RT-PC runs the compiled Simulink model, which is developed on the Dev-PC. A ROS integration is also possible.
The code for the entire test bench can be found in the git repository.
Requirements
- Matlab R2018b (tested with it, update to newer versions pending)
- RT-PC with EtherCAT (SETUP_RTPC.MD and SETUP_ETHERCAT.MD).
- Dev-PC with EtherLab (also SETUP_ETHERCAT.MD)
- Arduino-like development board with EasyCAT shield (tested on NUCLEO-F401RE. Similar boards are suitable as long as they share the Arduino pin configuration and support I2C and SPI communication protocols)
- SWD programming device (such as ST-Link V3 Set)
- Arduino IDE and EasyCAT Library
- STM32 Cube IDE
Usage
- Dev-PC: Initialize parameters and open Simulink model via
init.m
- Dev-PC: If necessary, modify Simulink model
- Dev-PC: Compile/Build model via
Ctrl+B
- Dev-PC: Compile ROS-Workspace and copy to RT-PC via
$ ./build.sh && ./sync.sh
- Connect to RT-PC via SSH and run the following commands on RT-PC:
$ sudo /etc/init.d/ethercat start
(start EtherCAT master) and$ ~/app_interface/ros_install/scripts/autostart.sh && tmux attach-session -t app
(start compiled model) - Dev-PC: Start external mode in Simulink model via
Connect To Target
to visualize/record data or alter settings - After the experiment on RT-PC:
Ctrl+C
in tmux windows,$ tmux kill-session
and$ sudo /etc/init.d/ethercat stop
to stop the EtherCAT master - Dev-PC: Postprocessing via
postprocess.m
(saves recorded data in single file:measurements_struct.mat
)