It might be that "model_name" should be "laser_name" for the laser driver:

driver
(
  name "gazebo"
  provides ["laser:0"]
  laser_name "hokuyo::link::laser"
)

-nate


On Thu, Jan 31, 2013 at 2:56 AM, Dominic Roberts <dcr9@aber.ac.uk> wrote:

Thanks Nate, Rich,

As you suggested, I commented out the code in LaserInterface so that it
just publishes a blank message (commenting out the whole matchmessage
statement resulted in a player error). This solved the first problem
perfectly.

However, changing the "model_name" (or switching it out for "gz_id") to
"hokuyo::link::laser" still results in a warning about field model_name
being defined but not used. Just for testing I tried switching it out with
"pioneer2dx" and didn't get a warning, so I suppose that I just have the
name wrong. Any ideas?

If it helps, my ultimate aim is to have a pioneer2dx model with a laser on
it (essentially something that has laser and moves) but I am happy to
settle with just a stationary laser for the moment.

Dominic

> Hello,
>
> I believe your player config file has one error.
>
> The part:
> driver
> (
>  name "gazebo"
>  provides ["laser:0"]
>  model_name "hokuyo"
> )
>
> Should be:
> driver
> (
>  name "gazebo"
>  provides ["laser:0"]
>  model_name "hokuyo::link::laser"
> )
>
> I changed model_name to point to the <sensor> within the hokuyo. This is
> necessary because a model may have many lasers.
>
> -nate
>
>
> On Tue, Jan 29, 2013 at 11:11 AM, Dominic Roberts <dcr9@aber.ac.uk> wrote:
>
>>
>> Hello,
>>
>> I'm using Gazebo 1.2 and Player 3.1. I'm trying to get a laser reading
>> from player/gazebo but they really don't like me enough to do what I
>> want.
>>
>> Gazebo starts fine, outputting no errors or warnings (world file at end
>> of
>> post). The GUI starts up and shows me the hokuyo sitting in a blank
>> world
>> with the blue laser scan coming out. I then start up Player (config file
>> at end of post):
>>
>> Output from Player:
>>
>> [snip]
>> success
>> GazeboDriver::GazeboDriver
>>   Gazebo Plugin driver creating 1 device
>>     6665.31.0 is  a simulation interface.
>> Msg Waiting for master
>> Msg Connected to gazebo master @ http://localhost:11345
>> GazeboDriver::GazeboDriver
>>   Gazebo Plugin driver creating 1 device
>>     6665.6.0 is  a laser interface.
>> test.cfg:15 warning: field [model_name] is defined but not used
>> Listening on ports: 6665
>>
>> I have a very simple player client, as follows:
>>
>> [snip]
>>   PlayerCc::PlayerClient        robot("localhost");
>>   PlayerCc::LaserProxy          laser(&robot,0);
>>   for(;;) {
>>
>>     laser.RequestConfigure();   // failing here!
>>     laser.RequestGeom();
>>
>>     // read from the proxies
>>     printf("before read\n");
>>     robot.Read();
>>     printf("after read\n");
>>
>>     // print out laser
>>     printf("laser:\n");
>>     std::cout << laser << std::endl;
>>   }
>>
>> This compiles fine but when I run the client program I get the following
>> output:
>>
>> playerc error   : timed out waiting for server reply to request
>> laser:0:request:3
>>
>> This seems to be failing on the requestconfigure() function. I assume
>> that
>> this is linked to player's warning about the field name "model_name" not
>> being used?
>>
>> My config file for player is as follows:
>>
>> driver
>> (
>>   name "gazebo"
>>   provides ["simulation:0"]
>>   plugin "libgazebo_player"
>>   world_name "default"
>> )
>>
>> driver
>> (
>>  name "gazebo"
>>  provides ["laser:0"]
>>  model_name "hokuyo"
>> )
>>
>> My world file for gazebo is as follows:
>>
>> <?xml version="1.0" ?>
>> <gazebo version="1.2">
>>   <world name="default">
>>     <!-- Ground -->
>>     <include>
>>       <uri>model://ground_plane</uri>
>>     </include>
>>
>>     <include>
>>       <uri>model://hokuyo</uri>
>>     </include>
>>
>>     <!-- A global light source -->
>>     <include>
>>       <uri>model://sun</uri>
>>     </include>
>>
>>   </world>
>> </gazebo>
>>
>> I'd really appreciate some help with this, this is for my dissertation
>> and
>> it's driving me completely nuts.
>>
>> Thanks,
>> Dominic
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
>> MVPs and experts. ON SALE this month only -- learn more at:
>> http://p.sf.net/sfu/learnnow-d2d
>> _______________________________________________
>> Playerstage-users mailing list
>> Playerstage-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/playerstage-users
>>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_jan_______________________________________________