On 09/12/2012 10:05 AM, RahYan wrote:
> Hi all,
> I develop an application of a demonstrator of mobile robots type "miabot
> I have a file.cfg containing 5 drivers (the file in the attachment).
> After launching the player "player file.cfg" I cannot connect robots at the
> first time ("connection error"). This command must be repeated several times
> until connecting all robots. When the battery of one of the robots is low, I
> encounter the same problem. Is it possible to avoid this problem of
> connection ? or at least launching the application with robots that are able
> to connect? and if for example the battery of one of the robots is low, we
> launch our application with the other robots.
> RahYan http://old.nabble.com/file/p34423746/miabot.cfg miabot.cfg
If Player is failing to start, it's because one of the drivers is
failing to start, probably returning -1 from MainSetup or calling
SetError(-1) in the constructor. You can modify the driver to be more
lenient in the face of an error and keep retrying a connection, instead
of issuing an error. You can also try to start several instances of
Player, one for each different robot, so you don't have to make sure all
of the robots are online for everything to work.