This repository contains Python implementations of the Fruit Fly Optimization Algorithm (FOA) for solving the inverse kinematics of a robot. Additionally, it includes a GUI application for forward and inverse kinematics calculations for various robot models.
The FOA is a nature-inspired optimization algorithm that emulates the foraging behavior of fruit flies. The algorithm is applied to find the best joint angles that will position the robot's end-effector closest to a desired position.
The basic structure of a fruit fly is defined in the FruitFly
class. Each fruit fly has a position (joint angles) and a smell (distance from the desired position). The optimization process guides the fruit flies towards the best solution.
The main steps are:
- Initialize a population of fruit flies.
- Evaluate their smells based on their positions.
- Guide them towards the best position found so far.
- Repeat for a set number of iterations.
A GUI-based application is provided that helps in calculating the forward and inverse kinematics of various robot models. The application allows users to:
- Select the robot model.
- Input the number of links and joints.
- Provide dimensions and types for each link and joint.
- Compute the Degrees of Freedom (DOF) based on the provided parameters.
- Calculate forward and inverse kinematics.
The application is built using the Tkinter
library.
- To run the FOA for inverse kinematics, execute the script containing the FOA implementation.
- To run the Robot Kinematics Application, execute the script with the
Tkinter
GUI application.
'python foa_script.py' 'python robot_kinematics_app.py'
Fadi Helal
This project is licensed under the BSD3 License.
-
For a deeper understanding of the Fruit Fly Optimization Algorithm:
- Nature-Inspired Optimization Algorithms (relevant book on the topic)
-
Tkinter
library for GUI: