I’ve mentioned before that I wanted to rebuild be research infrastructure once I got done with my dissertation proposal. I’ve started rebuilding, rebuilding the still-useful parts of my old Common Lisp codebase in Python. I’ve been helped a lot by Pyro, the Python robotics framework. It’s actually quite a nice framework, handling several popular robots and simulators, including Player/Stage, which I’m using.
The Pyro library and engine handle the work of communicating with the robot or simulator, leaving the robot programmer to concentrate on writing his controller (or “Brain” as it’s unfortunately called in Pyro terminology), as a Python object. The main work of the controller is encapsulated in the its .step() method, that gets called periodically (every 0.1 seconds). This is nice in some ways, although it makes things difficult when the controller/agent has to to perform complex, hierarchical, extended actions with subgoals, since it makes it impossible to use the Python program stack to track the hierarchical stack, since the .step() method presumably must return reasonably frequently. Instead, the controller and any extended actions must maintain their state between .step() calls. On the upside, this architecture allows the Pyro engine to handle GUI functions and any other periodic bookkeeping and communication without requiring the user to write in calls to special functions in the controller.
The other major downside is that, for Player/Stage, anyway, the Pyro developers seem to have assumed that all Player/Stage robots can be modeled as an ActivMedia Pioneer. It’s possible to write modules to support other robot configurations that use Player, but how to do this and get all the Pyro functionality is still mysterious. Luckily, for my work, it’s not that important, since my learning agent assumes very little prior knowledge about the nature of the robot it’s driving, so I can just pass it the raw laser scans from a simulated robot, without having implemented any of the routines that transform the sensors into a uniform system of units, etc.
In addition to just a robot interface, Pyro also has Python wrappers for various useful libraries including a neural net library, Self-Organizing Maps, and other fun goodies. No reinforcement learning, yet. But I’m writing my RL code in Python, so maybe I’ll contribute it.
Read the rest of this entry »