main.cc

Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <scorpion.h>
00003 #include <libplayerc++/playerc++.h>
00004 
00005 int
00006 main(int argc, char *argv[])
00007 {
00008    using namespace PlayerCc;
00009 
00010    PlayerClient robot("localhost");
00011    IrProxy ir(&robot, 0);
00012 
00013    while (1) {
00014       // read from the proxies
00015       robot.Read();
00016 
00017       printf("%d IR range sensors\n", ir.GetCount());
00018 
00019       for (int i = 0; i < ir.GetCount(); i++) {
00020          double range = ir[i];
00021 
00022          if (range < 10)
00023             printf("%-10s -> %f\n", scorpion_ir_range_name(i), range);
00024       }
00025    }
00026 }

Generated on Sat Jan 13 03:11:09 2007 for ERSP Player driver by  doxygen 1.5.1