## [Playerstage-users] Question about SetOdometry ( ));

 [Playerstage-users] Question about SetOdometry ( )); From: syt - 2007-11-28 02:28:39 ```Hello Everyone, Does anyone know how to reduce the running time of SetOdometry() function? When running this function on the simulation, the time it spends is between around 0.01 seconds and 0.04 seconds, which is good. However, if this function is run to set a real robot odometry, it normally spends around 0.2 seconds. Maybe this partly depends on the speed of the CPU but I do not think a powerful computer will improve this too much. Thus, does anyone know how to improve this when set odometry to a real robot? Or is there an alternative way to do so, which can limit the time spent on setting the odometry within 0.1 second? By the way, the purpose to do so is if the EKF sample period is 0.1 second, when the update step is finished, the odometry has to be updated to corrected the location of the robot immediately. Thanks. Cheers Siyang -- View this message in context: http://www.nabble.com/Question-about-SetOdometry-%28-%29%29--tf4885861.html#a13984613 Sent from the playerstage-users mailing list archive at Nabble.com. ```

 [Playerstage-users] Question about SetOdometry ( )); From: syt - 2007-11-28 02:28:39 ```Hello Everyone, Does anyone know how to reduce the running time of SetOdometry() function? When running this function on the simulation, the time it spends is between around 0.01 seconds and 0.04 seconds, which is good. However, if this function is run to set a real robot odometry, it normally spends around 0.2 seconds. Maybe this partly depends on the speed of the CPU but I do not think a powerful computer will improve this too much. Thus, does anyone know how to improve this when set odometry to a real robot? Or is there an alternative way to do so, which can limit the time spent on setting the odometry within 0.1 second? By the way, the purpose to do so is if the EKF sample period is 0.1 second, when the update step is finished, the odometry has to be updated to corrected the location of the robot immediately. Thanks. Cheers Siyang -- View this message in context: http://www.nabble.com/Question-about-SetOdometry-%28-%29%29--tf4885861.html#a13984613 Sent from the playerstage-users mailing list archive at Nabble.com. ```
 Re: [Playerstage-users] Question about SetOdometry ( )); From: Brian Gerkey - 2007-12-05 22:08:23 ```On Nov 27, 2007, at 6:28 PM, syt wrote: > Does anyone know how to reduce the running time of SetOdometry() > function? > > When running this function on the simulation, the time it spends is > between > around 0.01 seconds and 0.04 seconds, which is good. However, if this > function is run to set a real robot odometry, it normally spends > around 0.2 > seconds. Maybe this partly depends on the speed of the CPU but I do > not > think a powerful computer will improve this too much. > > Thus, does anyone know how to improve this when set odometry to a real > robot? Or is there an alternative way to do so, which can limit the > time > spent on setting the odometry within 0.1 second? > > By the way, the purpose to do so is if the EKF sample period is 0.1 > second, > when the update step is finished, the odometry has to be updated to > corrected the location of the robot immediately. The PLAYER_POSITION2D_REQ_SET_ODOM request (which is issued by the Position2d::SetOdometry method) requires a closed-loop interaction with the driver that controls the robot. This interaction can be delayed by waiting for the driver to finish its current communication cycle with the robot. Many robots (e.g., the Pioneers) operate at 10-20Hz. Add a little client-server overhead, and I'm not surprised that the call takes 0.2 seconds. If you cannot tolerate this delay, then I would suggest that you not use SetOdometry. Instead, let the robot's odometry accumulate as normal, and maintain the appropriate coordinate transform in your client program. brian. ```