Skip to main content


For the past 2 months with a  few colleagues from Netcetera, we have been working on something called RoboMap as an after-hours project. The idea was to create an autonomous robot that can get inside any room and create a map of the place.
Initially, we started with setup of WowWee Rovio +beagleboard+ Kinect on top of it. Great thing about this was that the programming side for controlling the robot  was extremely easy.  The Rovio has embedded HTTP server that accepts commands via HTTP requests and the control of the robot was done by simply sending and receiving data over HTTP.
The beagleboard  is running Ubuntu for ARM and after some time we realized that we needed more computing power so beagleboard currently works just as the proxy and  we send the Kinect data over WiFi.

On the desktop/laptop side, we read this data directly from the socket and we have written a Java program that reads the  Kinect data and accordingly controls the robot.  The biggest challenge at this point was stitching the images that we get from Kinect. In order to do this, we needed to find the location of the robot in 3D. Now we did get some data from the Rovio about the location but this was very inaccurate.  On the other hand, the Kinect has the built-in accelerometer, so we tried to combine that  data but apparently this was not such a good idea. After some digging around we decided that the best way to do this is using computer vision.  Without getting into details, we used a combination of nestk + OpenCV + PCL. I personally have used OpenCV in the past, but Point Clouds are also something very awesome when working with 3D data.
So we get the data from Kinect using lib Freenet, this is a story just by  itself but  I hope that I'll get the time to explain this part in some other post.
By using this library, we were able to get information about how to stitch every new scene onto the full map.
After working some time on this we decided to go with a different robotic base, so we switched to LynxMotion A4WD1 v2 Robot. This was done so that the robot would become more stable also the coolness factor did not hurt.
We got the version of the robot that had just the frame and the motors, so in order to control them we used Arduino. We first want to remove most of the bugs that can happen and after that we plan to release the source code of the entire project. Let see the video and just to remind you that this is the work in progress.

Popular posts from this blog

HTML 5 data-* attributes, how to use them and why

It is always tempting to add custom attributes in HTML so that you can use the data stored there to do X. But if you do that there is no way of knowing if your HTML attribute will not be overridden in the future and used for something else and additionally you will not be writing valid HTML markup that can pass HTML 5 validator and with that you can create some very bad side effects. That is why there is a spec in HTML 5 called custom data attributes that enable number of useful features.

You may go around and read the specs, but the basic idea is very simple, you can add any attribute that starts with "data-" and that attribute will be treated as non-visible data for that attribute. By non-visible I mean that it is not something that gets rendered to the client so it does not affect the layout or style of the page, but it is there in the HTML so in no way this is private.
So let's get right into it, the following snippet is a valid HTML5 markup

<div id="aweso…

Temporary files and directories in Java 7 and before

Sometimes we want to create a temporary file, whether to save some data that gets written by some other application or just to temporary store stuff. Well, usually applications have their own temporary folder where they do this and it gets somehow configured. But why not use the underlying OS specific file like "/tmp/" in Linux so there must be some system property that has this info and there is. The key is "" resulting in "/tmp" in my case or by code:
String tempDir = System.getProperty(""); We can use tempDir  folder as a temporary place to store files, but there are a lot nicer ways to work with files like this even in JDK6 not just in JDK7:
import; import; import java.nio.file.Files; import java.nio.file.Path; public class TempFile { public static void main(String[] args) { try { // create a temp file File tempFile = File.createTempFile("old-file",…

Basic Authentication with RestTemplate

Spring Rest Templates are very good way of writing REST clients. By default they work with basic HTTP so if we need to use Basic Authorization we would need to init the rest template with custom HttpClient. This way the Rest Template will automatically use Basic Auth and append to the HTTP headers "Authorization: Basic BASE64ENCODED_USER_PASS".

HttpClient client = new HttpClient(); UsernamePasswordCredentials credentials = new UsernamePasswordCredentials("USERNAME","PASS"); client.getState().setCredentials( new AuthScope("", 9090, AuthScope.ANY_REALM), credentials); CommonsClientHttpRequestFactory commons = new CommonsClientHttpRequestFactory(client); RestTemplate template = new RestTemplate(commons); SomeObject result = template.getForObject( "",SomeObject.class );

In EE application this would probably be managed by DI framework like Spring Core and only initialized once sin…