Skip to content

AbdallahAmrBeedo/Inverse_kinematics_learning_model

Repository files navigation

Inverse Kineamtics Learning Model for 2 Link Manipulator

ANN model fitted on a data from a 2 link manipulator forward kineamtics to drive the inverse kinematics of the manipulator and test it on a simulated and visualized model.

Install

Dependencies

  • numpy
  • pandas
  • matplotlib
  • livelossplot
  • scikit-learn
  • tensorflow
git clone https://github.com/AbdallahAmrBeedo/Inverse_kinematics_learning_model.git

cd Inverse_kinematics_learning_model/

chmod a+x install_dep.sh

./install_dep.sh

Tutorial

Dataset Generation

to generate the dataset for the manipulator, run

python3 gen_data_set.py

A csv will be created in /data directory with 6400 data points.

x y theta q1 q2
0 2.0000 0.0000 0.000000 0.000000 0.000000
1 1.9974 0.0715 0.071581 0.000000 0.071581
2 1.9898 0.1427 0.143161 0.000000 0.143161
3 1.9770 0.2131 0.214742 0.000000 0.214742
4 1.9593 0.2824 0.286322 0.000000 0.286322
... ... ... ... ... ...
6395 0.8369 -1.5874 11.023411 5.654867 5.368544
6396 0.9083 -1.5828 11.094992 5.654867 5.440125
6397 0.9792 -1.5732 11.166572 5.654867 5.511706
6398 1.0492 -1.5585 11.238153 5.654867 5.583286
6399 1.1180 -1.5388 11.309734 5.654867 5.654867

6400 rows × 5 columns

Trainning ANN Model

A model with 6 Hidden layers and 10272 trainable paramters in model_train.ipynb just run the cells to train, evaluate and save the model.

Visualization

run

python3 inv_kinematic_viz.py

wait for the model to be loaded, enter x, y, theta you desire and the model will solve the inverse kinematics and plot the manipulator to verify.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published