blobfinder

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

blobfinder

Lucas De Marchi
Please, I have found no examples about using blobfinder with gazebo. How is the .cfg player file?
I've tried this:

a piece of gazebo world file:

  <model:Pioneer2DX>
    <id>robot0</id>
    <xyz>-0.000 0.000 0.234</xyz>
    <model:MonoCam>
      <id>cam0</id>
      <xyz>0.15 0.0 0.0</xyz>
    </model:MonoCam>
  </model:Pioneer2DX>

Player .cfg file

driver
(
  name "gz_position"
  provides ["position:0"]
  gz_id "robot0"
)

driver
(
  name "gz_camera"
  provides ["camera:0"]
  gz_id "cam0"
)

driver
(
  name "cmvision"
  provides ["blobfinder:0"]
  requires ["camera:0"]
)

and my code:

int main(int argc, char *argv[])
{
 
  PlayerClient robot("localhost");
  //CameraProxy  robot_camera(&robot,0,'a');
  BlobfinderProxy bp(&robot,0, 'r');
  uint8_t * img;
  //Initializing SDL

...

  bp.SetAutoGain(0);
  bp.SetColorMode(0);
  bp.SetContrast(128);
  bp.SetBrightness(128);
 
  sleep(1);
  bp.SetTrackingColor();
  int done=0;
  while(!done){
    SDL_Event event;
    while(SDL_PollEvent(&event))
      if ( event.type == SDL_QUIT )  {  done = 1;  }
   
   if(!robot.Read()) bp.Print();

  }


  return 0;
}



And so I got an error:
WARNING: tried to get 'r' access to device 6665:7:0 but got 'e' access.
#Blobfinder(7:0) - e
#Blobfinder(7:0) - e
#Blobfinder(7:0) - e
#Blobfinder(7:0) - e
...



Thanks.
-----------------
Lucas Martins De Marchi
Reply | Threaded
Open this post in threaded view
|

Re: blobfinder

Nate Koenig
Hello,

Look at the error message player spits out. It says that you need a
colorfile for the cmvision driver. Look in the documentation:
http://playerstage.sourceforge.net/doc/Player-current/player-html/group__player__driver__cmvision.php

-nate

On 11/17/05, Lucas Martins De Marchi <[hidden email]> wrote:

> Please, I have found no examples about using blobfinder with gazebo. How is
> the .cfg player file?
>  I've tried this:
>
>  a piece of gazebo world file:
>
>    <model:Pioneer2DX>
>      <id>robot0</id>
>      <xyz>-0.000 0.000 0.234</xyz>
>      <model:MonoCam>
>        <id>cam0</id>
>        <xyz>0.15 0.0 0.0</xyz>
>      </model:MonoCam>
>    </model:Pioneer2DX>
>
>  Player .cfg file
>
>  driver
>  (
>    name "gz_position"
>    provides ["position:0"]
>    gz_id "robot0"
>  )
>
>  driver
>  (
>    name "gz_camera"
>    provides ["camera:0"]
>    gz_id "cam0"
>  )
>
>  driver
>  (
>    name "cmvision"
>    provides ["blobfinder:0"]
>    requires ["camera:0"]
>  )
>
>  and my code:
>
>  int main(int argc, char *argv[])
>  {
>
>    PlayerClient robot("localhost");
>    //CameraProxy  robot_camera(&robot,0,'a');
>    BlobfinderProxy bp(&robot,0, 'r');
>    uint8_t * img;
>    //Initializing SDL
>
>  ...
>
>    bp.SetAutoGain(0);
>    bp.SetColorMode(0);
>    bp.SetContrast(128);
>    bp.SetBrightness(128);
>
>    sleep(1);
>    bp.SetTrackingColor();
>    int done=0;
>    while(!done){
>      SDL_Event event;
>      while(SDL_PollEvent(&event))
>        if ( event.type == SDL_QUIT )  {  done = 1;  }
>
>     if(!robot.Read()) bp.Print();
>
>    }
>
>
>    return 0;
>  }
>
>
>
>  And so I got an error:
>  WARNING: tried to get 'r' access to device 6665:7:0 but got 'e' access.
>  #Blobfinder(7:0) - e
>  #Blobfinder(7:0) - e
>  #Blobfinder(7:0) - e
>  #Blobfinder(7:0) - e
>  ...
>
>
>
>  Thanks.
>  -----------------
> Lucas Martins De Marchi


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
<a href="http://ads.osdn.com/?ad_idv28&alloc_id845&op=click">http://ads.osdn.com/?ad_idv28&alloc_id845&op=click
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo