hello Brian,
thanx for mailing me. i made small change in players-1.6.5/examples/c++/vfh.cc i add SonarProxy instead of LaserProxy in line 91. after making that when i run the  ./vfh and ./player with config file  i found the following error on terminal

[root@localhost c++]# ./vfh
WARNING: tried to get 'a' access to device 6665:4:1 but got 'e' access.
Player v.1.6.5
No Access to VFH!

so please tell me the solution for that.

On 2/7/06, Brian Gerkey <brian@gerkey.org> wrote:

On Jan 31, 2006, at 8:47 PM, Mukesh Kumar wrote:

> hello friends,
> i am new user of player project. i have pioneer robot. that robot
> contains the sonar on the for sensing the obstacle. i dont have
> laser on that. i installed the player-1.6.5 project on my system. i
> want to run the vfh code of the player project on my robot. but the
> problem is that the vfh code of player-1.6.5 is compatible with
> lasers only not with sonar. but the new project of player-2.0.pre2
> conatins the vfh code with laser and sonar compatibility . i want
> to run that code after removing the laser from that. is it possible
> to run vfh code of player-2.0.pre with player-1.6.5 if yes than
> how. please solve my problem. please send me the possible solution
> in mail.
> thanking you
> mukesh

You cannot just take the vfh driver from 2.0 and use it in 1.6.5 (the
Driver API has changed).  It would definitely be possible to add
sonar support to vfh in 1.6.5, using the code in 2.0 as a model.   It
would go something like this:

- in VFH_Class::VFH_Class(), add a check for a "requires"
PLAYER_SONAR_CODE device, as is currently done for a
PLAYER_LASER_CODE device.  Ideally, they be optional; throw an error
only if neither is given.  Add a flag to the class to remember which
one is being used (sonar or laser)

- Write VFH_Class::SetupSonar(), which would subscribe to the sonar
device and retrieve it's geometry; call this from VFH_Class::Setup()

- Write VFH_Class::ShutdownSonar(), which would unsubscribe from the
sonar device; call this from VFH_Class::Shutdown()

- Write VFH_Class::GetSonar(), which checks for new sonar data; call
this from VFH_Class::Main(), in place of GetLaser().

- Make the sonar readings look like laser readings; you can use the
2.0 vfh code as a model (but feel free to come up with a better way!)


This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
Playerstage-developers mailing list

Mukesh Kumar
Hi-Tech Robotic Systemz Ltd.
Tower-b, Millenium Plaza,
Shushant Lok-1,Sector-27,
+91(124)2806080-86 ext 111, Fax-+91(124)2806089,