Paintbot - Forward & Inverse Kinematics

Related tags

MiscellaneousPaintBot
Overview

PAINTBOT - FORWARD & INVERSE KINEMATICS:

Overview:

alt text

We built a simulation of a RRR robot shown in the figure below. The robot has 3 links and is connected to base link at the bottom. Our robotic siumation allows users to move each of the 3 links counter clockwise and clockwise bby 1 pixel (1 degree). It also allows the user to paint a filled circle at the tip of link 3. Our link 1 had a length of 150 pixels, link 2 had a length of 100 pixel, and link 3 had a length of 75 pixels.

We used the forward kinematics to calculate the the movement of each link when counter clockwise or clockwise was pressed. When a axis was rotated we calcualted the new x and y values by the following functions.

X1 = X0 + rCos(theta) Y1 = Y0 + rCos(theta)

where r is the length of the link.

Links 1 and 2 had some extra rotations we had to keep track of. We had to take the other links' position into account or links would disconnect at a certain point. To deal with this we roated link 1 or 2 the same amount we moved the other links in the x and y axis. Finally we accountd for the other links' orientation by rotating them by 1 degree.

Function Implementation

10/1/21

updateRobot(self, canvas, width, height) -> this function updates the 3 links position by getting their current x and y cordinates.

drawRobot(self, canvas, width, height) -> this function initially draws the 3 links and the axes. We used Tkinter's create_oval method for the axis and the create_line method for the links.

Axis1Clockwise(self, angleLabel, event=None), Axis2Clockwise(self, angleLabel, event=None), Axis3Clockwise(self, angleLabel, event=None) -> This function changes the x and y position of link link 1,2,3. We do this by using the equations above. Since this is moving the link clockwise we subtract 1 degree to the link's angle each time. After getting the new cordinates we update the robot's drawing using the updateRobot function.

Axis1Counter_clockwise(self, angleLabel, event=None), Axis2Counter_clockwise(self, angleLabel, event=None), Axis3Counter_clockwise(self, angleLabel, event=None) -> This function changes the x and y position of link link 1,2,3. We do this by using the equations above. Since this is moving the link counter-clockwise we add 1 degree to the link's angle each time the function is called. After getting the new cordinates we update the robot's drawing using the updateRobot function.

resetRobot(self, event=None) -> This function resets the location of the all links to the starting position.

getAllLinkPositions(self)-> returns a list of the position of the tip of all the links.

Paint(x, y,frame)-> This function paints the circle on the canvas. It uses the x and y values of the links to paint where the link is. We used Tkinter's create_oval method to paint the circle.

GoTo(self, x, y) -> This function uses a inverse kinematic solution to the arm angles using the target position. Since last 2 links sumed up to more than first link, we used this functon to create a solution that is complete over the work space.

10/10/21

(+/-) (x,y) buttons -> We added buttons to let the robot arm move in x and y pixel values. Each plus and minus would move the robot's links by 1 pixel. These buttons are calling our GoTo(self,x,y) funciton which handles our inverse kinematic solution. Since that was coded by the last project's due date we used that finish out inverse kinematics solution.

Compile Instrcutions

Run the command: python3 main.py

Owner
Alex Lin
Howdy !! I'm Alex Lin and I'm a Computer Science rising senior minoring Statistics at Texas A&M University. Actively seeking an internship!
Alex Lin
Timetable scripts for python

Timetable Scripts timetable_to_json: https://beta.elektronplus.pl/timetable classes_taught_by_teacher: a.adam (aa) ['1Tc', '1Td', '3Te', '3Ti', '4Tf',

Elektron++ 2 Jan 02, 2022
Example platform plugin that fixes fentry calls in Binja

Example Binja Platform Plugin This is an example Binja platform plugin which fixes up linux kernel module calls to __fentry__. __fentry__ is the linux

_yrp 2 Oct 07, 2021
Parser for RISC OS Font control characters in Python

RISC OS Font control parsing in Python This repository contains a class (FontControlParser) for parsing font control codes from a byte squence, in Pyt

Charles Ferguson 1 Nov 02, 2021
Groupe du projet Python en 2TL2-4

Présentation Projet EpheCom Ce logiciel a été développé dans le cadre scolaire. EpheCom est un logiciel de communications - vocale et écrite - en temp

1 Dec 26, 2021
Blender addon that enables exporting of xmodels from blender. Great for custom asset creation for cod games

Birdman's XModel Tools For Blender Greetings everyone in the custom cod community. This blender addon should finally enable exporting of custom assets

wast 2 Jul 02, 2022
Live tracking, flight database and competition framework

SkyLines SkyLines is a web platform where pilots can share their flights with others after, or even during flight via live tracking. SkyLines is a sor

SkyLines 367 Dec 27, 2022
Ikaros is a free financial library built in pure python that can be used to get information for single stocks, generate signals and build prortfolios

Ikaros is a free financial library built in pure python that can be used to get information for single stocks, generate signals and build prortfolios

Salma Saidane 64 Sep 28, 2022
Wrapper for the undocumented CodinGame API. Can be used both synchronously and asynchronlously.

codingame API wrapper Pythonic wrapper for the undocumented CodinGame API. Installation Python 3.6 or higher is required. Install codingame with pip:

Takos 19 Jun 20, 2022
Very simple encoding scheme that will encode data as a series of OwOs or UwUs.

OwO Encoder Very simple encoding scheme that will encode data as a series of OwOs or UwUs. The encoder is a simple state machine. Still needs a decode

1 Nov 15, 2021
A dead-simple service that notifies you when something goes down.

Totmannschalter Totmannschalter (German for dead man's switch) is a simple service that notifies you when it has not received any message from a servi

1 Dec 20, 2021
SkyPort console user terminal written in python

SkyPort terminal implemented as a console script written in Python Description Sky Port is an universal bus between user software and compute resource

Sky Workflows 1 Oct 23, 2022
A Python library that helps data scientists to infer causation rather than observing correlation.

A Python library that helps data scientists to infer causation rather than observing correlation.

QuantumBlack Labs 1.7k Jan 04, 2023
Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Advent Of Code 2021 - Python English Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels th

Coral Izquierdo Muñiz 2 Jan 09, 2022
A script for creating battle animations in FEGBA format.

AA2 Made by Huichelaar. I heavily referenced FEBuilderGBA. I also referenced circleseverywhere's Animation Assembler. This is also where I took lzss.p

2 May 31, 2022
Transparently load variables from environment or JSON/YAML file.

A thin wrapper over Pydantic's settings management. Allows you to define configuration variables and load them from environment or JSON/YAML file. Also generates initial configuration files and docum

Lincoln Loop 90 Dec 14, 2022
Python pyside2 kütüphanesi ile oluşturduğum drone için yer kontrol istasyonu yazılımı.

Ground Control Station (Yer Kontrol İstasyonu) Teknofest yarışmasında yerlilik kısmında Yer Kontrol İstasyonu yazılımı seçeneği bulunuyordu. Bu yüzden

Emirhan Bülbül 4 May 14, 2022
Some shitty programs just to brush up on my understanding of binary conversions.

Binary Converters Some shitty programs just to brush up on my understanding of binary conversions. Supported conversions formats = "unsigned-binary" |

Tim 2 Jan 09, 2022
Install JetBrains Toolbox

ansible-role-jetbrains-toolbox Install JetBrains Toolbox Example Playbook This example is taken from molecule/default/converge.yml and is tested on ea

Antoine Mace 2 Feb 04, 2022
NFT-Image-Generator - Utility to generate a large collection of unique images

NFT-Image-Generator Utility for creating a generative art collection from suppli

Sem Moolenschot 60 Dec 15, 2022
A functional standard library for Python.

Toolz A set of utility functions for iterators, functions, and dictionaries. See the PyToolz documentation at https://toolz.readthedocs.io LICENSE New

4.1k Jan 04, 2023