Tag Archives: Robot arm

Belated Report of Happenings

Been meaning to get the ol’ blog updated for a while but what with shooting to and fro between Manchester and London and the crappy Internet (spell check is bitchin at me to capitalize “Internet”, since when was it a proper noun? and more importantly when did i start giving a damn about spelling?) connection I’ve been getting i haven’t gotten around to it….TILL NOW!

3D Scanner
Done a little more work on the (soon to be OpenSource/Creative Commons) 3D Scanner project. Just need one final push to get the door done and add the nut fixings on the other side of the bolt holes and then it should be ready for sending the design off to the laser cutters and doing some actual physical building!



The odd looking bit sticking out the side is the camera mounting (I’m going to use a PS3 Eye). It’s on movable rails to allow for adjustments for the field of view of the camera (PS3 Eye has 2 settings), a concertina type cardboard/cloth covering is going to be between the camera housing and the main body of the scanner to prevent light entering.

Robot Arm
Got the robot arm working over Christmas, i even have a crappy phone video of it in action i’ve been meaning to upload but haven’t due to aforementioned Internet woes.
Next step will be a total strip down, clean, and rebuild. Looks like some of the actuators have gummed up a bit, and most of the joints are a bit on the creaky side. Will then start looking into some kind of (most probably arduino based) computer interface and then a set of libraries for inverse kinematics and the like (although ROS looks like a promising alternative to a custom library)

Clock
While home over Christmas and browsing through an awesome book my brother got me for Christmas (“507 Mechanical Movements”) I got inspired to try and make (another) clock using some odd mechanical assemblies.



The designs not finished, and it probably never will be due to a couple of flaws, but it was an interesting exercise and I’ll hopefully get around to working on a mark 2 at some point in the near future (probably once i’ve finished the 3D scanner).

Robot Arms, Chaotic Python, and London

So I’ve moved down to London, which is kind of like Manchester except the buses smell slightly better. In a hostel at the moment with a 1Mb connection and a single router for the whole place so internet is somewhat intermittent.

While i’m without tools, building materials, and internetty distractions I’ve finally decided to learn some python, which, i have to say, is starting to grow on me quite a lot. It’s like programming is fun again rather than just a tool to get stuff done with. So without further ado here is my first python program. It uses pyglet (which is awesome) to plot the points of this equation: x_next = x*r*(1-x)

#! /usr/bin/env python

from pyglet.gl import *
from pyglet.graphics import *
from pyglet.window import key

class HelloWorldWindow(pyglet.window.Window):

    def __init__(self):
         super(HelloWorldWindow, self).__init__()
         self.param = 2.8
         self.start_val = .34
         self.y_vals =[0]
         self.create_chaos()
         self.label = pyglet.text.Label('PgUp/PgDown-Starting Value Up/Down-Lambda Value')

     def on_draw(self):
         glClear(GL_COLOR_BUFFER_BIT)
         glLoadIdentity()
         for count in range(0,800):
             pyglet.graphics.draw(1, pyglet.gl.GL_POINTS,('v2i', (count, int(self.y_vals[count]*200))))
         self.label.draw()

     def create_chaos(self):
         self.y_vals =[self.start_val]
         r = self.param
         for x in range(0,800):
             self.y_vals.append(self.y_vals[x]*r*(1-self.y_vals[x]))

     def on_key_press(self, symbol, modifiers):
         if symbol == key.UP:
             print ['Lambda: ', self.param]
             self.param += 0.05
             if self.param >= 4:
                 self.param = 4
         elif symbol == key.DOWN:
             self.param -= 0.05
             print ['Lambda: ', self.param]
         elif symbol == key.PAGEUP:
             self.start_val += 0.05
             if self.start_val > 1:
                 self.start_val =1
             print ['Lambda: ', self.start_val]
         elif symbol== key.PAGEDOWN:
             self.start_val -= 0.05
             if self.start_val < 0:
                 self.start_val =0
             print ['Lambda: ', self.start_val]
         self.create_chaos()

if __name__ == '__main__':
     window = HelloWorldWindow()
     pyglet.app.run()

PgUp/PgDown adjust the starting value of x while the up/down keys adjust the value of r.

The equation is from the book Chaos by James Gleick and demonstrates a chaotic system (keep pressing up and see how the system becomes stable in multiple states before turning chaotic).

The system stable in one state


The system stable in multiple states


Things getting chaotic

I really can’t describe it as eloquently and simply as the book, which i highly recommend reading.

In other exciting news i bought a hydraulic robot arm from a car boot sale for a mere 40 pounds!

My good friend lon who helped me transport the arm to my parents (hello lon! Your probably the only one whos gonna read this 😉 )


Me attending to the arm

Kind of frustrating not being able to play with it being in London an all, but with my new found python&pyglet skillz i’m gonna try and write some inverse kinematics code to control it when i finally do get my hands on it. If i get some free time/ internet i’ll post some details about it.