Petter Reinholdtsen

Entries tagged "robot".

My own self balancing Lego Segway
4th November 2016

A while back I received a Gyro sensor for the NXT Mindstorms controller as a birthday present. It had been on my wishlist for a while, because I wanted to build a Segway like balancing lego robot. I had already built a simple balancing robot with the kids, using the light/color sensor included in the NXT kit as the balance sensor, but it was not working very well. It could balance for a while, but was very sensitive to the light condition in the room and the reflective properties of the surface and would fall over after a short while. I wanted something more robust, and had the gyro sensor from HiTechnic I believed would solve it on my wishlist for some years before it suddenly showed up as a gift from my loved ones. :)

Unfortunately I have not had time to sit down and play with it since then. But that changed some days ago, when I was searching for lego segway information and came across a recipe from HiTechnic for building the HTWay, a segway like balancing robot. Build instructions and source code was included, so it was just a question of putting it all together. And thanks to the great work of many Debian developers, the compiler needed to build the source for the NXT is already included in Debian, so I was read to go in less than an hour. The resulting robot do not look very impressive in its simplicity:

Because I lack the infrared sensor used to control the robot in the design from HiTechnic, I had to comment out the last task (taskControl). I simply placed /* and */ around it get the program working without that sensor present. Now it balances just fine until the battery status run low:

Now we would like to teach it how to follow a line and take remote control instructions using the included Bluetooth receiver in the NXT.

If you, like me, love LEGO and want to make sure we find the tools they need to work with LEGO in Debian and all our derivative distributions like Ubuntu, check out the LEGO designers project page and join the Debian LEGO team. Personally I own a RCX and NXT controller (no EV3), and would like to make sure the Debian tools needed to program the systems I own work as they should.

Tags: debian, english, lego, robot.
All drones should be radio marked with what they do and who they belong to
21st November 2013

Drones, flying robots, are getting more and more popular. The most know ones are the killer drones used by some government to murder people they do not like without giving them the chance of a fair trial, but the technology have many good uses too, from mapping and forest maintenance to photography and search and rescue. I am sure it is just a question of time before "bad drones" are in the hands of private enterprises and not only state criminals but petty criminals too. The drone technology is very useful and very dangerous. To have some control over the use of drones, I agree with Daniel Suarez in his TED talk "The kill decision shouldn't belong to a robot", where he suggested this little gem to keep the good while limiting the bad use of drones:

Each robot and drone should have a cryptographically signed I.D. burned in at the factory that can be used to track its movement through public spaces. We have license plates on cars, tail numbers on aircraft. This is no different. And every citizen should be able to download an app that shows the population of drones and autonomous vehicles moving through public spaces around them, both right now and historically. And civic leaders should deploy sensors and civic drones to detect rogue drones, and instead of sending killer drones of their own up to shoot them down, they should notify humans to their presence. And in certain very high-security areas, perhaps civic drones would snare them and drag them off to a bomb disposal facility.

But notice, this is more an immune system than a weapons system. It would allow us to avail ourselves of the use of autonomous vehicles and drones while still preserving our open, civil society.

The key is that every citizen should be able to read the radio beacons sent from the drones in the area, to be able to check both the government and others use of drones. For such control to be effective, everyone must be able to do it. What should such beacon contain? At least formal owner, purpose, contact information and GPS location. Probably also the origin and target position of the current flight. And perhaps some registration number to be able to look up the drone in a central database tracking their movement. Robots should not have privacy. It is people who need privacy.

Tags: english, robot, sikkerhet, surveillance.
Perl library to control the Spykee robot moved to github
19th October 2013

Back in 2010, I created a Perl library to talk to the Spykee robot (with two belts, wifi, USB and Linux) and made it available from my web page. Today I concluded that it should move to a site that is easier to use to cooperate with others, and moved it to github. If you got a Spykee robot, you might want to check out the libspykee-perl github repository.

Tags: english, nuug, robot.
Debian, the Linux distribution of choice for LEGO designers?
11th May 2013

In January, I announced a new IRC channel #debian-lego, for those of us in the Debian and Linux community interested in LEGO, the marvellous construction system from Denmark. We also created a wiki page to have a place to take notes and write down our plans and hopes. And several people showed up to help. I was very happy to see the effect of my call. Since the small start, we have a debtags tag hardware::hobby:lego tag for LEGO related packages, and now count 10 packages related to LEGO and Mindstorms:

brickosalternative OS for LEGO Mindstorms RCX. Supports development in C/C++
leocadvirtual brick CAD software
libnxtutility library for talking to the LEGO Mindstorms NX
lnpddaemon for LNP communication with BrickOS
nbccompiler for LEGO Mindstorms NXT bricks
nqcNot Quite C compiler for LEGO Mindstorms RCX
python-nxtpython driver/interface/wrapper for the Lego Mindstorms NXT robot
python-nxt-filersimple GUI to manage files on a LEGO Mindstorms NXT
scratcheasy to use programming environment for ages 8 and up
t2nsimple command-line tool for Lego NXT

Some of these are available in Wheezy, and all but one are currently available in Jessie/testing. leocad is so far only available in experimental.

If you care about LEGO in Debian, please join us on IRC and help adding the rest of the great free software tools available on Linux for LEGO designers.

Tags: debian, english, lego, robot.
Moved the pymissile Debian packaging to collab-maint
10th January 2013

As part of my investigation on how to improve the support in Debian for hardware dongles, I dug up my old Mark and Spencer USB Rocket Launcher and updated the Debian package pymissile to make sure udev will fix the device permissions when it is plugged in. I also added a "Modaliases" header to test it in the Debian archive and hopefully make the package be proposed by jockey in Ubuntu when a user plug in his rocket launcher. In the process I moved the source to a git repository under collab-maint, to make it easier for any DD to contribute. Upstream is not very active, but the software still work for me even after five years of relative silence. The new git repository is not listed in the uploaded package yet, because I want to test the other changes a bit more before I upload the new version. If you want to check out the new version with a .desktop file included, visit the gitweb view or use "git clone git://anonscm.debian.org/collab-maint/pymissile.git".

Tags: debian, english, isenkram, robot.
New IRC channel for LEGO designers using Debian
2nd January 2013

During Christmas, I have worked a bit on the Debian support for LEGO Mindstorm NXT. My son and I have played a bit with my NXT set, and I discovered I had to build all the tools myself because none were already in Debian Squeeze. If Debian support for LEGO is something you care about, please join me on the IRC channel #debian-lego (server irc.debian.org). There is a lot that could be done to improve the Debian support for LEGO designers. For example both CAD software and Mindstorm compilers are missing. :)

Update 2012-01-03: A project page including links to Lego related packages is now available.

Tags: debian, english, lego, robot.
First version of a Perl library to control the Spykee robot
9th October 2010

This summer I got the chance to buy cheap Spykee robots, and since then I have worked on getting Linux software in place to control them. The firmware for the robot is available from the producer, and using that source it was trivial to figure out the protocol specification. I've started on a perl library to control it, and made some demo programs using this perl library to allow one to control the robots.

The library is quite functional already, and capable of controlling the driving, fetching video, uploading MP3s and play them. There are a few less important features too.

Since a few weeks ago, I ran out of time to spend on this project, but I never got around to releasing the current source. I decided today that it was time to do something about it, and uploaded the source to my Debian package store at people.skolelinux.org.

Because it was simpler for me, I made a Debian package and published the source and deb. If you got a spykee robot, grab the source or binary package:

If you are interested in helping out with developing this library, please let me know.

Tags: english, nuug, robot.
My first perl GUI application - controlling a Spykee robot
1st September 2010

This evening I made my first Perl GUI application. The last few days I have worked on a Perl module for controlling my recently aquired Spykee robots, and the module is now getting complete enought that it is possible to use it to control the robot driving at least. It was now time to figure out how to use it to create some GUI to allow me to drive the robot around. I picked PerlQt as I have had positive experiences with the Qt API before, and spent a few minutes browsing the web for examples. Using Qt Designer seemed like a short cut, so I ended up writing the perl GUI using Qt Designer and compiling it into a perl program using the puic program from libqt-perl. Nothing fancy yet, but it got buttons to connect and drive around.

The perl module I have written provide a object oriented API for controlling the robot. Here is an small example on how to use it:

use Spykee;
Spykee::discover(sub {$robot{$_[0]} = $_[1]});
my $host = (keys %robot)[0];
my $spykee = Spykee->new();
$spykee->contact($host, "admin", "admin");
$spykee->left();
sleep 2;
$spykee->right();
sleep 2;
$spykee->forward();
sleep 2;
$spykee->back();
sleep 2;
$spykee->stop();

Thanks to the release of the source of the robot firmware, I could peek into the implementation at the other end to figure out how to implement the protocol used by the robot. I've implemented several of the commands the robot understand, but is still missing the camera support to make it possible to control the robot from remote. First I want to implement support for uploading new firmware and configuring the wireless network, to make it possible to bootstrap a Spykee robot without the producers Windows and MacOSX software (I only have Linux, so I had to ask a friend to come over to get the robot testing going. :).

Will release the source to the public soon, but need to figure out where to make it available first. I will add a link to the NUUG wiki for those that want to check back later to find it.

Tags: english, nuug, robot.
Robot, reis deg...
21st August 2010

I dag fikk jeg endelig tittet litt på mine nyinnkjøpte roboter, og har brukt noen timer til å google etter interessante referanser og aktuell kildekode for bruk på Linux. Det mest lovende så langt er ispykee, som har en BSD-lisensiert linux-daemon som står som mellomledd mellom roboter på lokalnettet og en sentral tjeneste der en iPhone kan koble seg opp for å fjernstyre roboten. Linux-daemonen implementerer deler av protokollen som roboten forstår. Etter å ha knotet litt med å oppnå kontakt med roboten (den oppretter et eget ad-hoc wifi-nett, så jeg måtte gå av mitt vanlige nett for å få kontakt), og kommet frem til at den lytter på IP-port 9000 og 9001, gikk jeg i gang med å finne ut hvordan jeg kunne snakke med roboten vha. disse portene. Robotbiten av protokollen er publisert av produsenten med GPL-lisens, slik at det er mulig å se hvordan protokollen fungerer. Det finnes en java-klient for Android som så ganske snasen ut, men fant ingen kildekode for denne. Derimot hadde iphone-løsningen kildekode, så jeg tok utgangspunkt i den.

Daemonen ville i utgangspunktet forsøke å kontakte den sentrale tjenesten som iphone-programmet kobler seg til. Jeg skrev dette om til i stedet å sette opp en nettverkstjeneste på min lokale maskin, som jeg kan koble meg opp til med telnet og gi kommandoer til roboten (act, forward, right, left, etc). Det involverte i praksis å bytte ut socket()/connect() med socket()/bind()/listen()/accept() for å gjøre klienten om til en tjener.

Mens jeg har forsøkt å få roboten til å bevege seg har min samboer skrudd sammen resten av roboten for å få montert kamera og plastpynten (armer, plastfiber for lys). Nå er det hele montert, og roboten er klar til bruk. Må få flyttet den over til mitt vanlige trådløsnett før det blir praktisk, men de bitene av protokollen er ikke implementert i ispykee-daemonen, så der må jeg enten få tak i en mac eller en windows-maskin, eller implementere det selv.

Vi var tre som kjøpte slike roboter, og vi har blitt enige om å samle notater og referanser på NUUGs wiki. Ta en titt der hvis du er nysgjerrig.

Tags: norsk, nuug, robot.
2 Spykee-roboter i hus, nå skal det lekes
18th August 2010

Jeg kjøpte nettopp to Spykee-roboter, for test og leking. Kjøpte to da det var så billige, og gir meg mulighet til å eksperimentere uten å være veldig redd for å ødelegge alt ved å bytte ut firmware og slikt. Oppdaget at lekebutikken på Bryn senter hadde en liten stabel på lager som de ikke hadde klart å selge ut etter fjorårets juleinnkjøp, og var villig til å selge for en femtedel av vanlig pris. Jeg, Ronny og Jarle har skaffet oss restbeholdningen, og det blir morsomt å se hva vi får ut av dette.

Roboten har belter styrt av to motorer, kamera, høytaler, mikrofon og wifi-tilkobling. Det hele styrt av en GPL-lisensiert databoks som jeg mistenker kjører linux. Firmware-kildekoden ble visst publisert i mai. Eneste utfordringen er at kontroller-programvaren kun finnes til Windows, men det må en kunne jobbe seg rundt når vi har kildekoden til firmwaren. :)

Tags: norsk, nuug, robot.

RSS Feed

Created by Chronicle v4.6