Skip to content

gg-dema/SQUID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<title>Learning Multi-Stable Motion Primitives</title>

Learning Multi-Stable Motion Primitives from Demonstrations via Multi-Attractor Dynamics

This project explores the integration of dynamical systems and neural networks for learning motion primitives from demonstrations. Specifically, we investigate how to transfer the stability properties of known dynamical systems to unknown systems inferred from human demonstrations. This falls under the domain of Imitation Learning.

While several frameworks combine neural models with stable dynamics, few explicitly address multi-stability — the ability to encode and reproduce multiple trajectories with distinct end-points. Our approach introduces and evaluates architectures capable of learning such multi-stable behaviors.

We integrate multi-attractor dynamics into the latent space of a neural network. After observing a few demonstrations, the model learns to reach target configurations from arbitrary initial states. Using a multivariate gaussian dynamic we are able to learn a potential infinite number of attractor in R^n, while using a continuous set of attraction point we can constrain the final configuration to reach a continuous curve of attraction, allowing a robot to select any grasping point on a particular object. Finally, with a multivariate gaussian dynamic on a spherical manifold, we are able to control also the orientation of the robot.

Encoding different attractors in memory enhances model flexibility and allows shaping of the underlying vector field used for planning. 🎯

Discrete Attractors Architecture

Continuous Attractors Architecture

🚀 Installation

This project uses Poetry for dependency and environment management.

git clone <https://github.com/gg-dema/SQUID.git> your_repo && cd your_repo
poetry install
poetry shell

Make sure you have Poetry installed beforehand. You can find installation instructions at python-poetry.org.

🧠 Training the Model

All model variants use the same entry point:

cd src
python train.py --params <config_file>

Configuration files are located in src/params/ and define the type of task:

  • Discrete attractor points: Use files like Discrete_Squid_{SPACE}{DIM}_1o.py. Space could be S for spherical manifold or R for use euclidean metrics.
  • Continuous attractor curves: Use files prefixed with shape_SHAPENAME.py

Dataset Setup

  • For discrete attractors, you only need a dataset of demonstrations (see examples under multi_attractors/ and kuka/).
  • For continuous attractors, two inputs are required:
    1. The main contour/curve of the attraction region
    2. A set of hard negatives (non-attractor points)
    You can generate the hard negative set using:
    python src/tool/hard_neg_extraction.py

Experiments

Reference dynamics

The reference dynamics used in the project are the multivariate gaussian dynamic in R^n and in S^n, a "continuous curve" dynamic. All of these are define in the src/agent/neural_networks.py file. In lower dimension, here you can have a look at the vector field generated from them:

Planar motion:

Robotics experiement: motion in SE(3)

7-dim motion, where the state q is composed by 3 element for the position (x, y, z) and 4 element for the orientation (quaternion) (alpha, beta, gamma, w)

🙏 Acknowledgments

This project builds upon the foundational work in the following repositories:

We thank the original authors for making their work publicly available.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors