Hello Community,
I'm facing a strange problem. I'm simulating two robots, one leader robot leads(using vfh) the follower robot to a point which is entered by the user.
When the follower gets lost, he sends his position to the leader using OpaqueProxy and the leader goes to find him and afterwards they continue to the original destination.
So, I run each program in a different terminal window. The programs just work fine but I get some strange messages where it says that he accepts and closes a third clients connection all the time. This is a big problem for me because it hinders the program to work well if I throw them in different computers that are in the same network, because it closes the connection when the follower gets lost and tries to send a message using opaque.
The error is
"playerc error   : connect call on [localhost:6665] failed with error [111:Connection refused]
PlayerClient::Connect()(-1) : connect call on [localhost:6665] failed with error [111:Connection refused]
"
This error only occurs if I run the programs in different computers and by giving the others IP as host parameter (for instace $ ./leader -h 192.167.1.50).
I'm using ubuntu 9.04, stage 2.1.1 and player 2.1.3.
When I execute the followers program:
    ...
    listening on 6665
    Listening on ports: 6665
    accepted TCP client 0 on port 6665, fd 11
    warn: Stage ignores motor power state (1) (p_position.cc ProcessMessage)
when I execute then the leaders program in another window(and it doesn't start until you type the destination):
    accepted TCP client 1 on port 6665, fd 12
    warning : empty queue after waiting!
    warn: Stage ignores motor power state (1) (p_position.cc ProcessMessage)
now when I enter the destination:
    warning : other error on client 2
    closing TCP connection to client 2 on port 6665
when it reaches the destination it waits until a new destination is entered:
    accepted TCP client 2 on port 6665, fd 13
now when the follower gets lost and sends the messages via opaque:
    accepted TCP client 2 on port 6665, fd 13
    closing TCP connection to client 2 on port 6665
    accepted TCP client 2 on port 6665, fd 13
    closing TCP connection to client 2 on port 6665
    accepted TCP client 2 on port 6665, fd 13
    ...(all the time)
who or what is client number two?
Has it samething to do with Opaque? This is my configuration file, maybe I missed something with the ports.
Thank you,

Oier Mees

# load the Stage plugin simulation driver
driver
(       
  name "stage"
  provides ["simulation:0"]
  plugin "libstageplugin"

  # load the named file into the simulator
  worldfile "mundua.world"
)

# Instantiate the example driver, which supports the position interface

driver
(
   name "relay"
   provides [ "opaque:0" ]
)
 
##leader_robot

# Create a Stage driver and attach position2d and laser interfaces to the model "robot_gidaria"

driver
(
  name "stage"
  provides ["position2d:1" "laser:0"]
  model "leader_robot"
  alwayson 1
)
# The VFH driver attempts to drive to commanded positions without bumping into obstacles.

driver
(
  name "vfh"
  requires ["position2d:1" "laser:0"]
  provides ["position2d:0"]
  safety_dist_0ms 0.10
  safety_dist_1ms 0.35  
  distance_epsilon 0.0001
  angle_epsilon 5
)
##follower_robot

# Create a Stage driver and attach position2d and blobfinder interfaces to the model "robot_jarraitzailea"

driver
(
  name "stage"
  provides ["position2d:2" "blobfinder:0"]
  model "follower_robot"
  alwayson 1
)