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
This is friendlist update tools & old idz clon & follower idz clon etc

This is friendlist update tools & old idz clon & follower idz clon etc

MAHADI HASAN AFRIDI 1 Jan 15, 2022
A Desktop application for the signalum python library

Signalum Desktop A Desktop application on the Signalum Python Library/CLI Tool. The Signalum Desktop application is an attempt to develop a single too

BISOHNS 35 Feb 15, 2021
Cylc: a workflow engine for cycling systems

Cylc: a workflow engine for cycling systems. Repository master branch: core meta-scheduler component of cylc-8 (in development); Repository 7.8.x branch: full cylc-7 system.

The Cylc Workflow Engine 205 Dec 20, 2022
Simply create JIRA releases based on your github releases

Simply create JIRA releases based on your github releases

8 Jun 17, 2022
Простенький ботик для троллинга с интерфейсом #Yakima_Visus

Bot-Trolling-Vk Простенький ботик для троллинга с интерфейсом #Yakima_Visus Установка pip install vk_api pip install requests если там еще чото будет

Yakima Visus 4 Oct 11, 2022
Whole-day timezone comparison

Timezone Converter Compare a full day of your local timezone with foreign ones $ timezone-converter tijuana --zone $ timezone-converter tijuana new_yo

Iago Alonso 12 Nov 24, 2022
Understanding the field usage of any object in Salesforce

Understanding the field usage of any object in Salesforce One of the biggest problems that I have addressed while working with Salesforce is to unders

Sebastian Undurraga 1 Dec 14, 2021
aaencode for python,把python代码转换为颜文字

py-aaencode aaencode for python,把python代码转换为颜文字 compile.py: 将python编译成颜文字,编译结果有随机性,可以选择BPE词表压缩代码 compile_min.py: 最小化的编译器 compiled_min.txt: 编译得到的最小的com

11 Dec 30, 2021
EasyBuild is a software build and installation framework that allows you to manage (scientific) software on High Performance Computing (HPC) systems in an efficient way.

EasyBuild is a software build and installation framework that allows you to manage (scientific) software on High Performance Computing (HPC) systems in an efficient way.

EasyBuild community 87 Dec 27, 2022
This project intends to take the user's CEP (brazilian adress code) and return the local in which the CEP is placed.

This project aims to simply return the CEP's (the brazilian resident adress code) User of the application. The project uses a request and passes on to

Daniel Soares Saldanha 4 Nov 17, 2021
Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat

Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat 📊 Stats 🧪 Get SESSION_NAME from below:

dark phoenix 12 May 08, 2022
A Modern Fetch Tool for Linux!

Ufetch A Modern Fetch Tool for Linux! Programming Language: Python IDE: Visual Studio Code Developed by Avishek Dutta If you get any kind of problem,

Avishek Dutta 7 Dec 12, 2021
2021华为软件精英挑战赛 程序输出分析器

AutoGrader 0.2.0更新:加入资源分配溢出检测,如果发生资源溢出会输出溢出发生的位置。 如果通过检测,会显示通过符号 如果没有通过检测,会显示警告,并输出溢出发生的位置和操作

54 Aug 14, 2022
importlib_resources is a backport of Python standard library importlib.resources module for older Pythons.

importlib_resources is a backport of Python standard library importlib.resources module for older Pythons. The key goal of this module is to replace p

Python 36 Dec 13, 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
ClamNotif: A tool to send you ClamAV notifications

A tool to forward notifications to different recipients categorised by two severity levels of the regular health reports produced by `clamscan` bundled with the ClamAV antivirus engine.

PiSoft Company Ltd. 1 Nov 15, 2021
My solutions for the 2021's Advent of Code

Advent of Code 2021 My solutions for Advent of Code 2021. This year I am practicing Python 🐍 and also trying to develop my own language, Chocolate 🍫

Jakob Erzar 2 Dec 15, 2021
Add all JuliaLang unicode abbreviations to AutoKey.

Autokey Unicode characters Usage This script adds all the unicode character abbreviations supported by Julia to autokey. However, instead of [TAB], th

Randolf Scholz 49 Dec 02, 2022
A TODO-list tool written in Python

PyTD A TODO-list tool written in Python. Its goal is to provide a stable posibility to get a good view over all your TODOs motivate you to actually fi

1 Feb 12, 2022
Time python - Códigos para auxiliar e mostrar formas de como fazer um relógio e manipular o seu tempo

Time_python Códigos para auxiliar e mostrar formas de como fazer um relógio e manipular o seu tempo. Bibliotecas Nestes foram usadas bibliotecas nativ

Eduardo Henrique 1 Jan 03, 2022