Custom Player plugins

Introduction

Over the course of my masters project, I developed several custom Player plugins. These plugins extended the basic functionality that came with Player, allowing me to integrate custom hardware (i.e., the instrumented wheelchair and various sensors, see my masters) and algorithms. These plugins are likely to be useful to other robotics researchers and enthusiasts. Please bear in mind that the software provided as is. It has yet to be vigorously tested and was developed under a tight deadlines. If you have yet to install Player and are having trouble doing so, you might want to check out a how to that I wrote on this matter.

GMapping wrapper

Arguably, the most vital part of an autonomous robot is its sensors and the associated perception algorithms. One way of perceiving the environment from sensor readings is via a map, and if the system is to be self-reliant, it must be able to learn this. A well researched robotics technique used to build up a map of an unknown environment is Simultaneous Localisation and Mapping (SLAM).

As it turns out SLAM this is a rather difficult problem to solve. Most of the contemporary solutions use complicated Bayesian probablistic models. Fortunately, you don't need to understand all this maths in fine detail as there are several open-source SLAM implementations available through the OpenSLAM website. For my masters, I ended up developing a wrapper that allowed GMapping to work with Player. The GMapping library implements a Rao-Blackwellised particle filter that uses wheel odometry and range-bearing sensor (i.e., a 2D laser rangefinder) to create occupancy grid maps. An example of a map created by GMapping by a robot emulated in the Stage simulation environment for Player:

The files for my GMapping-Player wrapper can be downloaded here. I've also written an entry on my website how to use this plugin here.

Robot interface

Player comes with support for several commercially available robots, which is great provided you have access to one. Fortunately it is not overly difficult to interface a custom built robot to the Player framework. I managed to get a robot of mine working within Player after developing a communication protocol using a serial port. The protocol was loosely based on NMEA 0183 strings, in that it uses: a UART physical interface, ASCII characters (easier to debug), has a start character, fields are comma separated, has a checksum, and is terminated by a new line character. I designed the plugin to use an opaque Player interface so that it could be used directly with an accessible serial port, or in the case with my robot, through a remote serial port transported via sockets. It has been tested with both a direct serial connection and a network connection to a ser2net proxy.

You can download my driver here, but note that you'll need to edit the source to suit the information that you wish to transfer to a fro from Player and your robot.

Wireless video client

In my how to page on various OpenWrt related stuff, I described the process to stream the video feed from a webcam plugged into a router back to your PC. At the time, a robot of mine had this setup and I wanted to get the video back into my computer for analysis within the Player framework (and mischief!). I ended up 'hacking' at the spcaview (a companion program for viewing spcaserv video streams) source to make it into a Player plugin. You can grab the files to make a spcaserv compatible client plugin here.

Revo LDS interface

The Revo LDS is a low cost laser rangefinder made by Neato Robotics, and used in their XV-11 robotics vacuum cleaner that uses SLAM to efficiently vacuum a vicinity. When this product was first on the market (around June 2010), it generated interest within the various hacker communities, as a decent laser scanner could be salvaged from the device at a fraction of the cost compared to an industrial laser scanner. Essentially the sensor projects a laser point onto the environment and finds the distance to the object via triangulation. The whole assembly is rotated by a motor, and since it knows where it is it returns range-bearing readings for 1 degree increments over a full circle.

For the purpose of evaluating the Revo LDS in my masters, I got hold of a XV-11 and salvaged the sensor. I used information found from the internet on how to interface and decode the serial data stream that came out of the unit, and developed a Player plugin. The files can be downloaded here.

Resources

I have created a GitHub repository that has several custom Player plugins that I have developed:

1. GMapping wrapper

2. A simple UART based communcation protocol for exchanging messages

3. spcaview plugin (for reading spcaserv video servers)

4. Revo LDS rangefinder

Share |