Skip to content

Fixed and Floating base Affine Curvature model in MATLAB

Notifications You must be signed in to change notification settings

sebtiburzio/PAC_model_matlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PAC_model_matlab

This repository contains Matlab code relating to my MSc Robotics thesis on manipulation of deformable linear objects using Affine Curvature modelling, subsequently developed into this paper.

See here for the code dealing with processing the data recorded in the experiments as well as a less developed Python implementation of the model using Sympy.

There are two models:

Fixed Base Model

This is a single affine curvature segment with a fixed end, as conceived in this paper.

The main scripts are:

model_gen_fixed_base.m

Generates functions for the forward kinematics and terms in the dynamic EOM, which are saved in the automatically_generated directory.

Note: There are some differences in how the model is defined in the code compared with the thesis report. In the formal derivation the model is defined in the XY plane (Y upwards), however in the matlab code upwards is defined as Z to align with the manipulator base frame for experiments. Positive rotation in the formal model is anticlockwise in the XY plane (around the Z-axis); in the code it is clockwise in the XZ plane (around the Y-axis).

Also the z-coordinate of the forward kinematics is negated so that at 0 curvature the object points downwards instead of upwards, without an additional 180 degree rotation (which the B' frame introduces in the report).

fwd_sim.m

Framework for forward simulation of the dynamic EOM, which are implemented in f_fcn.m and dynamics.slx.

Using the variable gravitational field direction, it is also possible to use this model to simulate the equilibrium state of the object when held in different orientations. This approach is used extensively for steady state comparisons; fss_fcn.m and ss_solver.slx implement simplified dynamics allowing much faster determination of the equilibrium by forward simulation.

param_id.m & param_id_static.m

A collection of parameter ID formulations to determine the object properties.

Floating Base Model

Here the model is extended with 3 additional DOF at the base: X, Z and Phi representating a planar manipulator TCP.

model_gen.m

The same considerations as for the fixed base forward kinematics apply: when all states are 0, the base of the object is at (0,0), and the tip is at (0,-L). Positive Phi will rotate the object clockwise in the XZ plane, similarly positive Theta will bend it clockwise.

fwd_sim.m

In the full dynamic model input force and torque at the base is applied as the third argument of f_fcn.m: F = (Fx, Fz, Ty). This can be applied directly in dynamics.slx or by importing a signal into the matrix variable actuation.

Note: When simulating the model the solver may hang at some stage, probably due to hitting a singularity (to be investigated). In this case, the state evolution will still be saved in q_ev.mat if the execution is interrupted.

swing_loose0001-0450.mp4

solve_static.m

Examples of setting up nonlinear optimisation problems to generate manipulator solutions for steady state control of the object endpoint position and orientation.

FFC_vis0000-0151.mp4

Object Properties

The object properties determined through the parameter identification experiments are saved in the object_parameters directory, and should be loaded in the script initialisation. There are two sets: those in the main directory were determined with the 2 stage process (k and theta_bar from static data, then beta from dynamic data), while those in the sub directory full_dynamic_id were determined from dynamic data only

About

Fixed and Floating base Affine Curvature model in MATLAB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages