Skip to content
Yasunori Toshimitsu edited this page Jun 26, 2023 · 6 revisions

Overview

Welcome to 3d-soft-trunk wiki! This wiki contains information regarding using and developing the code, as well as a guide to make your own SoPrA arm for experimentation.

Filesystem

There are a lot of folders in the repo which might be confusing. If you're new to the code, the relevant folders for you will likely only be apps/, which contains implementations using the code structure, config/ which contains robot configuration YAML files, and src/, which contains the code structure itself. Most other folders are either used by CMake or contain experiments from old publications.

Fabrication

If you want to (or need to, let's be honest) fabricate your own SoPrA arm, refer to the Manufacturing chapter. It will walk you through casting of a chamber, combination into a segment, and the addition of multiple segments to create an arm. Note that it may not be the latest method being used at SRL. STL files are available here: https://polybox.ethz.ch/index.php/s/VNXFbmvZsnFQNBf

Design Principles

The 3d-soft-trunk repo uses a hierarchical code structure, in which information flows upward and is collected in standardized objects. This allows modules such as sensors and models to be exchanged easily. The main objects are as following:

SoftTrunkParameters

An object containing a variety of both physical and non-physical configuration parameters. The SoftTrunkParameters object can load parameters from a YAML file as well as write its parameters to YAML. For exact documentation on the parameters, refer to the wiki's Setup -> YAML Parameters section.

Every class in the codebase should receive a const instance of SoftTrunkParameters upon initialization. This ensures that all modules in the code are operating with the same assumptions with regards to parameters. As SoftTrunkParameters objects are meant to be constant, if you want to change parameters you must destroy all objects and reinitialize all of them with the new values.

CoordType, ModelType, ControllerType, SensorType

These are simple enums containing the respective types. They are used for easy identification of robot/testing configuration.

srl::State

This object contains robot state in a vector q, as well as derivatives in dq and ddq. Coordinate type is also included and used for sanity checks in some of the modules. Vectors containing manipulator tip transforms as well as object transformations (if applicable) are also contained in the object. This is one of the most used objects throughout the code.

DynamicParams

This object contains all parameters found in the dynamic equations of the manipulator: A (actuation), B (inertia), c (coriolis), D (damping), g (gravity), K (stiffness). It is required whenever the robot's motion needs to be modeled.

Model

A container object for all models. Model type is set in SoftTrunkParameters' ModelType object, and the Model instance will automatically use the respective model to update its dynamic parameters when Model::update is called.

StateEstimator

A container object for all state estimation methods. A list of sensors is set in SoftTrunkParameters' SensorType vector, and the StateEstimator instance will automatically initialize the respective sensor readout classes and poll them when StateEstimator::poll_sensors is called. When multiple sensors are used, the "main" state is determined according to the selected FilterType.

ControllerPCC

This is a template type class for all controllers. It contains a Model and StateEstimator, and will automatically fetch new sensor values and update the model in separate threads. To implement a new controller, the user therefore only needs to make a class based on ControllerPCC and write their control loop. It also provides template functions, such as ControllerPCC::set_ref and ControllerPCC::actuate to make implementation of controllers even easier. For an exact guide to how to make your own controller, refer to Adding features -> New Controller.