Player 2.1.x with a USB Segway RMP

January 4th, 2010

The following instructions are based mostly on the article Segway on player 2.1.x published by SRI International’s Artificial Intelligence Center. This document is designed to be included with the player 2.1.x distribution. The latest version of player is 3.x, which claims to include a correct and robust driver for the USB based Segway RMPs.

The instructions were developed for 32- and 64-bit versions of Ubuntu 9.10, but should be fairly protable to other versions and distributions. The library versions are current as of 18-Dec-2009, but are likely to change over time. You will need to update the commands below if a newer version is released.
Read the rest of this entry »

Pharos Mission 2 – Success

November 19th, 2009

After I completed my dissertation a couple months back, I’ve switched over to working on the Pharos Project nearly full-time. Pharos is a fledging project aimed at creating a modular testbed for (primarily) wireless networking research. Basically, we get a bunch of robots to move around in a big parking lot and see if we can still get them to collaborate, even though they can’t alway communicate.

Monday was a big day for the Pharos project. We took 10 robots out to the Dell Diamond’s back parking lot and collected the first real, useful data. There were two main focuses for the mission: (1) how accuratly can we move along a predetermined path using GPS coordinates, and (2) how does distance effect the connectivity of the standard ad-hoc wireless network.

To answer the first question, take a look at the following picture. Here the red line is the track that we wanted the robot to follow. The purple line is the path that it actually took (according to the on-board GPS). The node started in the bottom left and drove to it’s first waypoint in the upper right. Then it visited each waypoint in turn, ending in the upper left. (It seems that maybe it started wandering around on it’s own for a while after it was supposed to stop)

Mobility trace for one robot

Given that this is very preliminary data, it seems that this bot did a darn fine job of going where it was supposed to go.

To answer the second question, we had one robot sit still, and another drive past it several times. We measured the acheaviable throughput over the wireless network to find out just how far you have to go to disconnect. Well, it seems that you have to go about 80m. I wish I had the graph to show you, but it’s still under construction… in the mean time, here’s the mobility trace from this experiment:
Mobility trace from connectivity experiment

Middleware Demo Results

December 4th, 2008

I’m proud to say that my demo at Middleware 2008 went very well. It seemed that everyone understood both the basic tentants of the architecture and the actual implementation sitting on the table in front of them.

As murphy’s law dictates, the sexiest part of the demo (the Roomba) failed to work on demo day. I’ll be diagnosing this issue when I get home, but I now believe the servos make a better demonstation tool anyway.

For more information about the SEAP system, here is a list of other resources:

Demo at Middleware 2008

October 17th, 2008

My demo of the SEAP middleware architecture was accepted at Middleware 2008. I’ll be traveling out to Leuven, Belgium in December to give the demo.

I’m excited to give this demo for a couple reasons. First, I think it’s going to be a really interesting demo to interact with. The devices and code are all going to be right out on the table to play with. Second, Middleware has two dedicated slots for demos, so there’s a good chance to meet people.

If you’re going to Middleware also, be sure to check out our lab’s paper on Adaptive Milddleware to Support Delay Tolerant Networking in the ARM ‘08 Workshop.

JUnit and SunSpots

July 25th, 2008

I’ve been fairly frustrated trying to write code for SunSpots lately. This frustration mostly stems from my previous self-imposed training to use test-driven development. There is some support for using JUnit with SunSpots, but it requires that the code and tests all be deployed to an actual Spot before the tests are run. Since deployment can take a minute or three, I find that I’m developing much larger chunks of code because I don’t want to run the tests as often…

Thus, I spent the time to figure out how to run JUnit tests on my desktop for SunSPOT applications. I put together a strip-down template using JUnit tests for Spots on the desktop for anyone who would like to build on it. I was also able to get my IDE (IDEA) to use the Spot JVM and libraries, so I’m back in the groove with test-driven development!

ICSE 2008 – Day 2

May 16th, 2008

As with the previous post, the following papers piqued my interest during their presentation, and are potentially cool papers.

Challenges in Automotive Software Engineering (Keynote)

Authors: Manfred Broy
It figures that I’d start with a presentation that has no matching paper, eh? The whole presentation was rather interesting, but here are a couple key points that are relevant to my research:

  • Integrating all the control units found in a car is complicate by the combinatorial explosion resulting from the combination of optional features.
  • There is heavy use of automatic code generation based on models in this arena. While I didn’t completely grasp the extent and the ramifications of this, it’s something to keep in mind when targeting these types of applications.
  • A while back I was told that the automobile industry would love to use radios to communicate information between control units. This was routed in the desire to reduce the weight associated with the all the wiring involved with standard techniques. Well, it seems that even with wired networks on the car, there’s a more compelling problem: non-determinism. The old protocol “CAN” is being replaced by new technologies that using (some variation of) time division to guarantee a certain amount of bandwidth to each control unit. If we want to replace wired networks, we’re going to have to consider this problem which is very much non-trivial in wireless networks.

40 Years of Middleware

Presenter: Wolfgang Emmerich
Overall, this was a fun presentation. It’s hard to report exactly what was said since it was mostly a detailed historical retrospective of the evolution of middleware. Wolfgagng Emmerich did an excellent job of researching and presenting this information, and referred to a paper recently published (in TSE?) that contains much of the information presented. This paper ought to be an interesting read.
As a side note, many people in my lab have discussed “what is middleware” with varring degrees of success. The definition used for this presentation included two aspects: (1) multiple hosts (physical or logical), (2) heterogeneity, and (3) distribution. It’s probably worth looking up this paper to at least look at and consider the definition of Middleware presented there.

Asking and Answering Why and Why Not Questions about Program Behavior

Authors: Andrew Ko, Brad Myers
Paper: PDF, Tool Homepage
ICSE08 Distinguished paper award
This was cool, and defiantly worth a read. I’ll likely force this paper on my lab when I get back, even though it’s outside our research area. ;-)
The biggest open question in my mind at the end of the presentation was weather the tool can be (easily) applied to unit/integration testing implementations. The presentation clearly focused on the ability to integrate ith GUI-based applications, so it’s hopefully just a less glamorous version of the same underlying engine.

TODO or To Bug: Exploring How Task Annotations Play a Role in the Work Practices of Software Engineers

Authors: Margaret-Anne Storey, Jody Ryall, Ian Bull, Del Myers, Janice Singer
Paper: PDF will be available here some day
This research focused on the in-line comments that developers leave to themselves (and others) in the form of “TODO”, “FixMe”, and similar tags. I didn’t find the results particularly suprizing, but that might be due to wonderful presentation of the material. Again, this is outside my research area, but probably a paper that I’ll be reading to solidiy my pre-existing notions.

ICSE 2008 – Day 1

May 15th, 2008

As always, the welcome address for the ICSE conference included the submission/acceptance reports… and this year ICSE came in at 15% acceptance… pretty strong accept rate as always. One thing that the speaker pointed out that I hadn’t really realized earlier is that this includes all “submissions,” no matter what those submissions where. Later in the slides, he pointed out that some 14 of the original submissions were thrown out for being off-topic or because they “were just power-point slides and the such.” (I’m impressed that anyone bothers to submit presentation slides as research papers for such a big conference… but I shouldn’t be surprised by anything anymore)

Below I’ve listed some of the paper presentations that I found interesting. Note that I say interesting not good/great. Before I say that any of these items are really great, I’ll read the paper first. So let’s just say that these papers are candidates to be good papers…

Time will Tell: Fault Localization using Time Spectra

Authors: Cemal Yilmaz, Amit Paradkar, Clay Williams (IBM T.J. Watson Labs)

This idea and the presentation were both rather interesting. The presenter claimed that method execution time could be used to localize defects in source code. The technique operated in two phases: 1) Using passing test cases, execution times are correlated with the execution times of other methods, then 2) a failing test case is run and then look for a execution time that is outside the coloration model.

When the time for questions came around, I think some people forgot that the technique was only for localizing errors that were known to exist rather than detecting errors outright. This lead to questioning how the technique compared to stack traces (complementary, esp. once the trace doesn’t immediately work) and questions about the specific technique for correlation (anything will work at first to prove the concept, better techniques can be used later).

Precise Memory Leak Detection for Java Software Using Container Profiling

Authors: Guoqing Xu, Atanas Rountev

At first, I found most of this presentation rather obvious. The idea that Java leaks memory (via objects) is well known. In order to leak them, they have to still be referenced, but not directly. The reference has to be somewhat anonymous, otherwise the object is “owned” by someone which (when applied recursively) means that it’s either active or a candidate for GC. The primary way to keep an object around without “owning” it is via some sort of container. (In my practice, the biggest memory leak in Java is actually String.subString()’s implementation detail, but that’s another topic)

Ok, so once we assume that most memory leaks are due to objects loosing their identity and ownership by being placed in a container, then this paper proposes a technique for figuring out which container in the application is holding the leaking objects. Basically, containers are ranked based on how much memory they (and their contents) consume through a deep traversal of the object graph. They are also ranked based on a staleness metric (see the paper for exact details) which measures how long an object hangs out in a container after it retrieved (via get).

On the surface it seems like a reasonable idea, but in practice I would expect many cases where containers are working as designed when they cache large objects for long periods of time. If (and how) the authors account for this will be interesting to find out.

Omnet++ and Eclipse

April 14th, 2008

So if I’m going to take the plunge to learn c++ just so that I can use the Omnet simulator, I better have some decent tools to figure out what’s going wrong.

Since it’s likely that I’ll be doing some development on my windows machine and some on Ubuntu boxes, I’m opting for an Eclipse-based development environment. Unfortunately, it’s not so trivial to get everything working together, so here I am with yet another guide to what I’ve done to get my setup working. I hope it helps someone else out there…
Read the rest of this entry »

JSimpleModule Step-by-step

April 8th, 2008

First things first

First off, make sure that you have java installed and that you have your JAVA_HOME environment variable set. To check for java, just run java and see what happens. If there’s no program by that name, go install java…

You also want to make sure that your JAVA_HOME environment variable is set, and to make sure that there is no trailing “/” on the value. To check it: echo $JAVA_HOME

Download/Extract JSimpleModule

You can use these commands to download and extract JSimpleModule:

wget http://www.omnetpp.org/filemgmt/visit.php?lid=126
tar xzvf jsimplemodule-3.3-1.tgz

Read the rest of this entry »

Expose different data formats when using REST

February 12th, 2008

This article caught my eye today: RESTful SOA using XML. Since I’ve been helping a friend to flush out some RESTful service ideas of his own, I wanted to make a comment on this topic…

Generally, the point of using RESTful patterns is to make the information easier to consume. For IBM (and a lot of programmers), "easy to consume" immediately spawns images of XML and automatically generated parsers or XStream or whatever. For me (and a lot of programmers), this same idea spawns ideas of .properties, JSON, flat text, and even HTML…

If you’re writing a web service to expose data to a customer, then shouldn’t you build in support for providing data in their format? After all, "easy to consume" is a valuable trait for data to support. In the interest of supporting the wide variety of people that will eventually be clambering at our door for data, let’s allow them to select their data format. So instead of using these URI’s:


http://luggagetracking.airlinecompany.com/bags/{id} http://luggagetracking.airlinecompany.com/flights/{id} http://luggagetracking.airlinecompany.com/travellers/{id}

RESTful SOA using XML

Add the little bit of extra code to expose these URI’s:


http://luggagetracking.airlinecompany.com/bags/{id}.xml http://luggagetracking.airlinecompany.com/flights/{id}.xml http://luggagetracking.airlinecompany.com/travellers/{id}.xml

http://luggagetracking.airlinecompany.com/bags/{id}.properties http://luggagetracking.airlinecompany.com/flights/{id}.properties http://luggagetracking.airlinecompany.com/travellers/{id}.properties

http://luggagetracking.airlinecompany.com/bags/{id}.html http://luggagetracking.airlinecompany.com/flights/{id}.html http://luggagetracking.airlinecompany.com/travellers/{id}.html

In the article above, we’re already shown how to use regular expressions to parse the interesting bits from the requested url, so switching to a different view based on a file name extension is fairly straight forward. For those of you who are more advanced, this file extension could be cross-referenced with the HTTP Accept header to provide even more complex format selection.

Now I know that some of you are likely responding with doubts. The most likely of these is that exposing the same data in different formats probably isn’t will be worth the investment… and it may not be. It’s unlikely that your web service will greatly benefit from exposing multiple data formats right out of the blocks. However, by building in the assumption that you will do so later, you (a) help guarantee that your view layer will indeed be separated from your model and controllers, and (b) lower the cost of future integration or migration projects.

That brings me to the motivating scenario that I have in my head… For the application my friend is developing, we need to be able to show lay-people what the service “looks like” to remote devices. Showing a machine-readable version of the service’s data to these people is silly. Even if XML was human readable (it’s not), the verbose overhead associated with it makes it relatively unattractive to look at. But HTML… now that (can) look good to people. By using an XML-based template when a .xml URL is requested, and a HTML-based template with a .html URL is requested, we can be friendly to the casual on-looker.

Down the line, we can also use this technique to help integrate test harnesses, debug views, and data documentation. For example, if the data provided by the service seems to be wrong, we take the request (http://foo.com/bar/baz.xml) and swap in .html for .xml and a host of documentation is included along with the data values. Request http://foo.com/bar/baz.debug-html and you get a host of debugging information as well. Whoa, cool.