From: Geoffrey B. <g....@au...> - 2006-03-16 18:19:55
|
The Pioneer robots will stop if they don't receive a command from Player for a certain length of time. This is a safety measure, and means that if you lose your connection to the Player server the robot will more likely stop than go crazy. The reason you're having this happen is because you are waiting for data to arrive from the server before sending a command, and then only sending the command for every 10th message you get from the server (I'm assuming you're using PUSH mode, but even PULL mode would probably encounter this issue). In this case, the delay between commands is likely to be longer than the timeout on the Pioneer. That's why when you send the command every time you get a message, it works fine. Simply put, the solution is to send commands faster, even if they're the same as the last one. Geoff amw@Cs.Nott.AC.UK wrote: > Hi, > I'm just using a simple read-think-act loop as below: > > for (;;) > { > robot.Read(); > if (count%10 == 0) > { > pp.SetSpeed(0.15,DTOR(10)); } count++; > } > > But it works completely differently in Stage than on a real robot. It > works as I would expect in Stage, with constant movement. However, on a > real robot (its a Pioneer 3) movement is very slow and jerky, as if > motion is stopped when it doesn't get to the bit between the if > brackets. I know it has to be to do with the if statement because when > it is removed and I just have: > > for (;;) > { > robot.Read(); pp.SetSpeed(0.15,DTOR(10)); } > > the robot moves with constant motion so it isn't a problem with the > motors. Has anyone else seen this? Any help would be much appreciated. > > I'm using Player 2.0.0 and Stage 2.0.0. > > Amanda -- Robotics research group, University of Auckland http://www.ece.auckland.ac.nz/~gbig005/ |