RoverOne Visual Spatial Calculations using the ARToolkit

(Pamela Hauff) #1

Parts List

1 x Pcduino3 Nano without Wireless
1 x Arduino ATMega 2560
1 x 4 Port Usb Hub
2 x Microsoft Life Cam
1 x Usb Wifi Module
8 x Lithium Batteries
1 x Adafruit Arduino Motor Shield
2 x APC220 serial wireless modules
1 x Arduino Nano
2 x MPU6050 GY521
4 Tyres
4 DC Motors
2 x 20W Buck Converter Regulators Variable
1 x 5V UpConverer
1 x 8Gb SD card

Pcduino Operating System

Armbian for Pcduino 3.4 linux kernel for the A20 Allwinner ARM processor with Mali GPU drivers.
With the Armbian operating system I was able to activate accelerated Opengl Graphics. I installed the x11vnc server which uses the X11 server to send Opengl accelerated Graphics. Using turboVnc as the client. I also installed ARToolkit5 from Github for the ARM processor.

Here you can see glxgears and ARToolkit simpleLite example running over a Vnc remote desktop connection.

ARToolkit Spatial Calculation

Using the ARToolkit with two cameras to calculate the position of the Rover relative to two ARMarkers.

Each ARMarker produces a Matrix from which the distance can be calculated. With two distances and the location of the markers known the Intersection of two circles is calculated from the equation obtained from StackExchange:

The equation is a simultaneous equation with two answers.
From this the x and z position was calculated. Z being into the screen and x left of the screen. Y up was omitted.

X=329.72 and Z=144.46 millimeters.

This project is on-going and I will post updates as they happen.
Comments welcome.

Thanks Pamela

(Nathan Beveridge) #2

Nice :slight_smile: You know you’re a roboticist when… someone says “Oh that’s funky artwork on your wall”… "no that’s an AR glyph "

(Pamela Hauff) #3

Yes Its funny that an AR glyph could be almost any painting…border and identification area. Although I think AR gylph’s have to be square.

(James Churchill) #4

I helped (a little) with an AR drone demo at the Switch On demoparty last weekend (using artoolkit through AR.js I think); the markers used definitely weren’t square :smiley: It was using the NFT feature.

(Pamela Hauff) #5

Hi James, Is that using ARToolkit6 I use ARToolkit5. What is NFT and what is the Switch On demoparty?

(James Churchill) #6

NFT (natural feature tracking) is definitely in v5.

And this was Switch On:

(Pamela Hauff) #7

Thanks James I had no idea about the NFT feature will look into it. How did the switch on demoparty go?

(James Churchill) #8

Small but fun. I ended up coding z80 from 8pm through to 3pm the next day.

(Pamela Hauff) #9

Agggrrhhh z80 noooooo…lol

(Ian Redmond) #10

zasm under CP/M? My first assembler! Before that, it was all by hand on my ZX81. Happy days.

(Svenska) #11

Good to see you’re still making robots, never stop!

Thats a paper we went through at uni. Might be interesting to try on your bot?

(Ian Redmond) #12

RoverOne and Robert (pictured) should hang out…

Doesn’t have a camera on it at the moment, mostly because I’m concentrating on LIDAR and extracting wall and corner features from that. Also, my every attempt to compile OpenCV on a pi has been… disappointing.
ARToolkit looks like a much better fit for robotics anyway!
Thanks for sharing.

(Svenska) #13

@ian.kerr.redmond , @jabelone made a nice little repo for it:

(Ian Redmond) #14

@Svenska @jabelone
Love your work. I will give that a go!

(James Churchill) #15

Also, my every attempt to compile OpenCV on a pi has been… disappointing.

I found it was much better to set up an emulated Raspbian container on my PC (using QEMU, binfmt and chroot) and compiling it in there - it’s blazingly fast and avoids all the hassle of getting cross-compiling working.

(Pamela Hauff) #16

I haven’t got that far yet. But I have some ideas about improving the process and dropping the need for the ARmarkers. My idea is too increase the number of camera’s from two to four so the rover can see all around itself. At this stage I want the rover to generate approximate spatial coordinates. Object avoidance is another issue.

(Pamela Hauff) #17

Robert is awesome! definitely should hangout. Maybe we could organise a demo party!

(Pamela Hauff) #18

I dont use openCV 3 because of issues with the compatibility. I use openCV 2.4 I believe. I haven’t had any compile problems but I use Armbian on the Pcduino.

(Pamela Hauff) #19

Calculating Orientation

(Jaimyn Mayer) #20

@Svenska and @ian.kerr.redmond That repo has been strangely popular - I only put it on GitHub so I could easily get it to my raspberry pi’s at the time as I had to keep reimaging them and got sick of waiting to rebuild it each time. I don’t recommend it as it’s broken with the newest raspbian releases. (I haven’t updated it)

Funnily enough I’ve even had a few academics email me asking me to update it as they were using it for their university classes but it doesn’t work on the newest raspbian.