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.
- 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
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
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.
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.