Monday, June 11, 2018

RoverOne Visual Spatial Calculations


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.

Orientation Calculations:

No comments:

Post a Comment