Skip to content

Latest commit

 

History

History
160 lines (123 loc) · 9.2 KB

README.md

File metadata and controls

160 lines (123 loc) · 9.2 KB

pyDynaMapp : Python Dynamics Mapping Package For Robotics

Version Version Version Version Version

The primary goal of this project is to offer a flexible framework for modeling and identifying serial manipulators, including the incorporation of nonlinear effects such as friction, stiffness, and backlash in robot joints. Additionally, a predictive feedback control mechanism is being developed to compensate these effects, making the framework suitable for collaborative robotics applications.

Getting started

Prerequisites

The code was tested successfully on the following platform:

  • Windows 11:
    • python 3.12.4
    • miniconda 4.5.0
    • cuda 12.50 (optional)

⚠️ Warning: The package has not been tested or built for Unix-like systems (macOS, Linux). Please refer to the Unix installation section for more details.

Installation

Windows

Note: If Anaconda is installed on your system, skip the first step. Conda is the only Python package manager supported at the moment.

  1. Download and install Miniconda. For Windows installation, refer to the Miniconda Windows Installation Guide.

  2. Install the package using the following command:

    pip install -i https://pypi.anaconda.org/chiha/simple pydynamapp

Using Git:

  1. Clone the repository:

    git clone https://github.com/wissem01chiha/dynamic-identification
  2. Install the following enviroment dependencies manually:

    • numpy==1.26.4
    • pinocchio==2.7.1
    • scipy==1.14.0
    • nlopt==2.7.1
    • pyyaml==6.0.2
    • pandas==2.2.2
    • seaborn==0.13.2
    • matplotlib==3.8.4

    -- using conda:

    conda config --add channels conda-forge
    conda install pinocchio=2.7.1
    conda install nlopt=2.7.1
    ...

    -- or for Windows platforms, run the command to install all requirements:

     conda env create -f environment.yml 

    by defualt it create a virtual enviroment named dynamapp and place the python packages in it.

⚠️ Warning: The Pinocchio release 2.7.1 is the officially supported version. Newer releases (3.x and above) may cause errors. If you encounter any issues, please open an issue.

  1. Run all tests to check the installation:

    python3 run_tests.py

for any bugs encountered during installation, please make sure to open an issue at: Issues

Unix

We strongly recommend using Conda to create a virtual environment with:

conda env create -f environment.yml
conda activate dynamapp

an then follow the same instruction in using git to insatll code dependancies in the virtual enviroment. run test to check installation: .. on Linux platforms:

  chmod u+x run_tests.sh
  ./run_tests.sh

for any bugs encountered during installation, please make sure to open an issue at: Issues

Package Structure

  • The script folder contains executable identification scripts. Settings for each algorithm are passed through command-line arguments.

  • The dynamics folder contains all direct and inverse dynamics model computations, state-space representation, and regressor formulation.

  • The viscoelastic folder contains all base classes for contact models.

  • The package relies on the URDF file format in the robot folder to represent the rigid body tree of the robot and contains basic inertial and geometric parameters. For more information, refer to:

  • create a robot model: Use a URDF file along with a configuration file. The configuration file should follow the same layout as the Kinova config file.

    from pyDynaMapp.dynamics import Robot
    
    kinova = Robot(urdf_file_path, configuration_file_path)
    
    # Example: Compute mass and Coriolis matrices for home position
    C = kinova.computeCoriolisMatrix()
    M = kinova.computeMassMatrix()
    
    # Example: Compute the joint torques vector for home position
    T = kinova.computeGeneralizedTorques()
  • create a state-space representation :

    from pyDynaMapp.dynamics import StateSpace
    import numpy as np
    
    kinova_ss = StateSpace(urdf_file_path, configuration_file_path)
    
    # Example: Compute the state-space matrices at a given configuration using a state vector x
    x = np.random.rand(14)
    A, B, C, D = kinova_ss.model.computeStateMatrices(x)
    
    # Example: Compute the state-space matrices at a given configuration using position and velocity vectors
    q = np.random.rand(7)
    qp = np.random.rand(7)
    A, B, C, D = kinova_ss.model.computeStateMatrices(q, qp)

Documentation

official documentation is not yet released and is a work in progress.
for more information, please visit the pyDynaMapp-Anaconda page.

References

Development

See the CONTRIBUTING guide.

License

See LICENSE file.