Revision: 8472 http://playerstage.svn.sourceforge.net/playerstage/?rev=8472&view=rev Author: natepak Date: 2009-12-17 19:05:14 +0000 (Thu, 17 Dec 2009)
Log Message: ----------- Fixed running without rendering engine Modified Paths: -------------- code/gazebo/trunk/server/Model.cc code/gazebo/trunk/server/physics/Joint.cc code/gazebo/trunk/server/physics/MultiRayShape.cc code/gazebo/trunk/server/physics/ode/ODERayShape.cc Modified: code/gazebo/trunk/server/Model.cc =================================================================== --- code/gazebo/trunk/server/Model.cc 2009-12-17 02:53:42 UTC (rev 8471) +++ code/gazebo/trunk/server/Model.cc 2009-12-17 19:05:14 UTC (rev 8472) @@ -252,9 +252,12 @@ this->SetGravityMode( **this->enableGravityP ); //global fiducial and retro id - this->SetLaserFiducialId(**this->laserFiducialP); - this->SetLaserRetro(**this->laserRetroP); + if (**this->laserFiducialP != -1.0 ) + this->SetLaserFiducialId(**this->laserFiducialP); + if (**this->laserRetroP != -1.0) + this->SetLaserRetro(**this->laserRetroP); + // Create the graphics iface handler this->graphicsHandler = new GraphicsIfaceHandler(); this->graphicsHandler->Load(this->GetScopedName(), this); Modified: code/gazebo/trunk/server/physics/Joint.cc =================================================================== --- code/gazebo/trunk/server/physics/Joint.cc 2009-12-17 02:53:42 UTC (rev 8471) +++ code/gazebo/trunk/server/physics/Joint.cc 2009-12-17 19:05:14 UTC (rev 8472) @@ -210,18 +210,21 @@ /// Update the joint void Joint::Update() { + this->anchorPos = (Pose3d(**(this->anchorOffsetP),Quatern()) + + this->anchorBody->GetAbsPose()).pos; + //TODO: Evaluate impact of this code on performance if (this->visual) + { this->visual->SetVisible(World::Instance()->GetShowJoints()); - this->anchorPos = (Pose3d(**(this->anchorOffsetP),Quatern())+ this->anchorBody->GetAbsPose()).pos; - - this->visual->SetPosition(this->anchorPos); - if (this->body1) - this->line1->SetPoint(1, this->body1->GetAbsPose().pos - this->anchorPos); + this->visual->SetPosition(this->anchorPos); + if (this->body1) + this->line1->SetPoint(1, this->body1->GetAbsPose().pos - this->anchorPos); - if (this->body2) - this->line2->SetPoint(1, this->body2->GetAbsPose().pos - this->anchorPos); + if (this->body2) + this->line2->SetPoint(1, this->body2->GetAbsPose().pos - this->anchorPos); + } } ////////////////////////////////////////////////////////////////////////////// Modified: code/gazebo/trunk/server/physics/MultiRayShape.cc =================================================================== --- code/gazebo/trunk/server/physics/MultiRayShape.cc 2009-12-17 02:53:42 UTC (rev 8471) +++ code/gazebo/trunk/server/physics/MultiRayShape.cc 2009-12-17 19:05:14 UTC (rev 8472) @@ -15,11 +15,14 @@ this->rayFanOutline = OgreCreator::Instance()->CreateDynamicLine( OgreDynamicRenderable::OT_LINE_STRIP); - this->parent->GetVisualNode()->AttachObject(this->rayFan); - this->parent->GetVisualNode()->AttachObject(this->rayFanOutline); + if (this->rayFan && this->rayFanOutline) + { + this->parent->GetVisualNode()->AttachObject(this->rayFan); + this->parent->GetVisualNode()->AttachObject(this->rayFanOutline); - this->rayFan->setMaterial("Gazebo/BlueLaser"); - this->rayFanOutline->setMaterial("Gazebo/BlueEmissive"); + this->rayFan->setMaterial("Gazebo/BlueLaser"); + this->rayFanOutline->setMaterial("Gazebo/BlueEmissive"); + } Param::Begin(&this->parameters); this->rayCountP = new ParamT<int>("rayCount",0,1); Modified: code/gazebo/trunk/server/physics/ode/ODERayShape.cc =================================================================== --- code/gazebo/trunk/server/physics/ode/ODERayShape.cc 2009-12-17 02:53:42 UTC (rev 8471) +++ code/gazebo/trunk/server/physics/ode/ODERayShape.cc 2009-12-17 19:05:14 UTC (rev 8472) @@ -66,8 +66,6 @@ dir = this->globalEndPos - this->globalStartPos; dir.Normalize(); - //std::cout << "Start[" << this->relativeStartPos << "] End[" << this->relativeEndPos << "] Dir[" << dir << "]\n"; - if (this->contactLen != 0) { dGeomRaySet(geom->GetGeomId(), this->globalStartPos.x, 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 Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit