Tuesday 11 December 2012

Learning ROS (Robot Operating System)


I am currently learning ROS (robot operating system) which is an open source system for autonomous robots.  It is a collection of device drivers, libraries, and programs designed to make sophisticated robotics accessible to anyone. 

ROS runs on Ubuntu Linux, so I downloaded the Ubuntu Windows installer which sets up a dual boot.  I originally downloaded Ubuntu 12.10 which, when I tried to install ROS it would not install. So I tried an old version of Ubuntu 10 it worked but was buggy as hell, so I eventually installed Ubuntu 12.04 LTS (Long term support) ROS installed and everything worked perfectly. 

It was a bit weird at first trying to learn ROS and Linux terminal commands but Linux was surprisingly straightforward. 

The ROS website has tutorials on how to install and set up your environment.  The ROS wiki has 20 beginner level tutorials which teach you how to use ROS. I had to do some of the tutorials a few times to get the hang of it, also to learn a bit about how Linux works on the command line. Adding this line "source /opt/ros/fuerte/setup.bash" to your ~/.bashrc helped me a lot i.e. "sudo gedit ~/.bashrc".

After doing a few of the beginner's tutorials I decided to try out some of the visualisation tools in ROS i.e. openni_launch with RVis. So I bought myself a Microsoft Kinect from Dick Smith.  It took a bit of fiddling but I got it working in a few hours.  The results were pretty awesome, the image below is the result, it is a combination image between the camera and the laser rangefinder on the Kinect. With this, ROS is able to build a map of the environment allowing the robot to navigate autonomously. 



I've only been playing with ROS for a week and a half  and I've made a lot of progress so far.  I'll let you all know how I go over the next few weeks.

Sunday 25 November 2012

3D Printer Filament

A few weeks ago we ran out of 3D printer filament for the Ultimaker after Nick printed a large bust of Admiral Ackbar - the print failed. (Plastic filament is what most 3D printers use to print objects.)

So we ordered some more from OZ RepRap Supplies. It's a 2.3 kg roll of blue. It took a week and a bit to arrive, but the quality is great. With the old grey filament that came with the printer, every second print was a failure. We haven't had a single failure with this stuff.

The next project is a desktop trebuchet! I'm thinking of building a competing design and we can have a war.

Monday 19 November 2012

My Page Turner

I noticed that Nick has been a bit lazy when it comes to his blog, so I've decided to do a few posts of my own.

A few months ago I discovered Google play and I have been reading book after book in my web browser. This works just fine when I am at my computer as I just use the mouse to flick the pages. Like many people I use my computer as a media centre and I have the TV above my bed connected to the computer as a second monitor. I watch movies YouTube and ABC IView.

I can also read books on the computer as I lay in bed, but turning the pages is a real problem. My muscular dystrophy makes it difficult to use the keyboard to press the right or left arrow key. So I was asking my carer and anybody else turn the page by pressing the right arrow key.

It was actually my mother who said to my brother, "Why can't you use that Arduino stuff you fiddle around with to make a page turner for your brother?"

Nick's idea was to use two Arduinos a 433 mhz transmitter and a receiver shield. One Arduino and  the transmitter would be in a separate box powered by a 9 V battery and attached to a button. (It is not in a box yet.) Its a Freetronics Eleven.


The Freetronics Eleven with button and battery.

 The code for this bit:

#include <VirtualWire.h>

char Istr[6];

void setup()
{
pinMode(13,OUTPUT);

pinMode(3,INPUT); // Input pin for the microswitch
digitalWrite(3,HIGH); // Set input pin high

// Initialise the IO and ISR
vw_set_ptt_inverted(true); // Required for DR3100
vw_setup(4000); // Bits per sec
vw_set_tx_pin(8);
}


void loop()
{
const char *msg = "h"; // Send 'h' if the switch is open
const char *msg2 = "f"; // send 'f' if the switch is closed

// is the microswitch open or closed
if (digitalRead(3)==HIGH){

digitalWrite(13,HIGH);
// Send 'h' if the switch is open
vw_send((uint8_t *)msg, strlen(msg));
vw_wait_tx(); // Wait until the whole message is gone
}else{
digitalWrite(13,LOW);
// send 'f' if the switch is closed
vw_send((uint8_t *)msg2, strlen(msg2));
vw_wait_tx(); // Wait until the whole message is gone
}
}


The other Arduino would have a receiver shield and be attached to the computer. We got this working, but interpreting signals from the serial port was tricky. We needed to rely on another piece of software on the computer to do this. We decided an easier solution was to get an Arduino Leonardo. A Leonardo can mimic the signals from a keyboard or a mouse, you just plug it in and it works (provided it has the correct software on board).

Arduino Leonardo Attached to receiver shield.

Code for the Leonardo:

#include <VirtualWire.h>

char Istr[6];
int timer1;
int timer2;
int a;

void setup()
{

timer1 = millis();
a = 0;

pinMode(13,OUTPUT);

Keyboard.begin();
// Initialise the IO and ISR
vw_set_ptt_inverted(true); // Required for DR3100
vw_setup(4000); // Bits per sec
vw_set_rx_pin(8);

vw_rx_start(); // Start the receiver PLL running
delay(1500);

}


void loop()
{
timer1 = millis();

uint8_t userInput[VW_MAX_MESSAGE_LEN];
uint8_t buflen = VW_MAX_MESSAGE_LEN;

// mmessage gets the virtual wire message
vw_get_message(userInput, &buflen);

char test1 = userInput[0];

if ((test1=='f')&&(a == 0)){
// Flashes pin 13 LED
digitalWrite(13,HIGH);
// Press right arrow key
//Keyboard.write(37);
Keyboard.write(KEY_RIGHT_ARROW);
timer2 = millis();
a = 1;
}else{
digitalWrite(13,LOW);
}

if((timer2+700)<timer1){

a = 0;

}
}

The Leonardo is a great piece of hardware as it just plugs straight into your computer and just works. It literally took Nick only a bit of code writing to get it working. There are a huge number of things we can use this for. We could use it to make a button box that would allow disabled people that can't use a keyboard to play games that require lots of keys to be pressed. There are devices out there that do this, but they can be expensive and the software can be a bit flaky.

There is also huge scope for pranks with this device. Set it up to press the enter key and then the next time someone comes to write an e-mail...

Hopefully it won't be too long until my next post. Nick has done a lot on his robot, but failed to tell his blog about it.

Tuesday 14 August 2012

Success

I've finally had success with my robot. I can now control the wheel chair from my computer.

I've built a Java application which I call a virtual joystick.



The next picture shows the setup I use to control the chair. On the right hand side is the joystick controller for the wheelchair. On the left is the Arduino 2560 with a Freetronics 433mhz reciever board and a circut with two digital to analog converters. This circut is connected via a ribbon cable to the wheelchair controller. In the bottom of the picture are two wires that connect to the power supply of the joystick, this is to trick the electronics of the wheelchair into thinking everything is connected correctly.

This is the base of the wheelchair it all connects up to.

This is the 3D printer making the box that the electronics will go into.
I'll be posting the Java and Arduino code, as well as the circut diagram soon, so that others can easily repeat what I have done.


Sunday 29 July 2012

Ultimaker

I've had the Ultimaker up and running for about 10 days now i'm still ironing out the bugs.  I have been using Cura to generate the G code However I wish to try other programs to see if I can get better results. I am currently in the process of working out how to use Skeinforge

Here are some videos of my Ultimaker in action.




Monday 16 July 2012

Ultimaker is together

We have finally got the Ultimaker together and have had our first successful print.  Our first 4 attempts ended in a stringy mess but we got a pretty good print on the fourth try. 

You can see the middle bunny looks like a pig and the pyramid is a bit fuzzy around the inside edges. But the resolution of the print is pretty good.


Friday 13 July 2012

Our Robotic Future

The last decade has been all about the Internet. This decade will be all about robots. They are already starting to take over some of the more mundane tasks like vacuuming, mowing the lawn even parking your car is becoming automated.  By the end of this decade your car will drive itself, robots will be assisting in the care of the elderly and disabled, tele-presence robots will be everywhere and will be a normal part of life.  Almost every aspect of our lives will be affected by some level of automation.

One of the biggest advances in the field of Robotics has been the development of powered exoskeletons (Raytheon XOS 2 , HAL ).  These are robots that you wear - they use electronic actuators to assist movement.  They have mainly been used to help people with spinal cord injuries to walk again.  They also require the use of crutches meaning they can only be used by disabled people with significant upper body strength.  They are all so very expensive.  I wish to develop an exoskeleton that will be full body including the fingers and adaptable to many different disabilities.

I believe powered exoskeletons will revolutionise the lives of many people with disabilities. They will also be used in search and rescue also in all sorts of industries from construction, manufacturing to landscape gardening and everything in between.  Before exoskeletons get to this standard a lot of research and development needs to be done.  Industrial exoskeletons simply need better batteries before widespread use is possible.

However exoskeletons for people with disabilities will be much more difficult to achieve. Each disability will require different problems to be overcome.  My disability for example, Duchenne muscular dystrophy, all my nerves work perfectly fine, but my muscles are so weak I'm basically paralysed.  The exoskeleton would need a way to receive the information from the nervous system using either EMG ( Electromyography ) or a more direct interface to individual nerves. EMG is problematic because it relies on electrical signals generated by your muscles as my muscles are very weak the signals are also very weak.

Exoskeletons for people with spinal-cord injuries have already been developed (Ekso), but are not very user-friendly and require the use of crutches or a joystick like the Rex exoskeleton.  Ultimately a direct connection to the nervous system would be required, this is still some time away.  In the timebeing gyroscopes and a myriad of the other sensors along with sophisticated software could be used to make the use of these exoskeletons more natural, and would greatly enhance there capabilities.  In the coming years these devices might even replace manual wheelchairs.

Exoskeletons could also be used to smooth out involuntary motions by people with cerebral palsy.  This is achievable now it just needs people to make it happen.

Exoskeletons would be beneficial for people suffering from many other conditions, not to mention the rehabilitation potential of these devices.  The possibilities offered by powerd exoskeletons are truly awesome, I intend to realise these possibilities.


Sunday 8 July 2012

Circuit for Wheelchair Robot

Earlier this year I decided to turn one of my old wheelchairs into a robot.  I really had no idea where to start fortunately I came across a website called Critical Tinkerers who are a student group out of Iowa State University.  They had done exactly what I wanted to do and the best thing is they published exactly how to do it.  It involved mimicing the output of the joystick it was a fairly simple circuit using an arduino microcontroller a digital to analog converter (DAC) and two amplifiers to increase the voltage to match the the output of the joystick.

I managed to build the circuit with a bit of help of my carers in my stepdad Peter. However when it became time to connect it to the wheelchair it was different to what I expected, the circuit was not designed for this joystick.  I had made an assumption that the joystick was the same as the one the Critical Tinkerers wheelchair but it was completely different.  The Critical Tinkerers wheelchair had 2 inputs an X and Y where as my one had 4 imputs 2 X's and 2 Y's. Thankfully I was able to use some elements of their circuit in a new circuit it was actually much simpler it uses 2 digital to analog converters with no amplifiers.  However I didn't have enough DAC's to make the new circuit so I've had to order more.  When they arrive I should have a robot hopefully.

This is the Critical Tinkerers circuit.




My circuit with ribbon cable plug, the green circuit below is a radio receiver, You can also see a bit of the critical tinkerers circuit in the bottom right.

This is a dynamic wheelchair controller.

This is the backside of the controller. Ribbon cable attached in the top right.


Wednesday 4 July 2012

Ultimaker

About six weeks ago I ordered an Ultimaker 3-D printer it arrived today woot.

The ceremonial bubblewrap popping


Laser cut plywood bits stepper motors and a roll of PLA plastic
All the other bits


Tuesday 3 July 2012

This is my Lynx Motion AL5D

This is my Lynx Motion AL5D Robot arm I have upgraded it with an Arduino mega 2560. I used a Sparkfun Mega Shield kit and a mini bread board. I also used a 6 volt transformer for the power supply.




Thursday 28 June 2012

Future Robot

I've got a couple of old wheelchairs that I want to re-purpose into robots the first one is my old wheelchair it's about 20 years old. The other one is an old one picked up when a friend of mine upgrade his wheelchair.

The best thing is they both use the same controller, so once I figure out how to get one working the other should be easy. I plan on using an Arduino with a radio receiver shield to output to the wheelchair controler. I'm very inexperienced with this sort of stuff so it should be interesting.
 


hizzer