Differential wheeled robot simulator

This Processing application is ment to simulate a differential wheeled robot, very used nowadays. This app will be usefull in our Robotics Workshops!

Differential Drive Simulator in Processing

I missed the github class so here it is the good’old zip
Here’s the link to the repo, you’re welcome to contribute ;)

There are still a couple of enhancements on the list:

  • real metrics and scale
  • connect to motor encoders
  • record a path on the virtual world and let the real robot follow it
  • become real simulator of the arduino code used in our robotics workshops

The video is reproduced a lot faster than the program really performs  :p

Some control keys are available:
Differential Drive Simulator in Processing
Differential Drive Simulator in Processing

The overall program is quite simple to use, just pass the mouse over the joystick area to control the bot.
Differential Drive Simulator in Processing

The program basically maps joystick values X and Y to a differential drive system where two motors are used to drive a robot.

There is also a representation of a robot and its path according to the motors differential rotation.

Credits:

The joystick program was based on a program entitled ‘JoystickSimulation’ by: Vince Thompson
http://diyroboticslab.wordpress.com/2009/06/17/joystick-simulation-with-processing/

The robot program was based on a program entitled ‘Kephera Simulator’ by Adam Matic of Croatia
http://gritsgroup.org/robotsimulator.htm

New Basic Arduino Serial Communication

This is an updated example of basic serial communication between Arduinos, the old example can be found here.

Sender code:

[Arduino]

// SENDER
int b1 = 7;
int b2 = 8;

void setup()
{
Serial.begin(9600);
pinMode(b1, INPUT);
pinMode(b2, INPUT);
digitalWrite(b1, HIGH);
digitalWrite(b2, HIGH);
}

void loop()
{
byte val1 = (byte)digitalRead(b1);
byte val2 = (byte)digitalRead(b2);
Serial.write(‘a’); //SYNC char
Serial.write(val1);
Serial.write(‘b’); //SYNC char
Serial.write(val2);
delay(50);
}

 

[/Arduino]

Receiver Code:

// RECIEVER
byte led1;
byte led2;

void setup() {
Serial.begin(9600);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
delay(1000);
}

void loop() {
if(Serial.available() > 0)
{
char inChar = Serial.read();
while(Serial.available()<=0);

if (inChar == ‘a’)
{
led1 = Serial.read();
}

if (inChar == ‘b’)
{
led2 = Serial.read();
}
}

digitalWrite(9, led1);
digitalWrite(8, led2);
delay(10);
}

Sega Rally Championship @ Codebits VI

Codebits as you might know is the most geekest event in Portugal and surroundings!

Its audience range goes from programmers and entrepeneurs to hackers and designers! This year 800 people came to participate in 3 days full of talks, challenges, games, demos and junk food!!

About our participation @ Codebits VI, at Artica we are extremely addicted to race games, Trackmania is only one of our favourites!! We still are addicted to race games but we usually don’t play them, instead, we prefer to create our own games.. :D we thought it would be way cool to drive a remote control car using a steering wheel and pedals, and if the car had a wireless cam, the gamer could look at the screen and really see what the car was seeing in real time, just like an arcade game!

This was our proposal to Codebits! To have an arcade game where it would be possible to drive two cars and participate in a real race, without any simulations or complex algorythms, neither 3D graphics.. we want something real! Celso Martinho was very excited with our idea, and by coincidence (or not) they were planning to have a retro gaming area at codebits!! Luis Sobral also known as TheArcadeMan, was the one behind the retro gaming area, Luis refurbishes old arcade machines and transforms them into brand new machines just like magic!

Besides having his own Arcades there, he was working on 10 old arcade machines, making them work with the so acclaimed Raspberry PI!!

Luis had just bought two old SegaRally Consoles, and there was the possibility to transform them to be the control station for our RC cars! On a first (of many) tours to Luis’s “mancave” we start disassembling the old consoles, removing the old electronics boards, wondering the best way to connect all the gear!

Sega Rally Championship
apologize for the crappy quality photo :p

There is a strange beauty in this sturdy mechanical systems, they are so well engineered and one can feel they were pushed into the limits through the years, and are still able to be pushed a lot more!

IMG_3247

This was the throttle pedal gear, on the right you can see a hand-made replacement, it was a cool hack to do.. and a miracle that it worked flawlessly all the event!

Sega Rally Championship

At this stage we couldn’t imagine that one of the biggest challenges was about to come!! Yes, the CRT’s… to send Video signal to this old CRT is not impossible by any means.. but it prooved to be way to much complicated for us..

Sega Rally Championship

after many attempts and despair.. we finally decided to “kill the rabbit”!! We found two Mitsai CRT’s willing to have a new glorious life!!! :D

Sega Rally Championship

And they fitted perfectly in the old frame!

Sega Rally Championship

The steering, pedals, gears and buttons were connected to an Arduino, and data was sent via xbee to the car.

Sega Rally Championship

The car had a receiver Arduino mapping the data to the wheels, throttle and to the video switch! The gamer could choose wich camera to use, the front camera proved to be extremely difficult to use and only hardcore drivers used it!! The upper camera needed a support, and it had its iterations due to be easily broken when the car crashes or capsize! The final iteration was a one PVC piece bended with heat, it proved to be sturdy and survived to the hole event!

Sega Rally Championship

Sweet!

IMG_3734_

Finally at Codebits VI !! :D Artica had the honor to be at the Hardware Den with TheArcadeMen, Altlab, Ultimaker, InMotion, Mitch Altman and RaspberryPI Foundation.

The Sega Rally Championship Arcade was fully working all the time, we only need to stop a couple of times for final tweaks..

Sega Rally Championship

..and to recharge batteries!

Sega Rally Championship

To drive this things was extremely cool!! We are looking forward to repeat the experience!!

Sega Rally Championship

As a final note, we want to give a big thanks to all SAPO and PT Team for making this event a reality, Mauricio Martins and Adriano Couto from AltLab for helping us with the CRT’s, Francisco Dias gave a major help with his hacking skills, João Ribeiro for being a true Artica member, Filipe Valpereiro for all the hardcore geeky support, he was the guy who told us how to remove the steering wheel lag caused by the xbee buffer.. and finally thank you Celso for believing in us!!!

Shop Window – Interactive Instalation

Here we are at the Museu das Telecomunicações (Comunications Museum) in Lisbon.

One of the museum installations is a shop window, showing three old devices, and when you place your hand or finger one the window, content is displayed on the side screen… fair enough, but the truth is that is was lacking some more interactivity, and we suggested to have spot lights on each device, and every time someone touch the area, the spot would fade in and the others simply fade out. Another cool thing we added was a led-strip on the top, giving an ambient light when there was no interaction, and blue light when someone touch the glass, everything just faded smoothly.

Robotic Claw

This is a first experiment on building a 3D printed robotic claw, I first got inspired by this project but it was designed for a micro servo, and I wanted to use a standard size servo so I had to design the claw from scratch.

Robotic Claw

The actual design still need one tweak or two to be optimized for 3D printing, but as it is now is fully functional.

STL files are available at http://www.thingiverse.com/thing:31056

Robotic Claw

SapoBot

SapoBot is a robot that wonders through spaces avoiding obstacles detects holes on the ground, follow walls and follow lines, to change between behaviors you only need to press the shell, and when he detects a collision gives a frog sound. This project was comissioned by Sapo, means frog in portuguese.

This bots were made with a Farrusco chassis and Motoruino and once again with the great IDMind hardware and electronics skills, all the credits for the eyes mechanics and all the rest of the hardware upgrade goes to them.


The shell was made by Fernando and Margarida Antunes, don’t forget to check their amazing art work at http://margaridantunes.weebly.com.


This is a Farrusco on steroids!! Only the pins 0 and 1 for serial communication are free, all the other pins are taken for a considerable amount of sensors and actuators: 3 infrared sensors to measure distances on the front, 3 infra red sensors facing the ground, a speaker, 1 RGB LED, 1 servo motor, 2 dc motors and 2 bumper micro-switches to detect collisions.


The eyes are meant to give some human expression to the bot, they turn organically to both sides according the direction that the robot takes.


We coded an application in Processing to check all the sensors and actuators, allowing to save settings on the microcontroller EEPROM. This code will be available on Artica’s github soon.


Time to drink some juice :]


And the result is a happy family!

ICU2

I SEE YOU TOO, is the 2nd version of the original ICU

This version gained an upgrade in both hardware and software.

The hardware is mostly based on servocity.com pan and tilt systems.

This is a work in progress, until now what is implemented is Face Detect with the openCV library for Processing.
Next stage is to implement a more robust face and emotions detection and this will run on top of an inverse kinematics algorithm. What we want the most is ICU2 to be a living organism, with a complex behavior tree system.

Motoruino and Motors – Workshop @ ALTLAB

Last Wednesday Artica lectured a Motoruino workshop at AltLab.
Beside all the participants there were more than a hundred watching a live stream on Ustream, people from Viseu, Guimarães, Porto, Évora, Madrid and many more places I believe.

The central theme was Motoruino and motors such as Servos, DC motors, Steppers and Linear actuators.

In the end we had Farrusco working in Obstacle Avoidance and Following Light mode.



Video streaming by Ustream

ICU . 1.01

ICU has been sleeping for a while but was awaken suddenly because I was invited to an exhibition at Flausina, a new born association in Lisbon.

ICU v1.01

Complexity is always a welcome thing around here and the bot was presented with two more servo motors and all the software has been re-written. And because I needed to simulate its movements I coded an application in Processing in a way that I could test all the non-dangerous angles. Inverse kinematics is way to advanced for my taste and I think I can call this a “forward kinematics simulator”. This simulator gives also the possibility to generate individual sine waves for each motor, minimum and maximum range of motion, an interpolator for smoothness and frequency for speed.

ICU v1.01

Unfortunately I don’t have any decent video of photos of the Flausina exhibition, I leave you with a video of the bot in the office with the processing application.

TODO list:

– capability to save presets
– timeline with keyframes, play and stop buttons
– upgrade this servos to more powerful and digital servos
– upgrade all the structure to enhance weight distribution
– create a mask in silicon/rubber and give this bot a crazy new look
– everytime a face is detected it will say something on Twitter and upload the picture in an online gallery

Source code can be downloaded here.

All for now.. Roger, over and out.

ICU v1.01

Photo at Flausina.