Revision: 6678
http://playerstage.svn.sourceforge.net/playerstage/?rev=6678&view=rev
Author: natepak
Date: 2008-06-24 09:09:36 -0700 (Tue, 24 Jun 2008)
Log Message:
-----------
Check for null pointer in SickLMS200 controller.
Modified Paths:
--------------
code/gazebo/trunk/server/controllers/laser/sicklms200/SickLMS200_Laser.cc
code/gazebo/trunk/worlds/test.world
Modified:
code/gazebo/trunk/server/controllers/laser/sicklms200/SickLMS200_Laser.cc
===================================================================
--- code/gazebo/trunk/server/controllers/laser/sicklms200/SickLMS200_Laser.cc
2008-06-24 16:02:24 UTC (rev 6677)
+++ code/gazebo/trunk/server/controllers/laser/sicklms200/SickLMS200_Laser.cc
2008-06-24 16:09:36 UTC (rev 6678)
@@ -98,10 +98,15 @@
if (this->laserIface->Lock(1))
{
laserOpened = this->laserIface->GetOpenCount() > 0;
- fidOpened = this->fiducialIface->GetOpenCount() > 0;
this->laserIface->Unlock();
}
+ if (this->fiducialIface && this->fiducialIface->Lock(1))
+ {
+ fidOpened = this->fiducialIface->GetOpenCount() > 0;
+ this->fiducialIface->Unlock();
+ }
+
if (laserOpened)
{
this->myParent->SetActive(true);
Modified: code/gazebo/trunk/worlds/test.world
===================================================================
--- code/gazebo/trunk/worlds/test.world 2008-06-24 16:02:24 UTC (rev 6677)
+++ code/gazebo/trunk/worlds/test.world 2008-06-24 16:09:36 UTC (rev 6678)
@@ -70,12 +70,12 @@
<geom:cylinder name="cylinder1_geom">
<size>0.5 1</size>
<mass>1.0</mass>
+ <laserFiducialId>1</laserFiducialId>
+
<visual>
<mesh>unit_cylinder</mesh>
<material>Gazebo/RustyBarrel</material>
</visual>
-
- <laserFiducialId>1</laserFiducialId>
</geom:cylinder>
</body:cylinder>
</model:physical>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit