Revision: 8644 http://playerstage.svn.sourceforge.net/playerstage/?rev=8644&view=rev Author: thjc Date: 2010-05-03 17:37:09 +0000 (Mon, 03 May 2010)
Log Message: ----------- Applied patch 2964666: buggy_geom option for sonartoranger driver Modified Paths: -------------- code/player/trunk/server/drivers/ranger/sonartoranger.cc Modified: code/player/trunk/server/drivers/ranger/sonartoranger.cc =================================================================== --- code/player/trunk/server/drivers/ranger/sonartoranger.cc 2010-05-03 17:34:19 UTC (rev 8643) +++ code/player/trunk/server/drivers/ranger/sonartoranger.cc 2010-05-03 17:37:09 UTC (rev 8644) @@ -56,7 +56,11 @@ @par Configuration file options - - None +- buggy_geom (integer) + - Default: 0 + - If set to 1, the pz, proll and ppitch fields will be set to 0.0 + - This option is added to provide compatibility with old buggy sonar drivers + that do not clean unused geometry structure fields @par Example @@ -107,6 +111,7 @@ int ConvertData (player_sonar_data_t *data); private: int skip_rq; + int buggy_geom; }; // Initialisation function @@ -137,6 +142,7 @@ SetError (-1); return; } + this->buggy_geom = cf->ReadInt(section, "buggy_geom", 0); } // Setup function @@ -228,6 +234,12 @@ deviceGeom.element_poses[ii].proll = geom->poses[ii].proll; deviceGeom.element_poses[ii].ppitch = geom->poses[ii].ppitch; deviceGeom.element_poses[ii].pyaw = geom->poses[ii].pyaw; + if (this->buggy_geom) + { + deviceGeom.element_poses[ii].pz = 0.0; + deviceGeom.element_poses[ii].proll = 0.0; + deviceGeom.element_poses[ii].ppitch = 0.0; + } } // Even though the sensor sizes are all zero, they're still there deviceGeom.element_sizes_count = geom->poses_count; @@ -360,4 +372,4 @@ } return -1; - } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit