Revision: 7113
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7113&view=rev
Author:   natepak
Date:     2008-10-22 17:28:44 +0000 (Wed, 22 Oct 2008)

Log Message:
-----------
Updates to examples

Modified Paths:
--------------
    code/gazebo/trunk/examples/libgazebo/bandit/bandit.cc
    code/gazebo/trunk/examples/player/camera/player.cfg
    code/gazebo/trunk/examples/player/ptz/.player
    code/gazebo/trunk/examples/player/ptz/camera.cc

Modified: code/gazebo/trunk/examples/libgazebo/bandit/bandit.cc
===================================================================
--- code/gazebo/trunk/examples/libgazebo/bandit/bandit.cc       2008-10-22 
00:55:57 UTC (rev 7112)
+++ code/gazebo/trunk/examples/libgazebo/bandit/bandit.cc       2008-10-22 
17:28:44 UTC (rev 7113)
@@ -1,6 +1,17 @@
 #include <gazebo/gazebo.h>
 #include <gazebo/GazeboError.hh>
 
+#include <math.h>
+
+#define DTOR(d) ((d) * M_PI / 180)
+#define RTOD(r) ((r) * 180 / M_PI)
+
+enum Joint {HEAD, NECK, R_SHOULDER, R_SHOULDER2, R_ELBOW, R_ELBOW2, 
+  R_WRIST, R_WRIST2, R_HAND, 
+  L_SHOULDER, L_SHOULDER2, L_ELBOW, L_ELBOW2, L_WRIST, 
+  L_WRIST2, L_HAND, NUM_JOINTS};
+
+
 int main()
 {
   gazebo::Client *client = new gazebo::Client();
@@ -43,7 +54,27 @@
     return -1;
   }
 
-  while (true)
+  printf("Shoulder2[%f]\n", 
RTOD(actarrayIface->data->actuators[R_SHOULDER2].position));
+
+  actarrayIface->data->cmd_pos[R_SHOULDER2] = DTOR(80);
+  actarrayIface->data->cmd_pos[R_ELBOW] = DTOR(90);
+  usleep(1000000);
+  actarrayIface->data->cmd_pos[R_ELBOW2] = DTOR(100);
+  usleep(500000);
+  actarrayIface->data->cmd_pos[R_ELBOW2] = DTOR(0);
+  usleep(500000);
+
+  actarrayIface->data->cmd_pos[R_ELBOW2] = DTOR(100);
+  usleep(500000);
+  actarrayIface->data->cmd_pos[R_ELBOW2] = DTOR(0);
+  usleep(500000);
+  actarrayIface->data->cmd_pos[R_ELBOW2] = DTOR(100);
+
+  actarrayIface->data->cmd_pos[R_ELBOW2] = DTOR(0);
+  actarrayIface->data->cmd_pos[R_SHOULDER2] = DTOR(0);
+  sleep(2);
+
+  /*while (true)
   {
     actarrayIface->Lock(1);
     actarrayIface->data->cmd_pos[16] = 0.3;
@@ -52,8 +83,7 @@
     actarrayIface->data->cmd_pos[19] = -0.3;
     actarrayIface->Unlock();
 
-    usleep(100000);
-  }
+  }*/
   return 0;
 }
 

Modified: code/gazebo/trunk/examples/player/camera/player.cfg
===================================================================
--- code/gazebo/trunk/examples/player/camera/player.cfg 2008-10-22 00:55:57 UTC 
(rev 7112)
+++ code/gazebo/trunk/examples/player/camera/player.cfg 2008-10-22 17:28:44 UTC 
(rev 7113)
@@ -12,7 +12,7 @@
  provides ["camera:0"]
  gz_id "camera_iface_0"
  alwayson 1
- save 1
+ save 0
 )
 
 driver

Modified: code/gazebo/trunk/examples/player/ptz/.player
===================================================================
--- code/gazebo/trunk/examples/player/ptz/.player       2008-10-22 00:55:57 UTC 
(rev 7112)
+++ code/gazebo/trunk/examples/player/ptz/.player       2008-10-22 17:28:44 UTC 
(rev 7113)
@@ -223077,3 +223077,44 @@
 plugins.cc:233 success
 playertcp.cc:283 accepted TCP client 0 on port 6665, fd 7
 playertcp.cc:377 closing TCP connection to client 0 on port 6665
+/home/nate/work/psg/player/libplayercore/plugins.cc:189 loading plugin 
libgazeboplugin
+/home/nate/work/psg/player/libplayercore/plugins.cc:223 invoking 
player_driver_init()...
+/home/nate/work/psg/player/libplayercore/plugins.cc:239 success
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:289 accepted TCP client 0 
on port 6665, fd 7
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:853 read() read zero bytes
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:465 failed to read from 
client 0
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:388 closing TCP 
connection to client 0 on port 6665
+/home/nate/work/psg/player/libplayercore/filewatcher.cc:84 error   : Select 
called failed in File Watcher: 4 Interrupted system call
+/home/nate/work/psg/player/libplayercore/plugins.cc:189 loading plugin 
libgazeboplugin
+/home/nate/work/psg/player/libplayercore/plugins.cc:223 invoking 
player_driver_init()...
+/home/nate/work/psg/player/libplayercore/plugins.cc:239 success
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:289 accepted TCP client 0 
on port 6665, fd 7
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:853 read() read zero bytes
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:465 failed to read from 
client 0
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:388 closing TCP 
connection to client 0 on port 6665
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:289 accepted TCP client 0 
on port 6665, fd 7
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:457 warning : other error 
on client 0
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:388 closing TCP 
connection to client 0 on port 6665
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:289 accepted TCP client 0 
on port 6665, fd 7
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:853 read() read zero bytes
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:465 failed to read from 
client 0
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:388 closing TCP 
connection to client 0 on port 6665
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:289 accepted TCP client 0 
on port 6665, fd 7
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:853 read() read zero bytes
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:465 failed to read from 
client 0
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:388 closing TCP 
connection to client 0 on port 6665
+/home/nate/work/psg/player/libplayercore/filewatcher.cc:84 error   : Select 
called failed in File Watcher: 4 Interrupted system call
+/home/nate/work/psg/player/libplayercore/plugins.cc:189 loading plugin 
libgazeboplugin
+/home/nate/work/psg/player/libplayercore/plugins.cc:223 invoking 
player_driver_init()...
+/home/nate/work/psg/player/libplayercore/plugins.cc:239 success
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:289 accepted TCP client 0 
on port 6665, fd 7
+/home/nate/work/psg/player/libplayercore/filewatcher.cc:84 error   : Select 
called failed in File Watcher: 4 Interrupted system call
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:388 closing TCP 
connection to client 0 on port 6665
+/home/nate/work/psg/player/libplayercore/plugins.cc:189 loading plugin 
libgazeboplugin
+/home/nate/work/psg/player/libplayercore/plugins.cc:223 invoking 
player_driver_init()...
+/home/nate/work/psg/player/libplayercore/plugins.cc:239 success
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:289 accepted TCP client 0 
on port 6665, fd 7
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:853 read() read zero bytes
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:465 failed to read from 
client 0
+/home/nate/work/psg/player/libplayertcp/playertcp.cc:388 closing TCP 
connection to client 0 on port 6665
+/home/nate/work/psg/player/libplayercore/filewatcher.cc:84 error   : Select 
called failed in File Watcher: 4 Interrupted system call

Modified: code/gazebo/trunk/examples/player/ptz/camera.cc
===================================================================
--- code/gazebo/trunk/examples/player/ptz/camera.cc     2008-10-22 00:55:57 UTC 
(rev 7112)
+++ code/gazebo/trunk/examples/player/ptz/camera.cc     2008-10-22 17:28:44 UTC 
(rev 7113)
@@ -16,10 +16,16 @@
     // Subscribe to the camera proxy
     PtzProxy ptzp(&robot, 0);
 
+    while (true)
+    {
+      robot.Read();
+      ptzp.SetCam(30,10,0 );
+    }
   }
   catch (PlayerCc::PlayerError e)
   {
     std::cerr << "Error:" << e << std::endl;
     return -1;
   }
+
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to