On Oct 5, 2006, at 2:41 PM, Toby Collett wrote:
> Might be worth making -c the default in playerjoy when you add a
> watchdog to stage.
To avoid changes like that, I left the default to be a timeout of
-1.0, which corresponds to no timeout (i.e., the old behavior).
The timeout code is checked in on HEAD and release-2-0-patches. To
try it out, add a line like the following to your position model:
That sets the timeout to 1s.
> Brian Gerkey wrote:
>> A recommendation to folks who maintain position2d drivers: if it
>> doesn't already have one, add a watchdog timer to your driver. This
>> is a bit of code that checks how long it's been since the driver last
>> received a command. If this time exceeds a (configurable) threshold,
>> then the driver stops the robot, for safety.
>> Without a watchdog timer, you can get some surprising and unsafe
>> behavior when using multiple clients. For example: you subscribe to
>> the position2d and laser device with playerv, to watch what the robot
>> sees. Then you start up a control program that drives the robot
>> around. You kill the control program, yet the robot keeps moving.
>> This is because the position2d device is still open, and the robot is
>> executing the last-received command. The same thing can happen if
>> anybody keeping your position2d device open, such as writelog or vfh.
>> I recently added such a timer to the obot driver (server/drivers/
>> mixed/botrics/obot), and I'll soon add it to Stage.