On Fri, 22 Jul 2005, Richard vaughan wrote:
> On 19-Jul-05, at 11:36 PM, Michael Janssen wrote:
> >On Mon, 18 Jul 2005, Richard vaughan wrote:
> >>On 18-Jul-05, at 12:03 PM, Mike Gauthier wrote:
> >>>You have two position drivers defined for the same port (6665).
> >>>Every agent you
> >>>want to run must be on a different port.
> >>This is not correct. Drivers do not have to be on unique ports. For
> >>example, 6665:position:0 and 6665:position:1 can be mapped by
> >>separate drivers, as in Tingting's example. However, the Stage driver
> >>requires a unique model name for each instance of the driver.
> >How hard would it be to change this behavior? It seems
> >counterintuitive for some drivers, especially ones like blobfinder,
> >where you could easily want more than one on the same model. I am
> >offering to do it myself, but I haven't dove in to see what specific
> >obstacles need to be overcome and I thought you may have some thoughts
> >on the issue.
> I think you misunderstand me. This will work fine:
> driver (
> name "stage"
> provides [ "blobfinder:0" "blobfinder:1" "blobfinder:2"
> "blobfinder:3" ]
> model "robot_with_blobfinders"
> Which I think does what you want.
It, in fact, does not work fine:
** Player v1.6.4 **
* Part of the Player/Stage Project
* Copyright 2000-2005 Brian Gerkey, Richard Vaughan, Andrew Howard,
* Nate Koenig and contributors.
* Released under the GNU General Public License.
Startup options: [TCP]
Parsing configuration file "blobtest.cfg"
trying to load /project/player/soft/lib/libstage.so...success
Stage driver creating 1 device
mapping device 6665.31.0 => "blobtest.world" [Include
map.inc][Include pioneer.inc] done.
Stage driver creating 3 devices
mapping device 6665.4.0 => "p0"
mapping device 6665.7.0 => "p0.blobfinder:0"
mapping device 6665.7.1 => ERROR! no model available for this device. Check your world and config files.
error : Initialization failed for driver "stage"
The stage code stops looking after it finds a device with the right
type but being used. This is with Stage 1.6.2, Player 1.6.4
The cause of this is in stg_driver.cc's model_match function which, when finding
a matching model, stops searching for another model which is not taken up
(returning NULL) when it finds one of the type which is already used.
In CVS HEAD, this code is in p_driver.cc. I've filed a bug with a patch attached i
which fixes this against CVS:
Michael Janssen --- Jamuraa --- jamuraa@... --- jamuraa@...