Inspired by the creations of my friend Soulwire, I spent a couple of hours last night coding up a simple algorithm that generates patterns from joined equilateral triangles. A random variable acts on the hypoteneuse of the triangles in 10% of cases, making the triangles shrink in size and lean, occasionally.
I've written it in Matlab for now (great for prototyping algorithms) but will probably switch to something more visually elegant (e.g. Processing / Open Frameworks) later.
It needs work but here are some initial images. Click to view larger.
Monday, 14 March 2011
Friday, 11 March 2011
Dynamixel Master / Slave network with Matlab
Following my last post I've now got two dynamixels working on the same network with Matlab. The flexibility of these servos means that one can be used just as a position sensor. This lets you do some cool stuff, like this simple tracking controller, where one servo follows the other. This is known as a master / slave network. The moving one is the slave as it obeys the master.
To make this work you need to set the ID of each dynamixel differently. This is obvious, but without the Dynamixel Wizard from Robotis (which didn't work on my machine) I had a hard time trying to figure out how to make this happen. In the end I discovered that by using the following command with an ID of 254 you can broadcast a new ID to every servo on the network.
(calllib('dynamixel','dxl_write_byte',254,3,new_ID))
So, just connect one servo to the network and broadcast it a new ID!
The Matlab source code for the master slave demo can be downloaded here.
IMPORTANT! - You won't feel the forces from the slave servo on the master. Do not stick your finger or anything else in the way to check!
To make this work you need to set the ID of each dynamixel differently. This is obvious, but without the Dynamixel Wizard from Robotis (which didn't work on my machine) I had a hard time trying to figure out how to make this happen. In the end I discovered that by using the following command with an ID of 254 you can broadcast a new ID to every servo on the network.
(calllib('dynamixel','dxl_write_byte',254,3,new_ID))
So, just connect one servo to the network and broadcast it a new ID!
The Matlab source code for the master slave demo can be downloaded here.
IMPORTANT! - You won't feel the forces from the slave servo on the master. Do not stick your finger or anything else in the way to check!
Labels:
drawing robot,
dynamixel,
example,
master slave,
Matlab,
RX28,
servo,
source
Monday, 7 March 2011
Simple Dynamixel / Matlab Example Code
Though a MATLAB API is available, I found the on-line examples lacking somewhat, especially when all I wanted to do was drive the servo and log its position. The following code does just that, moving the servo 90 degrees clockwise and anti-clockwise, then displaying a log of the 'present position' and 'moving' registers from the servo EEPROM.
The 'Moving' register is set to '1' when the servo is in motion. This is a bit buggy though as you need a delay in the code for it to read anything other than '1' and it doesn't exactly stop on time. Matlab isn't hard real-time so this pause seems to affect the data logging somewhat (the motion is actually really smooth, unlike what is shown above). Take the 'pause(0.01) out of the code below and you'll see what I mean
Note that you'll need to download and register the dynamixel API with Matlab before using this code.
Here are the instruction from ROBOTIS:
http://support.robotis.com/en/software/dynamixel_sdk/usb2dynamixel/windows/matlab.htm
These instructions from Agave Robotics are also useful
http://www.agaverobotics.com/products/servos/robotis/ax12/docs/Dynamixel-AX12-Matlab.pdf
Note that I had to change the 'open device' code from the examples given above. They just wouldn't work!
I hope this is useful to someone, I spent some time searching for an example like this but couldn't find one. Of course the dynamixel servos can do much more than this but this is a nice place to start.
The source code can be downloaded from Google Docs here.
Thursday, 24 February 2011
Changing Perspectives
My PhD research (on natural reaching in humanoid robots) is going to be presented at a University of Bristol public engagment event in late March featuring live acrobats from Circomedia!
Come along to a free, interactive exhibition for families. Watch aerial circus performers, learn about how they accomplish their extraordinary feats and discover how your body works with TV presenter Alice Roberts. Take part in body painting and talk to local researchers from the University of Bristol about cutting edge research – in anatomy and physiology, neuroscience, robotics and biomechanics – happening in your city.
More information to follow. Here is the website of the event:
http://www.bris.ac.uk/changingperspectives/projects/experience/
| Image from http://www.circomedia.com/ |
Here's the blurb:
More information to follow. Here is the website of the event:
http://www.bris.ac.uk/changingperspectives/projects/experience/
Labels:
Event,
Exhibition,
human motion,
Humanoid Robots,
PhD,
Robots
Wednesday, 23 February 2011
Falcon Grip Delivery
Here is a shot of the extra Novint Falcon grips I received this morning from the Novint Advanced Products Group.
| Spare ball grips for the Novint Falcon |
The detachable grip on the Novint Falcon cries out for customisation, but the active electronics in the grip mean the the Falcon (in the background) won't function unless a grip is attached. I'm planning on hacking the electronics from these spare grips so that I can use my falcon with grips that are more specific to my research.
Watch this space!
Saturday, 5 February 2011
Wabi Sabi DJ set
Nothing to do with robots in this post, but last night I DJ'd at this night in Bristol...
and had a great time :-)
Friday, 28 January 2011
10 minute robot update
Moving house and thesis writing means I haven't had any time to work on my 3D scanning robot lately. Anyway, here's a video I put on YouTube almost 2 weeks ago of some 1dof movement with 3D visualisation in processing. The communication is done via serial.
Labels:
arduino,
infra-red,
processing,
robot,
scanner,
sharp sensor
Subscribe to:
Posts (Atom)




