[Jderobot-admin] jderobot-r905 - trunk/src/components/gazeboserver

bmenendez en jderobot.org bmenendez en jderobot.org
Mie Abr 24 10:53:35 CEST 2013


Author: bmenendez
Date: 2013-04-24 10:52:34 +0200 (Wed, 24 Apr 2013)
New Revision: 905

Modified:
   trunk/src/components/gazeboserver/laser.cc
   trunk/src/components/gazeboserver/pioneer2dx2Encoders.cfg
   trunk/src/components/gazeboserver/pioneer2dx2Motors.cfg
   trunk/src/components/gazeboserver/pioneer2dx2_cam_sensor_left.cfg
   trunk/src/components/gazeboserver/pioneer2dx2_cam_sensor_right.cfg
   trunk/src/components/gazeboserver/pioneer2dx2_laser.cfg
   trunk/src/components/gazeboserver/pioneer2dx2_pose3dencoders.cfg
   trunk/src/components/gazeboserver/pioneer2dxEncoders.cfg
   trunk/src/components/gazeboserver/pioneer2dxJde.world
   trunk/src/components/gazeboserver/pioneer2dxMotors.cfg
   trunk/src/components/gazeboserver/pioneer2dx_cam_sensor_left.cfg
   trunk/src/components/gazeboserver/pioneer2dx_cam_sensor_right.cfg
   trunk/src/components/gazeboserver/pioneer2dx_laser.cfg
   trunk/src/components/gazeboserver/pioneer2dx_pose3dencoders.cfg
   trunk/src/components/gazeboserver/pose3dencoders.cc
Log:
[bmenendez] Modificado el plugin del laser, que podia dar error a la hora
de utilizarlo.


Modified: trunk/src/components/gazeboserver/laser.cc
===================================================================
--- trunk/src/components/gazeboserver/laser.cc	2013-04-19 09:35:04 UTC (rev 904)
+++ trunk/src/components/gazeboserver/laser.cc	2013-04-24 08:52:34 UTC (rev 905)
@@ -78,7 +78,7 @@
 
 class LaserI: virtual public jderobot::Laser {
 	public:
-		LaserI (gazebo::LaserDump* laser):laserData(new jderobot::LaserData()) 
+		LaserI (gazebo::LaserDump* laser) 
 		{
 			this->laser = laser;
 		}
@@ -86,6 +86,7 @@
 		virtual ~LaserI(){};
 
 		virtual jderobot::LaserDataPtr getLaserData(const Ice::Current&) {
+		    jderobot::LaserDataPtr laserData (new jderobot::LaserData());
 			pthread_mutex_lock (&laser->mutex); 
 			laserData->numLaser = laser->laserValues.size();
 			laserData->distanceData.resize(sizeof(int)*laserData->numLaser);
@@ -99,7 +100,6 @@
 		};
 
 	private:
-		jderobot::LaserDataPtr laserData;
 		int laser_num_readings;
 		gazebo::LaserDump* laser;
 };

Modified: trunk/src/components/gazeboserver/pioneer2dx2Encoders.cfg
===================================================================
--- trunk/src/components/gazeboserver/pioneer2dx2Encoders.cfg	2013-04-19 09:35:04 UTC (rev 904)
+++ trunk/src/components/gazeboserver/pioneer2dx2Encoders.cfg	2013-04-24 08:52:34 UTC (rev 905)
@@ -1,3 +1,3 @@
 #without registry
-Encoders.Endpoints=default -h 0.0.0.0 -p 8997
+Encoders.Endpoints=default -h localhost -p 8997
 

Modified: trunk/src/components/gazeboserver/pioneer2dx2Motors.cfg
===================================================================
--- trunk/src/components/gazeboserver/pioneer2dx2Motors.cfg	2013-04-19 09:35:04 UTC (rev 904)
+++ trunk/src/components/gazeboserver/pioneer2dx2Motors.cfg	2013-04-24 08:52:34 UTC (rev 905)
@@ -1,3 +1,3 @@
 #without registry
-Motors.Endpoints=default -h 0.0.0.0 -p 8999
+Motors.Endpoints=default -h localhost -p 8999
 

Modified: trunk/src/components/gazeboserver/pioneer2dx2_cam_sensor_left.cfg
===================================================================
--- trunk/src/components/gazeboserver/pioneer2dx2_cam_sensor_left.cfg	2013-04-19 09:35:04 UTC (rev 904)
+++ trunk/src/components/gazeboserver/pioneer2dx2_cam_sensor_left.cfg	2013-04-24 08:52:34 UTC (rev 905)
@@ -1,5 +1,5 @@
 #without registry
-CameraGazebo.Endpoints=default -h 0.0.0.0 -p 8995
+CameraGazebo.Endpoints=default -h localhost -p 8995
 
 #camera 1
 CameraGazebo.Camera.0.Name=cameraA

Modified: trunk/src/components/gazeboserver/pioneer2dx2_cam_sensor_right.cfg
===================================================================
--- trunk/src/components/gazeboserver/pioneer2dx2_cam_sensor_right.cfg	2013-04-19 09:35:04 UTC (rev 904)
+++ trunk/src/components/gazeboserver/pioneer2dx2_cam_sensor_right.cfg	2013-04-24 08:52:34 UTC (rev 905)
@@ -1,5 +1,5 @@
 #without registry
-CameraGazebo.Endpoints=default -h 0.0.0.0 -p 8994
+CameraGazebo.Endpoints=default -h localhost -p 8994
 
 #camera 1
 CameraGazebo.Camera.0.Name=cameraA

Modified: trunk/src/components/gazeboserver/pioneer2dx2_laser.cfg
===================================================================
--- trunk/src/components/gazeboserver/pioneer2dx2_laser.cfg	2013-04-19 09:35:04 UTC (rev 904)
+++ trunk/src/components/gazeboserver/pioneer2dx2_laser.cfg	2013-04-24 08:52:34 UTC (rev 905)
@@ -1,2 +1,2 @@
 #without registry
-Laser.Endpoints=default -h 0.0.0.0 -p 8998
+Laser.Endpoints=default -h localhost -p 8998

Modified: trunk/src/components/gazeboserver/pioneer2dx2_pose3dencoders.cfg
===================================================================
--- trunk/src/components/gazeboserver/pioneer2dx2_pose3dencoders.cfg	2013-04-19 09:35:04 UTC (rev 904)
+++ trunk/src/components/gazeboserver/pioneer2dx2_pose3dencoders.cfg	2013-04-24 08:52:34 UTC (rev 905)
@@ -1,5 +1,5 @@
 #without registry
-Pose3DEncoders1.Endpoints=default -h 0.0.0.0 -p 8993
-Pose3DEncoders2.Endpoints=default -h 0.0.0.0 -p 8992
-Pose3DMotors1.Endpoints=default -h 0.0.0.0 -p 8991
-Pose3DMotors2.Endpoints=default -h 0.0.0.0 -p 8990
+Pose3DEncoders1.Endpoints=default -h localhost -p 8993
+Pose3DEncoders2.Endpoints=default -h localhost -p 8992
+Pose3DMotors1.Endpoints=default -h localhost -p 8991
+Pose3DMotors2.Endpoints=default -h localhost -p 8990

Modified: trunk/src/components/gazeboserver/pioneer2dxEncoders.cfg
===================================================================
--- trunk/src/components/gazeboserver/pioneer2dxEncoders.cfg	2013-04-19 09:35:04 UTC (rev 904)
+++ trunk/src/components/gazeboserver/pioneer2dxEncoders.cfg	2013-04-24 08:52:34 UTC (rev 905)
@@ -1,3 +1,3 @@
 #without registry
-Encoders.Endpoints=default -h 0.0.0.0 -p 9997
+Encoders.Endpoints=default -h localhost -p 9997
 

Modified: trunk/src/components/gazeboserver/pioneer2dxJde.world
===================================================================
--- trunk/src/components/gazeboserver/pioneer2dxJde.world	2013-04-19 09:35:04 UTC (rev 904)
+++ trunk/src/components/gazeboserver/pioneer2dxJde.world	2013-04-24 08:52:34 UTC (rev 905)
@@ -17,7 +17,7 @@
       <name>pioneer2dx</name>
     </include>
     
-        <!-- Pioneer2dx model -->
+        <!-- Pioneer2dx model
     <include>
 <!--      <uri>model://pioneer2dxJde</uri>
       <name>pioneer2dx2</name>

Modified: trunk/src/components/gazeboserver/pioneer2dxMotors.cfg
===================================================================
--- trunk/src/components/gazeboserver/pioneer2dxMotors.cfg	2013-04-19 09:35:04 UTC (rev 904)
+++ trunk/src/components/gazeboserver/pioneer2dxMotors.cfg	2013-04-24 08:52:34 UTC (rev 905)
@@ -1,3 +1,3 @@
 #without registry
-Motors.Endpoints=default -h 0.0.0.0 -p 9999
+Motors.Endpoints=default -h localhost -p 9999
 

Modified: trunk/src/components/gazeboserver/pioneer2dx_cam_sensor_left.cfg
===================================================================
--- trunk/src/components/gazeboserver/pioneer2dx_cam_sensor_left.cfg	2013-04-19 09:35:04 UTC (rev 904)
+++ trunk/src/components/gazeboserver/pioneer2dx_cam_sensor_left.cfg	2013-04-24 08:52:34 UTC (rev 905)
@@ -1,5 +1,5 @@
 #without registry
-CameraGazebo.Endpoints=default -h 0.0.0.0 -p 9991
+CameraGazebo.Endpoints=default -h localhost -p 9995
 
 #camera 1
 CameraGazebo.Camera.0.Name=cameraA

Modified: trunk/src/components/gazeboserver/pioneer2dx_cam_sensor_right.cfg
===================================================================
--- trunk/src/components/gazeboserver/pioneer2dx_cam_sensor_right.cfg	2013-04-19 09:35:04 UTC (rev 904)
+++ trunk/src/components/gazeboserver/pioneer2dx_cam_sensor_right.cfg	2013-04-24 08:52:34 UTC (rev 905)
@@ -1,5 +1,5 @@
 #without registry
-CameraGazebo.Endpoints=default -h 0.0.0.0 -p 9992
+CameraGazebo.Endpoints=default -h localhost -p 9994
 
 #camera 1
 CameraGazebo.Camera.0.Name=cameraA

Modified: trunk/src/components/gazeboserver/pioneer2dx_laser.cfg
===================================================================
--- trunk/src/components/gazeboserver/pioneer2dx_laser.cfg	2013-04-19 09:35:04 UTC (rev 904)
+++ trunk/src/components/gazeboserver/pioneer2dx_laser.cfg	2013-04-24 08:52:34 UTC (rev 905)
@@ -1,2 +1,2 @@
 #without registry
-Laser.Endpoints=default -h 0.0.0.0 -p 9998
+Laser.Endpoints=default -h localhost -p 9996

Modified: trunk/src/components/gazeboserver/pioneer2dx_pose3dencoders.cfg
===================================================================
--- trunk/src/components/gazeboserver/pioneer2dx_pose3dencoders.cfg	2013-04-19 09:35:04 UTC (rev 904)
+++ trunk/src/components/gazeboserver/pioneer2dx_pose3dencoders.cfg	2013-04-24 08:52:34 UTC (rev 905)
@@ -1,5 +1,5 @@
 #without registry
-Pose3DEncoders1.Endpoints=default -h 0.0.0.0 -p 9993
-Pose3DEncoders2.Endpoints=default -h 0.0.0.0 -p 9992
-Pose3DMotors1.Endpoints=default -h 0.0.0.0 -p 9991
-Pose3DMotors2.Endpoints=default -h 0.0.0.0 -p 9990
+Pose3DEncoders1.Endpoints=default -h localhost -p 9993
+Pose3DEncoders2.Endpoints=default -h localhost -p 9992
+Pose3DMotors1.Endpoints=default -h localhost -p 9991
+Pose3DMotors2.Endpoints=default -h localhost -p 9990

Modified: trunk/src/components/gazeboserver/pose3dencoders.cc
===================================================================
--- trunk/src/components/gazeboserver/pose3dencoders.cc	2013-04-19 09:35:04 UTC (rev 904)
+++ trunk/src/components/gazeboserver/pose3dencoders.cc	2013-04-24 08:52:34 UTC (rev 905)
@@ -179,7 +179,7 @@
                 this->cameraLeft.joint_pose3dencoders_tilt->SetMaxForce(0, this->torque);
             }
         } else {
-            if (this->cameraLeft.encoder.pan > this->cameraLeft.motor.tilt) {
+            if (this->cameraLeft.encoder.tilt > this->cameraLeft.motor.tilt) {
                 this->cameraLeft.joint_pose3dencoders_tilt->SetVelocity(0, 0.1);
                 this->cameraLeft.joint_pose3dencoders_tilt->SetMaxForce(0, this->torque);
                 //std::cout << "AQUI" << std::endl;
@@ -198,7 +198,7 @@
                 this->cameraRight.joint_pose3dencoders_tilt->SetMaxForce(0, this->torque);
             }
         } else {
-            if (this->cameraRight.encoder.pan > this->cameraRight.motor.tilt) {
+            if (this->cameraRight.encoder.tilt > this->cameraRight.motor.tilt) {
                 this->cameraRight.joint_pose3dencoders_tilt->SetVelocity(0, 0.1);
                 this->cameraRight.joint_pose3dencoders_tilt->SetMaxForce(0, this->torque);
                 //std::cout << "AQUI" << std::endl;



More information about the Jderobot-admin mailing list