Revision: 7317
http://playerstage.svn.sourceforge.net/playerstage/?rev=7317&view=rev
Author: natepak
Date: 2009-02-05 23:53:15 +0000 (Thu, 05 Feb 2009)
Log Message:
-----------
Initialize the laser with it's pose
Modified Paths:
--------------
code/gazebo/trunk/server/controllers/laser/sicklms200/SickLMS200_Laser.cc
Modified:
code/gazebo/trunk/server/controllers/laser/sicklms200/SickLMS200_Laser.cc
===================================================================
--- code/gazebo/trunk/server/controllers/laser/sicklms200/SickLMS200_Laser.cc
2009-02-05 23:52:42 UTC (rev 7316)
+++ code/gazebo/trunk/server/controllers/laser/sicklms200/SickLMS200_Laser.cc
2009-02-05 23:53:15 UTC (rev 7317)
@@ -86,6 +86,27 @@
// Initialize the controller
void SickLMS200_Laser::InitChild()
{
+
+ this->laserIface->Lock(1);
+
+ Quatern rot = this->myParent->GetPose().rot;
+ Vector3 pos = this->myParent->GetPose().pos;
+
+ // Update the pose
+ this->laserIface->data->pose.pos.x = pos.x;
+ this->laserIface->data->pose.pos.y = pos.y;
+ this->laserIface->data->pose.pos.z = pos.z;
+
+ this->laserIface->data->pose.roll = rot.GetRoll();
+ this->laserIface->data->pose.pitch = rot.GetPitch();
+ this->laserIface->data->pose.yaw = rot.GetYaw();
+
+ this->laserIface->data->size.x = 0.1;
+ this->laserIface->data->size.y = 0.1;
+ this->laserIface->data->size.z = 0.1;
+
+
+ this->laserIface->Unlock();
}
////////////////////////////////////////////////////////////////////////////////
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit