Revision: 8214
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8214&view=rev
Author:   robotos
Date:     2009-08-21 03:48:00 +0000 (Fri, 21 Aug 2009)

Log Message:
-----------
make libplayerc++ ruby example work

Modified Paths:
--------------
    code/player/trunk/examples/ruby/libplayerc++_ruby_example.rb

Modified: code/player/trunk/examples/ruby/libplayerc++_ruby_example.rb
===================================================================
--- code/player/trunk/examples/ruby/libplayerc++_ruby_example.rb        
2009-08-21 03:46:56 UTC (rev 8213)
+++ code/player/trunk/examples/ruby/libplayerc++_ruby_example.rb        
2009-08-21 03:48:00 UTC (rev 8214)
@@ -28,10 +28,10 @@
 require 'playercpp'
 
 # Create a client object and connect it
-robot = Playercpp::PlayerClient('localhost')
+robot = Playercpp::PlayerClient.new('localhost')
 
 # Create a proxy for position2d:0
-pp = Playercpp::Position2dProxy(robot, 0)
+pp = Playercpp::Position2dProxy.new(robot, 0)
 
 # Retrieve the geometry
 pp.RequestGeom()
@@ -39,11 +39,11 @@
 puts 'Robot size: (%.3f,%.3f,%.3f)' % [size.sw, size.sl, size.sh]
 
 # Create a proxy for laser:0
-lp = Playercpp::LaserProxy(robot, 0)
+lp = Playercpp::LaserProxy.new(robot, 0)
 
 # Retrieve the geometry
-pose = lp.GetSize()
-puts 'Laser pose: (%.3f,%.3f,%.3f)' % [pose.sw, pose.sl, pose.sh]
+laserSize = lp.GetSize()
+puts 'Laser size: (%.3f,%.3f,%.3f)' % [laserSize.sw, laserSize.sl, 
laserSize.sh]
 
 # Start the robot turning CCW at 20 deg / sec
 pp.SetSpeed(0.0, 20.0 * Math::PI / 180.0)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to