Hi all,
I am doing a custom plugin driver for our robot (romaa). First I did a driver with the position2d interface to command the robot with linear and angular speed, and it work well.  The interface is obtained from the .cfg file as follow

if ( cf->ReadDeviceAddr( &position2d_addr, section, "provides",
            PLAYER_POSITION2D_CODE, -1, NULL) == 0 )
{
    if ( this->AddInterface( position2d_addr ) != 0 )
    {
        PLAYER_ERROR( "Error adding position2d interface" );
        this->SetError(-1);
        return;
    }
}
with the index=-1 so it look for any index.

Next, I did a driver to send wheel speed command using two position1d interfaces. In the class constructor the two position1d interface are obtained from the .cfg file, as follow

  if ( cf->ReadDeviceAddr( &position1d_addr1, section, "provides",
        PLAYER_POSITION1D_CODE, 0, NULL) == 0 )
  {
    if ( this->AddInterface( position1d_addr1 ) != 0 )
    {  
      PLAYER_ERROR( "Error adding position1d interface" );
      this->SetError(-1);
      return;
    }  
  }
  if ( cf->ReadDeviceAddr( &position1d_addr2, section, "provides",
        PLAYER_POSITION1D_CODE, 1, NULL) == 0 )
  {
    if ( this->AddInterface( position1d_addr2 ) != 0 )
    {  
      PLAYER_ERROR( "Error adding position1d interface" );
      this->SetError(-1);
      return;
    }  
  }
one with an index=0 and the other with index=1.

And last, I did another driver trying to mix this both. Using one position2d interface and two position1d interface. But it did not work.
It only work if I change the indexes of the two position1d interfaces to 1 and 2, so the provided parameter in the .cfg file is

provides [ "position2d:0"
                  "position1d:1"


--
Gonzalo F. Perez Paina
Centro de Investigación en Informática para la Ingeniería, CIII.
Universidad Tecnológica Nacional. Facultad Regional Córdoba.
Maestro M. López esq. Cruz Roja Argentina. CP X5016ZAA
gperez@scdt.frc.utn.edu.ar