A project for training a neural network to control a robotic arm.
Solving inverse kinematics can often be challenging in complex robots. This project tries to illustrate how neural networks can be taught to solve such problems. The robot is a simple planar arm with 3 sections and the whole project is simply a proof of concept.
1000 generations were needed for great results. However, I think the method has proven itself - at least for simple robots.
1000_420p.mp4
Accompanying Youtube video: https://youtu.be/oZJqmPPVW6Q?si=ku-KLPI7Qgqxm4LI
lib/libarm.a
- Robot-Armlib/libnn.a
- NN-Liblib/libbox2d.a
- box2d (version 2.4.1)SFML
- SFML (version 2.5.1)
Make sure you have SFML installed.
If not, you can do that by running sudo apt-get install libsfml-dev
.
Run make
command.
To train your network you need to run a command ./main.out -population [population] -generatons [generations]
.
Your networks will be saved every 10 generations into the networks/
folder.
To load a saved generation simply add -load [generation]
to your command line arguments.
To load a network you must run a command ./main.out -display [generation] -population [population]
.
There are already pretrained networks of 1000th generation in the networks/
folder, that you can run with ./main.out -display 1000 -population 100
.