Revision: 8398
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8398&view=rev
Author:   natepak
Date:     2009-11-12 20:54:56 +0000 (Thu, 12 Nov 2009)

Log Message:
-----------
Fixed camera naming

Modified Paths:
--------------
    code/gazebo/trunk/server/gui/GLFrame.cc
    code/gazebo/trunk/server/rendering/OgreCamera.cc
    code/gazebo/trunk/server/rendering/OgreCamera.hh
    code/gazebo/trunk/server/sensors/camera/MonoCameraSensor.cc
    code/gazebo/trunk/worlds/willowgarage.world

Modified: code/gazebo/trunk/server/gui/GLFrame.cc
===================================================================
--- code/gazebo/trunk/server/gui/GLFrame.cc     2009-11-12 19:43:13 UTC (rev 
8397)
+++ code/gazebo/trunk/server/gui/GLFrame.cc     2009-11-12 20:54:56 UTC (rev 
8398)
@@ -210,6 +210,7 @@
 // Switch view callback
 void GLFrame::ViewCB(Fl_Widget *widget, void *data)
 {
+  printf("VIEW CB\n");
   GLFrame *frame = reinterpret_cast<GLFrame *>(data);
   Fl_Choice *choice = dynamic_cast<Fl_Choice *>(widget);
 

Modified: code/gazebo/trunk/server/rendering/OgreCamera.cc
===================================================================
--- code/gazebo/trunk/server/rendering/OgreCamera.cc    2009-11-12 19:43:13 UTC 
(rev 8397)
+++ code/gazebo/trunk/server/rendering/OgreCamera.cc    2009-11-12 20:54:56 UTC 
(rev 8398)
@@ -80,9 +80,6 @@
 
   this->captureData = false;
 
-  // This should be last in the constructor
-  CameraManager::Instance()->AddCamera(this);
-
   this->camera = NULL;
 
   this->renderPeriod = 1.0/(**this->updateRateP);
@@ -111,9 +108,11 @@
 // Load the camera
 void OgreCamera::LoadCam( XMLConfigNode *node )
 {
+  // This should be last in the constructor
+  CameraManager::Instance()->AddCamera(this);
+
   if (!Simulator::Instance()->GetRenderEngineEnabled())
     return;
-    //gzthrow("Cameras can not be used when running Gazebo without rendering 
engine");
 
   this->visibilityMask = GZ_ALL_CAMERA; 
 

Modified: code/gazebo/trunk/server/rendering/OgreCamera.hh
===================================================================
--- code/gazebo/trunk/server/rendering/OgreCamera.hh    2009-11-12 19:43:13 UTC 
(rev 8397)
+++ code/gazebo/trunk/server/rendering/OgreCamera.hh    2009-11-12 20:54:56 UTC 
(rev 8398)
@@ -246,7 +246,7 @@
     private: static unsigned int cameraCounter;
     private: unsigned int myCount;
 
-    private: std::string cameraName;
+    protected: std::string cameraName;
 
     protected: bool captureData;
 

Modified: code/gazebo/trunk/server/sensors/camera/MonoCameraSensor.cc
===================================================================
--- code/gazebo/trunk/server/sensors/camera/MonoCameraSensor.cc 2009-11-12 
19:43:13 UTC (rev 8397)
+++ code/gazebo/trunk/server/sensors/camera/MonoCameraSensor.cc 2009-11-12 
20:54:56 UTC (rev 8398)
@@ -67,8 +67,10 @@
 // Load the camera
 void MonoCameraSensor::LoadChild( XMLConfigNode *node )
 {
+  this->cameraName = this->GetName();
   this->LoadCam( node );
 
+
   // Do some sanity checks
   if (this->imageSizeP->GetValue().x == 0 || 
       this->imageSizeP->GetValue().y == 0)

Modified: code/gazebo/trunk/worlds/willowgarage.world
===================================================================
--- code/gazebo/trunk/worlds/willowgarage.world 2009-11-12 19:43:13 UTC (rev 
8397)
+++ code/gazebo/trunk/worlds/willowgarage.world 2009-11-12 20:54:56 UTC (rev 
8398)
@@ -99,7 +99,7 @@
     <body:box name="camera_body">
       <xyz>-0.5 0 1.5</xyz>
       <rpy>0 30 0</rpy>
-      <sensor:camera name="r_forearm_cam_sensor">
+      <sensor:camera name="follow_camera">
         <imageSize>640.0 480.0</imageSize>
         <imageFormat>L8</imageFormat>
         <hfov>90.0</hfov>


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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to