SoMo: Fast, Accurate Simulations of Continuum Robots in Complex Environments
SoMo is a light wrapper around pybullet that facilitates
the simulation of continuum manipulators.
SoMo (SoftMotion) is a framework to facilitate the
simulation of continuum manipulator motion in PyBullet physics engine. In SoMo,
continuum manipulators are approximated as a series of rigid links
connected by spring-loaded joints. SoMo makes it easy to create URDFs of
such approximated manipulators and load them into pybullet’s rigid body
simulator. With SoMo, environments with various continuum manipulators
(such as hands with soft fingers or snakes) can be created
and controlled with only a few lines of code.
Bullet physics works best for objects larger than 0.1 simulation units. This is important for us becasue many real soft robots are on the order of 0.1m in length, leaving us no room to discretize them into smaller links. We must scale the world up to avoid numerical precision errors in bullet.
Unfortunately the bullet physics wiki has been down for over a year now, so we must use an archived version of the page HERE. In addition, there is a small typo in that wiki that makes a big difference in how we scale inertias as discussed HERE. We use the convention agreed upon in the forum post.
If we scale all lengths by X, we need to correct other variables:
Property
Scale
Formula
Angle
1
Theta_sim = 1.0 * Theta_real
Angular Velocity
1
w_sim = 1.0 * w_real
Length
X
L_sim = X * L_real
Linear Velocity
X
v_sim = X * v_real
Gravity
X
g_sim = X * g_real
Forces
X
F_sim = X * F_real
Torques
X2
T_sim = X2 * T_real
Inertias
X2
I_sim = X2 * I_real
In addition, we could scale masses by a factor Y, leading to more corrections:
Property
Scale
Formula
Forces
Y
F_sim = Y*F_real
Torques
Y
T_sim = Y*T_real
Inertias
Y
I_sim = Y*I_real
Combining length and mass scaling, we get combined corrections:
Property
Scale
Formula
Forces
X*Y
F_sim = X*Y*F_real
Torques
X2*Y
T_sim = X2*Y*T_real
Inertias
X2*Y
I_sim = X2*Y*I_real
Note: We could choose a constant density, thus setting Y=X:raw-html-m2r:`<sup>3</sup>`. However, we do not actually need to do mass scaling according to the forum post from above, so we chose to set Y=1 for simplicity.
We set the sizes of objects in our world according to these units in the various URDF and actuator definition files, and it’s up to us to scale these dimensions accordingly. We also need to correct the gravitational constant when setting up our simulation. All other forces, torques, etc are calculated internally.
Since we are discretizing the soft robots into rigid links with angular stiffness and damping terms, we need to correct these terms for the dimensional scale.
Since the simulations run with a certain length scaling, X, and mass scaling, Y, we need to scale the output data back to real units. Doing this is easy, just inverting all the relationships from above.
We are using a discretized model for soft actuators the converts continuous bending beams into rigid links and pin joints with torsional stiffnesses. To calibrate our simulated system to the real system, we need some way to relate deformation to joint angles.
Deflection,\(\delta\), of cantilever beam as a function of position, \(x\) along the beam, where \(\delta_L\) is the deflection at the tip, and \(L\) is the length of the beam:
For the first segment with a length, \(\frac{L}{N}\), deflection \(\delta_1\), we can define a rotational spring constant, \(\kappa_1\), that achieves an angle, \(\theta_1\) when a torque, \(\tau_1\), is applied on the joint.
We need to determine the actuation moment applied to actuators. Many of our physical systems are air-driven, so we can use blocked-force measurements at various pressures to get a rough estimate of actuation torques at pressures of interest.
During a blocked force measurement, we assume all force produced is balancing the internal actuation moment. Given this assumption, we get:
Real soft robotic hand platform from [Abondance et al., 2020], where the mechanical properties of the fingers have been characterized.
From our paper on in-hand manipulation with soft fingers [Abondance et al., 2020], we measured the linear bending stiffnesses of our 0.1 m long fingers in the grasping and side axes:
In our typical SoMo simulation of these fingers, we use 5 joints in each direction, so $N$ = 5 and $L$ = 0.1 m. Putting this through the formula for joint stiffnesses, we get:
The last step is to scale the joint stiffnesses by the square of the world scale per the world scaling discussion. In many of our examples we use a world scale of 20, so scaling the stiffnesses by 400 results in:
To apply realistic actuation torques to the system, we calibrate the grasping axis on the 100 kPa value, which produced 0.75 N of force over the 0.1m length finger body.
For the side-axis, we explicitly control the actuation torques in simulation, but the real system uses a pressure differential. Based on a differential of 100kPa to achieve reasonable side-to-side motion in the hardware, we estimate approximately 3 times the value for the grasping axis based on observations, resulting in:
Sylvain Abondance, Clark B Teeple, and Robert J Wood. A dexterous soft robotic hand for delicate in-hand manipulation. IEEE Robotics and Automation Letters, 5(4):5502–5509, 2020.
SoMo provides an easy way to generate continuum manipulators. Manipulators can be comprised of several serially-chained actuators (SMActuatorDefinition), made up of a series of links (SMLinkDefinition) connected by spring-loaded joints (SMJointDefinition),
To actually implement a manipulator, you can define it in a dictionary or yaml/json file, and load the definition as a SMManipulatorDefinition object. The lower-level definitions are taken care of internally.
@inproceedings{graule2020somo, title={SoMo: Fast and Accurate Simulations of Continuum Robots in Complex Environments}, author={Graule, Moritz A. and Teeple, Clark B and McCarthy, Thomas P and St. Louis, Randall C and Kim, Grace R and Wood, Robert J}, booktitle={2021 IEEE International Conference on Intelligent Robots and Systems (IROS)}, pages={In Review}, year={2021}, organization={IEEE}}