This implementation makes use of Differential Evolution for the analysis of generic robotic systems in three-dimensional space, with its links described by Denavit-Hartenberg parameters. The optimization (fitness function) takes into account the euclidean distance from the manipulator (extremity of last link) to a target point in space.
The implementation is generic enough to be able to optimize for any features of the system. For demonstration purposes, the only variable parameter is θ.
An example of a robotic system with four links is given below.
Link | ||||||
---|---|---|---|---|---|---|
01 | 0.00 | 0.03 | +90° | 0° | +180° | |
02 | 0.10 | 0.00 | +90° | 0° | +180° | |
03 | 0.10 | 0.00 | +90° | -180° | 0° | |
04 | 0.18 | 0.00 | +90° | -90° | +90° |
Example solutions for random targets, using the 4-link system described above, and another one with 2 more links added, for a total of 6 links:
First clone the repository and cd
to it with
git clone http://github.com/gabrieljablonski/robotics-differential-evolution
cd robotics-differential-evolution
The main source file is solveRoboticSystem.go
. Before running, you may want to make adjustments to the robotic system (System.AddLinks()
), the target point, and the differential evolution parameters.
The program can the be built and run with
go run src/solveRoboticSystem.go [<output file>]
The optional output file
parameter can be used to change the name of the output file containing the target and best agent for each generation. Make sure to run it from the same directory as the plot_link_generations.py
script to be able to plot the results.