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
A feed generator. Currently supports generating RSS feeds from Google, Bing, and Yahoo news.

A feed generator. Currently supports generating RSS feeds from Google, Bing, and Yahoo news.

Josh Cardenzana 0 Dec 13, 2021
All you need to understand CRUD and MVP in DRF

Book-Store-API This an API which has been put in place just to make you order for books, upload books with price, image and all, pay and automtically

Oladipo Adesiyan 6 Jul 03, 2022
PatZilla is a modular patent information research platform and data integration toolkit with a modern user interface and access to multiple data sources.

PatZilla is a modular patent information research platform and data integration toolkit with a modern user interface and access to multiple data sources.

IP Tools 68 Dec 14, 2022
A hackerank problems, solution repository

This is a repository for all hackerank challenges kindly note this is for learning purposes and if you wish to contribute, dont hesitate all submision

Tyler Mwalo Kenneth's 1 Dec 20, 2021
A novel dual model approach for categorization of unbalanced skin lesion image classes (Presented technical paper 📃)

A novel dual model approach for categorization of unbalanced skin lesion image classes (Presented technical paper 📃)

1 Jan 19, 2022
Participants of Bertelsmann Technology Scholarship created an awesome list of resources and they want to share it with the world, if you find illegal resources please report to us and we will remove.

Participants of Bertelsmann Technology Scholarship created an awesome list of resources and they want to share it with the world, if you find illegal

Wissem Marzouki 29 Nov 28, 2022
FindUncommonShares.py is a Python equivalent of PowerView's Invoke-ShareFinder.ps1 allowing to quickly find uncommon shares in vast Windows Domains.

FindUncommonShares The script FindUncommonShares.py is a Python equivalent of PowerView's Invoke-ShareFinder.ps1 allowing to quickly find uncommon sha

Podalirius 184 Jan 03, 2023
Download and archive entire usenet newsgroups over NNTP.

Usenet Archiving Tool This code is for archiving Usenet discussions, not downloading files. Newsgroup posts are saved under the authors name and email

Corey White 2 Dec 23, 2021
A calculator developed in Python.

Calculadora Uma simples calculadora... ( + − × ÷ ) 💻 Situação do projeto: Projeto finalizado ✔️ 🛠 Tecnologias: Python Tkinter (GUI) ⚙️ Pré-requisito

Arthur V.B.S. 1 Jan 27, 2022
Jogo em redes similar ao clássico pedra papel e tesoura

Batalha Tática Tecnologias de Redes de Computadores-A-N-JOGOS DIGITAIS Professor Fabio Henrique Cabrini Alunos: Eric Henrique de Oliveira Silva - RA 1

Eric Henrique de Oliveira Silva 1 Dec 01, 2021
ERPNext Easy Letterhead

ERPNext Easy Letterhead Intro Quality letterheads are a problem for non-technical users. So we've built (really hacked together) a slightly easier sol

Bantoo 3 Jan 02, 2023
tidevice can be used to communicate with iPhone device

h 该工具能够用于与iOS设备进行通信, 提供以下功能 截图 获取手机信息 ipa包的安装和卸载 根据bundleID 启动和停止应用 列出安装应用信息 模拟Xcode运行XCTest,常用的如启动WebDriverAgent测试

Alibaba 1.8k Dec 30, 2022
Coinloggr - A learning resource and social platform for the coin collecting community

Coinloggr A learning resource and social platform for the coin collecting commun

John Galiszewski 1 Jan 10, 2022
Package to provide translation methods for pyramid, and means to reload translations without stopping the application

Package to provide translation methods for pyramid, and means to reload translations without stopping the application

Grzegorz Śliwiński 4 Nov 20, 2022
Edorado93 - Unraveling a Rockstar! -- Too much? Fine, Unraveling a humble programmer then?

Hi, I'm Sachin Malhotra ( ⛄ 💻 🎃 🍺 ) Let me set the records straight. Roger Federer is the GOAT and I will not hear otherwise! Now that we have that

Sachin Malhotra 7 Dec 25, 2022
This is the improvised version of Dobot Magician which can be implemented for Dobot M1

pydobotM1 This is the edited driver for Dobot M1 version of the original pydobot library intended for use with the Dobot Magician. Here's what you nee

Shaik Abdullah 2 Jul 11, 2022
Monitoring of lake dynamics

slamcore_utils Description This repo contains the slamcore-setup-dataset script. It can be used for installing a sample dataset for offline testing an

10 Jun 23, 2022
Яндекс тренировки по алгоритмам. Июнь 2021

Young&&Yandex Тренировки по алгоритмам Если вы хотите попасть на летнюю стажировку в Яндекс, но пока не уверены в своих силах, приходите на наши трени

Podlevskiy Viktor 6 Sep 03, 2021
Trashselected - Plugin for fman.io to move files that has been selected in fman to trash

TrashSelected Plugin for fman.io to move files that has been selected in fman to

1 Feb 04, 2022
An Advent calendar of small programming puzzles for a variety of skill sets and skill levels.

Advent of Code 2021 The Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be sol

Evan Cope 0 Feb 13, 2022