From: David B. <dav...@br...> - 2006-08-21 16:43:40
|
Hi, I am trying to implement Chad's ideas for the roomba driver. The first thing I am trying to do is implement the ir interface. I have made the modifications that were listed, but when I try to run player I get an error: error : Driver has no (usable) interfaces "roomba" error : failed to parse config file test.cfg test.cfg ------------------------------------------------------------ driver ( name "roomba" provides ["position2d:0"] port "/dev/ttyS0" safe 1 alwayson 1 ) driver ( name "camera1394" provides ["camera:0"] ) driver ( name "cmvision" provides ["blobfinder:0"] requires ["camera:0"] colorfile "colors.txt" ) driver ( name "roomba" provides ["bumper:0"] ) driver ( name "roomba" provides ["ir:0"] ) -------------------------------------------------------------------- Addition to Roomba::Roomba(ConfigFile* cf, int section) in roomba_driver.cc -------------------------------------------------------------------- // ir interface if(cf->ReadDeviceAddr(&(this->bumper_addr), section, "provides", PLAYER_IR_CODE, -1, NULL) == 0) { if(this->AddInterface(this->ir_addr) != 0) { this->SetError(-1); return; } } -------------------------------------------------------------------- Addition to Roomba::Main() in roomba_driver.cc -------------------------------------------------------------------- //////////////////////////// // Update ir data player_ir_data_t irdata; memset(&irdata,0,sizeof(irdata)); irdata.rangescount=6; irdata.ranges[0]=this->roomba_dev->wall; irdata.ranges[1]=this->roomba_dev->cliff_left; irdata.ranges[2]=this->roomba_dev->cliff_frontleft; irdata.ranges[3]=this->roomba_dev->cliff_frontright; irdata.ranges[4]=this->roomba_dev->cliff_right; irdata.ranges[5]=this->roomba_dev->virtual_wall; ------------------------------------------------------------------------------ Brian Gerkey wrote: > > > - Add 'ir' and 'gripper' interfaces via Driver::AddInterface() in > Roomba::Roomba(). This happens in roomba_driver.cc. > > - Check for incoming 'ir' and 'gripper' messages (both commands and > requests) in Roomba::ProcessMessage(). Commands translate into calls > into the underlying roomba_comms library (I may not have implemented > the entire Roomba command set in that library, so you may need to add > some calls to turn the vacuum on/off). Requests require a response > (e.g., the client may ask for the IR geometry). This happens in > roomba_driver.cc and roomba_comms.[h,c] > > - Update and Publish() new 'ir' and 'gripper' state data in > Roomba::Main(). This happens in roomba_driver.cc. > > - Change your config file to make the 'roomba' driver 'requires' the > new interfaces. Give it a try with playerv to see whether you're > getting reasonable data. > > Feel free to ask questions as you go, and please send a patch when > you've got something working. > > brian. > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Playerstage-developers mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > > -- View this message in context: http://www.nabble.com/Roomba-vacuum-interface-tf2103196.html#a5910383 Sent from the playerstage-developers forum at Nabble.com. |