Revision: 7502
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7502&view=rev
Author:   hsujohnhsu
Date:     2009-03-17 01:06:00 +0000 (Tue, 17 Mar 2009)

Log Message:
-----------
option to run headless (w/o rendering engine at all) for remote launching 
gazebo.

Modified Paths:
--------------
    code/gazebo/branches/ogre-1.4.9/server/main.cc

Modified: code/gazebo/branches/ogre-1.4.9/server/main.cc
===================================================================
--- code/gazebo/branches/ogre-1.4.9/server/main.cc      2009-03-17 01:04:14 UTC 
(rev 7501)
+++ code/gazebo/branches/ogre-1.4.9/server/main.cc      2009-03-17 01:06:00 UTC 
(rev 7502)
@@ -115,6 +115,7 @@
 unsigned int optServerId = 0;
 bool optServerForce = true;
 bool optGuiEnabled = true;
+bool optRenderEngineEnabled = true;
 double optTimeout = -1;
 unsigned int optMsgLevel = 1;
 int optTimeControl = 1;
@@ -131,6 +132,7 @@
   fprintf(stderr, "  -d <-1:9>      : Verbose mode: -1 = none, 0 = critical 
(default), 9 = all)\n");
   fprintf(stderr, "  -t <sec>      : Timeout and quit after <sec> seconds\n");
   fprintf(stderr, "  -g            : Run without a GUI\n");
+  fprintf(stderr, "  -r            : Run without a rendering engine\n");
   fprintf(stderr, "  -l <logfile>  : Log to indicated file.\n");
   fprintf(stderr, "  -n            : Do not do any time control\n");
   fprintf(stderr,"   -p            : Run without physics engine\n");
@@ -156,7 +158,7 @@
 {
   FILE *tmpFile;
   int ch;
-  char *flags = (char*)("l:hd:s:fgxt:nqp");
+  char *flags = (char*)("l:hd:s:fgxt:nqpr");
 
   // Get letter options
   while ((ch = getopt(argc, argv, flags)) != -1)
@@ -196,6 +198,10 @@
         optGuiEnabled = false;
         break;
 
+      case 'r':
+        optRenderEngineEnabled = false;
+        break;
+
       case 'p':
         optPhysicsEnabled = false;
         break;
@@ -247,6 +253,14 @@
 int main(int argc, char **argv)
 {
 
+
+  // force a cpu affinity for CPU 0, this slow down sim by about 4X
+  // cpu_set_t cpuSet;
+  // CPU_ZERO(&cpuSet);
+  // CPU_SET(0, &cpuSet);
+  // sched_setaffinity( 0, sizeof(cpuSet), &cpuSet);
+
+
   //Application Setup
   if (ParseArgs(argc, argv) != 0)
     return -1;
@@ -260,6 +274,7 @@
   }
 
   gazebo::Simulator::Instance()->SetGuiEnabled( optGuiEnabled );
+  gazebo::Simulator::Instance()->SetRenderEngineEnabled( 
optRenderEngineEnabled );
 
   //Load the simulator
   try


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

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to