Skip to content

chauby/PyDMPs_Chauby

Repository files navigation

Dynamic Movement Primitives and simulations on UR5


This code is a Python implementation of DMPs by Chauby (Email: [email protected]), it is free for everyone.

The corresponding tutorial can be found at:


The code has been tested on Windows 10 with Anaconda 3, and NOT tested on Ubuntu or Mac. Since the code is very simple, the author belive it also works well on the other system with Anaconda 3.

Requirements:

  • Python 3.6+
  • Numpy
  • Scipy
  • Matplotlib

For simulation on CoppeliaSim, you need to install the CoppeliaSim 4.2 or later version.


Canonical System

Canonical system with different parameters:

cs


Discrete DMP

The DMP model is used to model and reproduce sine and cosine trajectories with a limited time.

DMP_discrete

The solid curves represent the demonstrated trajectories, the dashed curves represent the reproduced trajectories by DMP models with the same and different initial and goal positions.

The conventional DMP can not model the trajectory with a same start and goal positions, since $g-y_0$ will lead a problem for non-linear forcing term $(g-y_0)f$.

The modified version of DMP can address the problem, the result is shown as follows:

Modified_DMP


Rhythmic DMP

For demonstrated trajecotry with only one dimension.

DMP_discrete

For demonstrated trajecotry with two dimensions.

DMP_discrete


Simulation on UR5 robot in CoppeliaSim (V-REP)

User guide:

  1. Open the CoppeliaSim project file in the folder "coppeliasim";
  2. Click the "run" button of the CoppeliaSim to run the project file;
  3. Run python script "demo_rhythmic_DMP_UR5.py" or "demo_discrete_DMP_UR5.py".

Discrete DMP

The position of the end-effector are set by the code, and the inverse kinematics calculation model in CoppeliaSim are used to calculate the joint angles of UR5.

DMP_UR5_discrete

The corresponding positions for the end-effector of UR5 are shown as follows:

Randomly modiy goal positions of the reproduced trajectory:

DMP_discrete_different_goals

Randomly modify initial and goal positions of the reproduced trajectory:

DMP_discrete_different_initial_goals

Rhythmic DMP

Three joints of the UR5 robot are under control.

DMP_UR5_rhythmic

The corresponding joint angles are show as follows:

UR5_rhythmic


Reference:

The reference paper can be found at the folder named 'paper', and can also be downloaded at:

For more tutorials about the robot planning and control, please refer to:

qrcode

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages