Category Archives: Robotics

Leap Motion in a low cost robotics context

As partner of ASUS  the Leap Motion uses the same emitted and reflected infrared light for tracking parts of the human body like the Asus Xtion Pro . Available since July 2013, the Leap Motion with about 90EUR is an inexpensive, but limited input device,  which is optimized for tracking fingers and hands as illustrated in the following illustrations.

LeapMotionVisualization

LeapMotion Visualization API allows track- ing of two hands and advanced gesture recognition

LeapMotionDevice

LeapMotion device emits infrared light, which can be seen with a non-filtered camera

The main features include the tracking of two simultaneous hands with gesture recognition for all ten fingers. For distances between 10cm and 1m at daylight the device works reliably.

During my thesis, I have tested the existing ROS driver, which currently only supports one hand and was not able to provide 3D PointCloud data. In brief, the Leap Motion unfortunately is inappropriate for our project as their only use could be unreliable robot control by hand gestures.

ROS Basics – challenges in the robotic low cost context

Applications in robotics need to solve a lot of computational intensive tasks. While some of them can be outsourced to an externally powered device like a laptop or a server, others essentially can be calculated on the UGV.

Examples for that are collecting sensor data, receiving and executing commands or streaming data. Balancing these is a challenging task, because on concurrent executing systems all processes can influence each other. Especially when computational power gets cut down to the limits in order to save energy. As most libraries, frameworks or software environments do, ROS requires additional resources when being compared to a single purpose application.

In conclusion providing enough computational power while using reasonable amounts of energy is an important task to solve.

Physical properties
Physical dimensions and requirements result from a tradeoff between costs and size, whereas smaller UGVs tend to be more expensive and complex. On the other hand, an upper bound among others is set by being manageable in terms of transport and storage.

The low cost target UGV is a four wheel or two tracks driven ground robot with physical dimensions below 150mm * 300mm * 300mm (height, width, length). The drive power should be accordingly with an effective force of more than 100 Ncm for moving or holding torque in case of stronger slope. Additionally, tracks are the preferred primary propulsion system as they have better grip properties and only require simple motor control. Another nice to have would be the capability of spot-turning, which would allow operating on small areas and facilitates 3D scans of rooms without moving further than required. Another optional point if the robot is going to be used outside of buildings or around kids is a splash-proof case that would increase the robots life. Furthermore, modular extensibility would increase the usability of the robot significantly.

Modular design

In order to solve the tremendous requirements of robotics in a low cost context, we need to think out of the box while structuring the challenges in solvable problems. Like the following graph shows, we should divide the functionality of UGVs into four main modules: First, Sensors are the parts the robot requires to sense the outside world, next Accumulators serving and saving power, followed by Processors the units are processing information gathered by Sensors and finally, Actuators which provide physical movement. These areas in turn get separated into further sections which we discuss one by one on the next posts.

Screenshot_2016-03-11_21-40-35

ROS Basics – ROS in a low cost robotic context

UGVs like they are found in industry, education or Do it yourself (DIY) communities are currently not affordable for average technique enthusiasts, teachers in schools or sometimes even universities. The concept of low cost robots tries to solve that issue.

What is low cost in a robotic context?

The traditional interpretation of low cost is minimizing the expenses while keeping most important features. In borders of mostly expensive robotics this term needs to follow the same differentiation as between cheap , which means coming with a significantly reduced price and quality, and keen , considered as maintaining a certain amount of quality at a reduced total cost. For example, the 50 000 USD UBR1 is a low cost version 250 000 USD up to 400 000 USD PR2  of Willow Garage , but still is far away from the term cheap in a common way . Another example and at the same time another robot Melonee Wise worked on is the TurtleBot , which was constructed with the attempt to be the lowest cost version of a ROS robot at time of creation.1

How to achieve low cost?

There is no general solution to this problem. But an approach to solve the issue in the robotic context is to replace expensive single purpose solutions produced by companies in low quantities with mass produced products that get customized to suit the application.
A demonstration of this positive misuse are the first versions of the TurtleBot . Instead of constructing the robot with expensive 3D Laser Scanners they replaced it by a Microsoft Kinect originating from the gaming industry. Furthermore, it used a iRobot Roomba and later a iRobot Create as a low cost mobile base as constructing a custom movable footprint would
have been way more expensive. Also, the mass produced product came at a lower cost and unharmed warranty. An important side-effect of these replaceable parts is the independence of unique cost intensive and sometimes, due to customs regulations, not easily accessible parts. By that, the power to choose a cheap replacement at any time reduces overall expenses and
total risk.

As a consequence, an low cost UGV should be easy to build and reproduce, affordable for education and able to run ROS with some kind of 3D measuring device. It further should consist of easily achievable or replaceable parts.
In conclusion, these properties lead to a modular design concept with communication inter- faces between the inexpensive components. Also a certain degree of flexibility is required to maintain extensibility and independence of expensive parts.

esp8266 ws2812b hostname triggered wifi light

Today I built a small wifi light which rotates in case a certain hostname (my smartphone) is in the local wifi. As these devices tend not to answer to ping or arp requests, and bonjour or mDNS where to slow, I crawl my dhcp server every five to ten seconds. Additionally i decreased the lease time of the dhcp to  improve the switch off response time. As my smartphone usually logs into my wifi instantly when I enter the house it’s usually switches on before the main door has been opened.

The interior of the lamp consists of seventeen ws2812b rgb leds which I controlled in an intermediate stage with the esp2866 opc code on github. As this would have required a constant network packages flow and a device delivering the UDP packages, I later on switched over to control the led animation by the esp8266.

Something I discovered today is that soldering the 2mm grid esp8266 upside down onto a 2.54 grid prototyping circuit board improves handling and speed, as well as the size of the final circuit.  You also can see the pin map information on the final product, which is nice.

After putting some hot glue on the board to prevent shorts and improve lifetime, I took some measurements regarding current consumption: about 0,1Amps at 5V, which should result to 0.5W with a constant rotating light and wifi crawling. This makes the device capable to be run on most USB power providers. The final result looks like this in action:

As the code is very specific and dependent on my local setup, I will not post it on github this time. Just one thing I would have found really helpful to find in the internet while I was struggling with a constantly without information resetting esp8266 would have been this:

Howto grab and parse a HTTP.Auth protected website with the esp8266 as a client:

In conclusion, this was a nice little project I really enjoyed doing in a sleepless night 🙂 And with about 10€ plus the lamp I got as a gift a long time ago, not that expensive.

Controlling ws2812b with an esp8266 by open-pixel-control protocol

Harder than it looks but controlling an 5m led stripe using the esp8266 by the open pixel control protocol took me a night (and might be the reason for extra bad english as i write this post directly after it). But it’s real fun!

There are several ways to make the controller blink, the easiest way is shown here:

For the duration of infintiy, it sends the static header consisting of 4 bytes ( prio, command and checksum) followed by 8bit red 8bit green and 8bit blue for each led of the stripe. It gets the blinking values by asking the source of random in linux.  It lacks a bit of white as my power source got to its limits, so if you reimplement this use 5V and 1A per 30 leds.

Another thing to mention is the data length field which are bytes 3-4 of the header or \x02\xA6 as in the command above. This length needs to equal the amount of leds times three, so in this example 226 Leds where controlled as the bytes in network order end up to be 678.

This results in that little animation:

Another possibility is to send these packets by a small python script like that:

Code for the controller at github.