hi

I solved the problem by replacing localhost with 127.0.0.1 in the playerc_client_create parameters. None the less, it is extremely surprising that putting localhost doesn't work.
Both the options were given in quotes, just the way they should have been given.

Cheers
Vaibhav

On Jan 17, 2008 1:00 PM, Vaibhav Ghadiok < vaibhavghadiok@gmail.com> wrote:
hi everybody

I am facing a peculiar problem.  When I run the client file while running gazebo nothing happens. I am running Gazebo 0.7. The same program used to work perfectly and I just tried running it after a week or so. This s happening with every program.

If I click on the usercam screen, it finally gives a message stating:


[vaibhav@localhost Helicopter]$ ./uav5 6665 1
-5-101playerc error   : gethostbyname failed with error [Success]
error: gethostbyname failed with error [Success]

6665 is the port that I am passing. -5101 is being printed by me for debugging purposes. These nos. only get printed when I move something in the usercam screen.

So, basically it stops executing at:
It does print the 1 as can be seen above.
printf("1");
if (playerc_client_connect(client) != 0)
{
    fprintf(stderr, "error: %s\n", playerc_error_str());
    return -1;
}


Player is definitely listening on Port 6665.


[vaibhav@localhost Helicopter]$ player uav.cfg

* Part of the Player/Stage/Gazebo Project [http://playerstage.sourceforge.net ].
* Copyright (C) 2000 - 2006 Brian Gerkey, Richard Vaughan, Andrew Howard,
* Nate Koenig, and contributors. Released under the GNU General Public License.
* Player comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
* are welcome to redistribute it under certain conditions; see COPYING
* for details.

trying to load /home/vaibhav/Desktop/Helicopter/./libgazeboplugin...
trying to load /usr/local/lib/libgazeboplugin...
success
invoking player_driver_init()...

 ** Gazebo plugin v0.7.0 **
 * Part of the Player/Stage Project [http://playerstage.sourceforge.net]
 * Copyright 2000-2006 Richard Vaughan, Andrew Howard, Brian Gerkey, Nathan Koenig
 * and contributors. Released under the GNU General Public License v2.
success
  Gazebo Plugin driver creating 1 device
    6665.31.0 is  a simulation interface.
gz_client.c:122 opening /tmp/gazebo-vaibhav-0
gz_iface.c:214 opening /tmp/gazebo-vaibhav-0/sim.default 060 180
  Gazebo Plugin driver creating 1 device
    6665.30.0 is  a position3d interface.
  Gazebo Plugin driver creating 1 device
    6665.30.1 is  a position3d interface.
  Gazebo Plugin driver creating 1 device
    6665.30.2 is  a position3d interface.
  Gazebo Plugin driver creating 1 device
    6665.30.3 is  a position3d interface.
  Gazebo Plugin driver creating 1 device
    6665.30.4 is  a position3d interface.
Listening on ports: 6665

Cheers
Vaibhav

P.S. I am mailing it on both the lists as I am uncertain wherein the problem lies. I couldn't find it in the mailing list archives.



--
Mobile Robotics Laboratory
Guidance, Control and Decision Systems Laboratory
Aerospace Department
Indian Institute of Science, Bangalore

http://guidance.aero.iisc.ernet.in/vaibhav