Intro

But this proofed to be harder then the first time. Except for OpenCV, I used the default package repository. Also building OpenCV + Gstreamer 1.0 + V4l2 + Python + OpenGL, was easy enough. There is a lot of how to do this to find...

But then I had this problem:

(Sorry, the video the turned sideways. But from the 3 frames, One is falling behind. Very clearly...)

But this also resulted in IOctrl failure...
Here are some v4l2loopback issue that seemed related: #97 - #93 - #83
This is the script I used for testing, this I compared to the IPcam interface.

Code Snip

Solution

So Finally I concluded that the (cheap) IPcam would not work. But I did wanted to keep the pan/tilt freedom. I could rip everything out, replace the camera and the board with an Arduino like this.

Back

Front

But my choice was to keep the original hardware, so I can POST web requests for the pan/tilt movement, upgrade the camera with the PlayStation 3 Eye, which has some impressive quality!

Main Board

Motor Wiring

The Head Taken Apart

Replaced the Camera

The PlayStation 3 Eye also has an microphone array, giving a nice extra.

If you want to do the same, I can not stress enough to pay a lot of attention to the order of how the camera is put to gether!! As some part are to small to fit the USB port I was forced to cut the PS-Eye wire....But forgot the ring that holds the base and head together, so I had to take it all apart again!

The Result

Friday, 28 October 2016

Goal

Having multiple off shelf devices can make some things easier. But have a car battery of 12 volt doesn't fit on all of them. Converting 12 volt to a number of required volts:

+5v for IP camera's and Arduino's

+5v positive and -5v negative for robot arm (?linkje naar project?)

+7,5v for network switch

+12v (no conversion) for motors (shoulders, feet, neck) and used for Pico PSU for secondary computer.

+19 for laptop power-supply (E-Bay car adapter)

The last few devices were simple, just direct (as motor uses 12 volt) or a convertor from E-bay that uses 12 volt.
The first four did pose a challenge as they did take up Ampere! A quick count came to 8 Amp!! And overload must be avoided, specially the arms could use good part. So have a 10 and 5 schema to be sure. The motors will draw directly from the batteries.

To extract positive and negative, two 12 volt batteries are required. If only one battery, you can use a volt divider but this will lower the voltage.

The negative side.

But with heavy loads you will need heavy resistors! So to use two batteries, just remember that combined gives double the current! As the robot has enough space for two batteries and the battery weight will increase stability, the choice was easy.

The additional 5 Amp

5A print

The choice was to used an older PC power-supply as case. It has a fan, lots of holes and spacey.

Everything inside

Running some tests

Ready for first test!

For details on first attempt see below. But it is fine to skip that.

After First Attempt, measuring the damage...

First Attempt

All apart again!

When using the MJ2955 or MJ3055, I forgot to use mica (isolation)...Because if using the same they can share the ground (which is the body on MJ2955). But with MJ3055 this causes short circuit!

MJ3055, which was fried

Then by accident, forgot to wire ground first...This resulted in a lot of smoke and me order the same list...again!!!

Result

So this cost some additional time, but also made me redesign and clean up wires.

In the end everything was fine. All measurements were in the green and the power-supply was good to go!

Wednesday, 6 January 2016

Some time ago I found this old but still very cool power toy.
And as a gift I wanted for my son...and a bit for myself.
I got it second hand and this was clear, it had some cracks and heavy nicotine odor...
But it worked and was complete with manual book and no battery leaking damage.

Soon I did notice some uncontrollable movements and battery drains.
When searching the internet of any tricks, hacks and modifications I found something disappointing.
The wires running through the legs are of very bad quality, more V2 models have it!
Somehow the other wires are fine, but the leg ones are not...

A foot connector cable

Total break down!

Here are some examples of how bad they become. To the point of causing short circuit.

We (me and son) had a clear to do, rewire the legs.

Gathering information

Lucky we were one of many that committed to this job, as is a common problem.

So first taking apart the robot is a challenge, it covers are very fragile and so both upper leg parts are lost and now looking for a 3D model replacement.

Second point is that the arms can fall off after removing the chest covers (unlike with the V1 model).

Once the covers are gone and the wires are untangled, as they cross halve way the body.

Write down how all the wires fit in to place.

All the info can be found on the internet (see references), but it saves time to already have it.

Then remove the legs from the body.

We did not have the same size cables as we used the from an old computer PSU.

They come in many colors and long size, remember not making the length to long (as they might jam once the covers are back) OR short!!

The foot board

Also we needed to recycle the plugs so had to carefully take them apart and replace them with the new wires.

Unfortunately at the foot(s) base the wires are soldered thus taking more time.

Left Foot Connector

Besides time consumption, the job did not take more than a day (thanks to my little helper!).

Right Foot Connector

Foot with still old wires

the Motor Board

Finally the wires are fixed and everything is working again.

References:

Here are a few websites that helped me or can be helpful.

Very useful -> For info on the Mainboard, it also have links to other internal parts.

Friday, 11 April 2014

How to make 3D glasses with a phone and a 3D printer.

To be honest this is just a copy of a project of another guy
that did all the real work, here I just show of my version with some
tips and tricks on software and other hardware you can use.

I did this already some time ago, so I now found out that the amount of software heavily increased!
What is very nice, for I was under the impression that the Oculus Rift would have more support and thus more software avalible.
If you want a few point what make the OpenDive better (in my opinion):

Cheaper

Full HD (it depends on your phone).

Mobile (Oculus needs a computer to connect to, can be laptop. But not the same)

In the time I was writing this (it did take me some time...) there was a new project on Kickstarter what is very similar to OpenDive. Just that this looks like they just want to make money (sorry to say). Because they offer nice looking glasses, but at a higher cost, less freedom (you have set to your phone dimensions) and most of all, they did not publish (yet) any software...

Printing the 3D object

For the 3D object I use the one from the site, from the how to part.To print it at my local 3D print shop cost like 40 euro, high density.

Here
is the final result of the print job. First front and then back. I made
it the color green because it is my son's favorite color.

Afterward I did reinforce the top and fixed the phone holders (two bars going from top to bottom).

Also add some soft small isolation tape so the plastic is not scratching the face. And of course the lenses and the band to strap it to your face.

Doing a OpenDive Test run

Here are the first results when running the OpenDive test run. What you can get from here.

Other applications

Of course that test run is boring, and I wanted to playQuake! For the full game you still need to provide your own texture files, you can search google for these details.
There are a few others that you can enjoy with these glasses:

Wings - a kind of sky diving game

RTPhiscics RT3DApp - Simple more testing game

The Height - No idea how to describe this one...

Bubblecards - Some stupid racing game

FOV2GO Minus Lab - strange looking

RollerCoast - Cool to show the folks the glasses!

Go Show Free - A real home theater

DiveCityCoaster - Same as the Rollercoaster

Virtual Reality FPS - Difficult to see FPS

Dive Launcher - Dive interface...

Jet Sprint - A Flight similator

Dive Deep - Underwater game

VR Scene - Nice look FPS, Unreal flavor

If you plan on making your own take a look here. But you can try to play game with it, see the video. This called Kainy and seems very promising.

Useful addon devices

When the games are installed, I soon found out that controlling with my bluetooth keyboard is not an option. The best is a bluetooth gamepad, I did it with a PS3 gamepad, but this required some other tweaking.
Just remember that when you use these glasses, you are wearing your control's.

First
of all I came across the leap motion a year before it was released. And
I was already thinking in this direction. Then Oculus Rift came alone
and thus the OpenDive. Now somebody already combined the Leap with the
Oculus.
But Oculus was just sold to Facebook and I the comment Markus "Notch" Persson gave on pulling back his Minecraft: "Facebook creep's him out!".
So Let now work on a way to have it work on OpenDive! I did see Minecraftfor Android, so...

Installation

Because GCC 4.7.3 is required, Ubuntu 13.04 is advised. See here for the official installation instructions. There are few reminders when following the instructions, there is a fair amount of data to be downloaded...and just remember that places where it says:make -j 4
Means you use 4 cores, perhaps you have more or less (like my test machine is virtual and uses only 2). Also you will need a lot of disk space and it will consume a lot of bandwidth for downloading data-sets.

running in to the error message: libpng error: Incompatible libpng version in application and library
This is fairly know problem with self compiled program's. But nothing serious.
Just get the correct libpng and compile it [./configure, make, sudo make install ].

If you run in to segmentation error/faults the most conclusive I could find is this. What shows that getting it to run correctly is not that easy...I did it 3 times, same Ubuntu and GCC, OpenCV 2.4.5 and 2.4.8 And there is nothing clear yet if 2.4.8 is not supported, I will update this article as soon the cause is more clear.

Other Projects

But meanwhile getting OpenBR to work and finding useful pages I came across a few more interresting programs that I do not want write a complete article about but did find useful to mention here! Here is a list of similar and handy project. I will expend this part when I have more information of the software.

Object Recognition Kitchen

The O.R.K. is based on Ecto what is a C++/Python framework. Highly ROS supported, but like ROS, very dependable.

Tuesday, 25 March 2014

Getting OpenTLD working on Ubuntu 13.04

- And so I see, and that is good!

Introducing OpenTLD

TLD is an algorithm started by Dr. Zdenek Kalal
and made it open source under the name OpenTLD. I found this work
already a few years ago, back then just got it to run on Windows. But
besides that did not had a real application to apply it to. Now working
on my robot and want to make it recognize things good! If you just want
to see it work (fast and easy) try the windows version or better yet,
the Android (see below).

Requirements

You should have a look at the installation page first before continuing. On the website there is an alternative for using MatLab called Octave. In Ubuntu 13.04 the version is 3.6, but we need 3.8. So here is a quick list of what you need before getting started:

Also Octave needs a few packages that come from here like: general, control, signal, image, miscellaneous, io, statistics, image-acquisition
You can download the packages and install like the example on the site. But if you enabled the cURL library with compiling Octave you can use that package manager.

octave -q

pkg install -forge [package name]

OpenTLD Modifications

For the compile.m
file to run correctly you need to adjust few things. I am not an Octave
expert so perhaps these things changed, I had to in order to make it
work.

In the compile.m script go to theif isunix
part, for anyone with some python or other programming knowledge, it
helps. The script looks for OpenCV libraries version 2.2, we are using
2.4. So change that line. The next line we change is in the i loop. Make it:lib = [lib ' -o ' libpath files(i).name]; Where the -o is new. This is required because the i loop creates a list of files, but without the -o argument this would fail (I guess capital -O did mean all). Then a few lines down change all the argument -O (which is unknown) with -o.
Make sure the cv.h is in the general library, will make the compile part work correctly. I still was getting a problem with libraries; cv.h (simple gcc include lib should fix this, but I did it different) By just putting the full location path for "cv.h" (and highgui.h) in lk.cpp from the mex directory. Final problem here was a permission, so sudo compile.m.And Presto

Then we move on to run_TLD.m
If you run into the error about videoinput is an undeclared variable, means opencv did not compile correctly with octave. Do not search the internet for "how to compile opencv with octave" because it only works on older versions of openCV.