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
PyPI package for scaffolding out code for decision tree models that can learn to find relationships between the attributes of an object.

Decision Tree Writer This package allows you to train a binary classification decision tree on a list of labeled dictionaries or class instances, and

2 Apr 23, 2022
A simple 3D rigid body simulation written in python

pyRigidBody3d A simple 3D rigid body simulation written in python

30 Oct 07, 2022
Like Docker, but for Squeak. You know, for kids.

Squeaker Like Docker, but for Smalltalk images. You know, for kids. It's a small program that helps in automated derivation of configured Smalltalk im

Tony Garnock-Jones 14 Sep 11, 2022
OntoSeer is a tool to help users build better quality ontologies

Ontoseer This document provides documentation for the first version of OntoSeer.OntoSeer is a tool that monitors the ontology development process andp

Knowledgeable Computing and Reasoning Lab 9 Aug 15, 2022
Anki for desktop computers

Anki This repo contains the source code for the computer version of Anki. If you'd like to try development builds of Anki but don't feel comfortable b

Ankitects 12.9k Jan 09, 2023
Small tool to use hero .json files created with Optolith for The Dark Eye/ Das Schwarze Auge 5 to perform talent probes.

DSA5-ProbeMaker A little tool for The Dark Eye 5th Edition (Das Schwarze Auge 5) to load .json from Optolith character generation and easily perform t

2 Jan 06, 2022
A log likelihood fit for extracting neutrino oscillation parameters

A-log-likelihood-fit-for-extracting-neutrino-oscillation-parameters Minimised the negative log-likelihood fit to extract neutrino oscillation paramete

Vid Homsak 1 Jan 23, 2022
Old versions of Deadcord that are problematic or used as reference.

⚠️ Unmaintained and broken. We have decided to release the old version of Deadcord before our v1.0 rewrite. (which will be equiped with much more feat

Galaxzy 1 Feb 10, 2022
Blender Light Manipulation - A script that makes it easier to work with light

Blender Light Manipulation A script that makes it easier to work with light 1. Wstęp W poniższej dokumentacji przedstawiony zostanie skrypt, który swo

Tomasz 1 Oct 19, 2021
Collection of Beginner to Intermediate level Python scripts contributed by members and participants.

Hacktoberfest2021-Python Hello there! This repository contains a 'Collection of Beginner to Intermediate level Python projects', created specially for

12 May 25, 2022
Python library to interact with Move Hub / PoweredUp Hubs

Python library to interact with Move Hub / PoweredUp Hubs Move Hub is central controller block of LEGO® Boost Robotics Set. In fact, Move Hub is just

Andrey Pokhilko 499 Jan 04, 2023
Parser for the GeoSuite[tm] PRV export format

Parser for the GeoSuite[tm] PRV export format This library provides functionality to parse geotechnical investigation data in .prv files generated by

EMerald Geomodelling 1 Dec 17, 2021
A simple website-based resource monitor for slurm system.

Slurm Web A simple website-based resource monitor for slurm system. Screenshot Required python packages flask, colored, humanize, humanfriendly, beart

Tengda Han 17 Nov 29, 2022
Sudo type me a payload

payloadSecretary Sudo type me a payload Have you ever found yourself having to perform a test, and a client has provided you with a VM inside a VDI in

7 Jul 21, 2022
Beginner Projects A couple of beginner projects here

Beginner Projects A couple of beginner projects here, listed from easiest to hardest :) selector.py: simply a random selector to tell me who to faceti

Kylie 272 Jan 07, 2023
Exercicios de Python do Curso Em Video, apresentado por Gustavo Guanabara.

Exercicios Curso Em Video de Python Exercicios de Python do Curso Em Video, apresentado por Gustavo Guanabara. OBS.: Na data de postagem deste repo já

Lorenzo Ribeiro Varalo 0 Oct 21, 2021
This is the DBMS Project done in 5th sem of B.E CS.

Student-Result-Management-System This is the DBMS Project done in 5th sem of B.E CS. You need to install SQlite DB Browser in your pc or laptop to ope

Vivek kulkarni 1 Jan 14, 2022
Hitchhikers-guide - The Hitchhiker's Guide to Data Science for Social Good

Welcome to the Hitchhiker's Guide to Data Science for Social Good. What is the Data Science for Social Good Fellowship? The Data Science for Social Go

Data Science for Social Good 907 Jan 01, 2023
Kunai Shitty Raider Leaked LMFAO

Kunai-Raider-Leaked Kunai Shitty Raider Leaked LMFA

5 Nov 24, 2021
Dapp / Forge traces enhancer

traces-explorer Dapp / Forge traces enhancer Usage traces.py and pattern_* files should be in the same directory make test traces.txt py traces.

1 Feb 02, 2022