From: Brian G. <br...@ge...> - 2006-09-18 15:00:55
|
On Sep 14, 2006, at 1:58 PM, ya_shan wrote: > > I only set the speed command for the client 0. > If pproxies[0]->SetSpeed(0, 1, 0); > Then client 0 does not move at all. ??? Because the second argument to SetSpeed is the Y, or sideways velocity. You're using a non-holonomic robot that cannot drive sideways. As explained in the Position2dProxy documentation, there's a 2-argument version of SetSpeed that just accepts the X (forward) and theta (rotation) velocities: http://playerstage.sourceforge.net/doc/Player-2.0.0/player/ classPlayerCc_1_1Position2dProxy.html > If pproxies[0]->SetSpeed(1, 0, 0); > Then client 0 moves, but not in a constant speed. > The record is : > client # =0 GeoPp =1, 0 > client # =0 GeoPp =1, 0 > client # =0 GeoPp =1, 0 > client # =0 GeoPp =1.2, 0 > client # =0 GeoPp =1.2, 0 > client # =0 GeoPp =1.2, 0 > client # =0 GeoPp =1.5, 0 > client # =0 GeoPp =1.5, 0 > client # =0 GeoPp =1.5, 0 You're probably seeing discretization artifacts from the underlying grid representation of the simulator, combined with the fact that your client is sampling the robot's position asynchronously. In any case, you should never assume that a robot will move at precisely the speed that you command. > If pproxies[0]->SetSpeed(1, 0, M_PI); > Then client 0 runs in circle. Great! That means it works (see documentation indicated above). brian. |