From: Federico S. <fed...@gm...> - 2006-09-22 13:45:19
|
Hello, I'm Federico Sassi a student of the Robotics Lab ( http://rimlab.ce.unipr.it/ ) at University of Parma (Italy) and I extended Player-Stage driver for Roomba. I read a precedent discussion around August 25th, where Chad Jenkins introduced an IRProxy implementing wall, cliff, virtual wall detection sensors. So I've implemented his ideas but we needed access to other sensors; in particular we needed to read button and remote input status set led over Roomba read wheeldrops status activate vacuuming motors I couldn't find any appropriate proxy already inside PlayerStage that would allow me to access these sensors in an easy way (with operator[] in an array-like way as with an IrProxy). I've tried to map buttons status in a DioProxy even if I couldn't get it to work. Moreover I've understood that it can send just one byte so I would have had to implement two DioProxy, one for buttons and one for remote because the remote itself sends one byte. So I've decided to use two OpaqueProxy: OpaqueProxy:::”control” to read button and remote status and to set leds. OpaqueProxy:::”motor” to read wheeldrops and to activate vacuum. I know that this isn't straightforward but I couldn't figure out another way (better ideas are appreciated). So I extended Gerkey's lower level driver (roomba_comms.c) inside PlayerStage 2.0.2 implementing two easy function to set leds and motors; and I extended the abstract driver with the three new Proxy. Everything seems to work. In attachments you can find - modified versions of the drivers (roomba_comm.h roomba_comm.c roomba_driver.cc) - diffs file from PlayerStage source 2.0.2 (diff_roomba_comm.h diff_roomba_comm.c diff_roomba_driver.cc) - a simple C++ program that explain the usage of the new proxies (roombamove.cc roombamove.h Makefile) - configuration file for Player-Stage I hope this work could be useful to someone else. Thanks very much to having read this far! Federico Sassi |