Hello all.

Ok I got a workaround for the debugger problem (really strange thing though, something get's randomly messed up in my user config for the IDE...).

So I started from scratch trying to adapt my program to the new ranger interface.

First thing I tried to obtain is the geometry, so I subscribed and then fetched config and geom.

But then when inspecting the device (I called it sonar) I don't have data about the number of effectively present transducers.

Sonar's childs ranges,ranges_count,intensities, bearings,points are all 0.

Element_poses as well as element_sizes are filled but with one series of values each.

There is no number telling me how many transucers I have, and there is (apparently) no way to iterate through the various sub-elements.

Moreover _set_config, _intns_config, _power_config all fail receiving NACK from player.

In the player console I see


accepted TCP client 0 on port 6665, fd 12
stage driver setup
warn: stageplugin ranger config describes only the first sensor of the ranger. (/home/erupter/Downloads/stage_install/Stage/libstageplugin/p_ranger.cc ProcessMessage)
warn: stage ranger doesn't support message 3:3. (/home/erupter/Downloads/stage_install/Stage/libstageplugin/p_ranger.cc ProcessMessage)
warning : Unhandled message for driver device=16777343:6665:ranger:0 type=request subtype=3 len=1

warn: stage ranger doesn't support message 3:2. (/home/erupter/Downloads/stage_install/Stage/libstageplugin/p_ranger.cc ProcessMessage)
warning : Unhandled message for driver device=16777343:6665:ranger:0 type=request subtype=2 len=1

warn: stage ranger doesn't support message 3:4. (/home/erupter/Downloads/stage_install/Stage/libstageplugin/p_ranger.cc ProcessMessage)
warning : Unhandled message for driver device=16777343:6665:ranger:0 type=request subtype=4 len=56

warn: stageplugin ranger config describes only the first sensor of the ranger. (/home/erupter/Downloads/stage_install/Stage/libstageplugin/p_ranger.cc ProcessMessage)
Stage driver has been shutdown
closing TCP connection to client 0 on port 6665



The world used is the default simple world, no messing up with it.

So simple.world calls the fancypioneer2dx, which calls the base, which calls the p2dx_sonar definition with all 16 transducers accounted for.


So I'm surely missing something here, any hint to what it is?


Regards

Claudio




----Messaggio originale----
Da: jpgr87@gmail.com
Data: 17/05/2012 6.19
A: <playerstage-users@lists.sourceforge.net>
Ogg: Re: [Playerstage-users] Back to playerstage after a few years and the old program doesn't work anymore.

On 05/15/2012 06:15 AM, Claudio Carbone wrote:

Hello fellow users.

I'm back to player and stage after a few years of hiatus.

My last work has been a Dempster-Shafer based hexagonal mapping algorithm.

Didn't work that good as DS tends to saturate as everyone knows but anyway...

I had my nice program reading data from player and stage through the sonar interface.

Was using the simple world having removed the laser to better see the sonars I was plotting.

 

Now I installed the latest player trunk and latest stage trunk (3.1.0-svn and 4.1.1) and my old program doesn't want to work.

When I launch it, it can't find the sonar interface.

Player reports a request for an unknown interface

 

warning : skipping subscription to unknown device sonar:0

 

Now this seems coherent with the fact that the simple.cfg has

 

driver

(

   name "stage"

   provides [ "positon2d:0" "ranger:0" "ranger:1" ]

   model "r0"

)

 

But if I change the provides with

 

provides [ "positon2d:0" "sonar:0" "ranger:0" ]

 

player quits saying

 

Stage plugin: 6665.sonar.0 is err: error: stage driver doesn't support interface type 5

 

So apparently stage doesn't support sonar anymore?

I tried reverting to stage 3.2.2, 3.2.1, and even 3.2.0 but got the same results.

If that's the case my program should not compile, at least for how I view it if an interface isn't supported anymore headers shouldn't be available.

But it compiles.

 

So what am I missing here?

My stupid program does the following

 

#include <libplayerc/playerc.h>

client = playerc_client_create(NULL, player_host, player_port);

  if (0 != playerc_client_connect(client))

    return 1;

 

// Create and subscribe to a position2d device.

position2d = playerc_position2d_create(client, 0);

  if (playerc_position2d_subscribe(position2d, PLAYER_OPEN_MODE))

    return 2;

 

sonar=playerc_sonar_create(client,0);

  if (playerc_sonar_subscribe(sonar, PLAYER_OPEN_MODE))

    return 3;

playerc_client_read(client);

playerc_sonar_get_geom(sonar);

 

Then lots of geometric calculations with the sonar data.

Any help would be greatly appreciated.

Regards

 

Claudio Carbone



Hi Claudio,

The sonar, laser, and IR interfaces are slowly being deprecated in favor of the ranger interface.  The deprecated interfaces still exist in Player, which is why your program is still compiling.  Stage removed support for the laser and sonar interfaces in version 3, and all ranging devices it simulates now use Player's ranger interface.

You can do a couple of things to update your program.  The easiest thing to do would be to replace your sonar proxy with a ranger proxy in your client code, and modify your config files to be like simple.cfg with stage providing ranger interfaces.  Ranger and sonar similar enough that it shouldn't be too much trouble to do.  You can also try to make a driver that converts a ranger interface to a sonar interface; there is a driver that converts sonar to ranger that you could base it off, but it's probably not worth the trouble.

Hope this helps!

Rich