[PlayerClient]: Error reading header: java.io.EOFException

View: New views
3 Messages — Rating Filter:   Alert me  

[PlayerClient]: Error reading header: java.io.EOFException

by maniabee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I am a newbie...so maybe my problem is very cliche. I have been using Player 2.0.3/Gazebo 0.7.0 (and sometimes Stage 2.0.3) I tried the example the SpaceWandererExample as it is, once with Stage ...and once with Gazebo. With Stage it works fine, but with Gazebo it outputs

SpaceWandererExample: > Error connecting to Player:
    [ javaclient2.PlayerException: [PlayerClient]: Error reading header: java.io.EOFException ]

after that, I added the following in the catch loop, which showed that posi and soni device is null, they're never created

if (robot == null){System.err.println("Server null");}
if (posi == null){ System.err.println("posi null");}
if (soni == null){System.err.println("soni null");}

My cfg is

driver
(
name "gazebo"
provides ["simulation:0"]
plugin "libgazeboplugin"
server_id "default"
)
driver
(
name "gazebo"
provides ["position2d:0" "sonar:0"]
gz_id "robot1"
)

and my world includes

<model:Pioneer2DX>
        <id>robot1</id>
        <xyz>0 0 0.200</xyz>
        <model:SickLMS200>
                <id>laser1</id>
                <xyz>0.0 0.0 0.00</xyz>
        </model:SickLMS200>
</model:Pioneer2DX>

The procedure I follow is
a)gazebo *.world
b)player *.cfg
c)java -classpath . SpaceWandererExample (from within the Javaclient/class)

each run...outputs the following
a)** Gazebo 0.7.0    etc...**
using display [:0.0]
rendering: [GLX offscreen] direct [no] RGBA [8 8 8 8] depth [24]
server id [0]
b)* 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/mania/thesis/examples/hopeworks/./libgazeboplugin...
trying to load /usr/local/lib/libgazeboplugin...
success
invoking player_driver_init()...

 ** Gazebo plugin v0.7.0 etc**
success
  Gazebo Plugin driver creating 1 device
    6665.31.0 is  a simulation interface.
gz_client.c:122 opening /tmp/gazebo-root-0
gz_iface.c:214 opening /tmp/gazebo-root-0/sim.default 060 180
  Gazebo Plugin driver creating 2 devices
    6665.4.0 is  a position2d interface.
    6665.5.0 is  a sonar interface.
Listening on ports: 6665

c)Player v.2.0.3
selected devices [localhost:6665]:
 6665:simulation:0 (gazebo)
 6665:position2d:0 (gazebo)
 6665:sonar:0 (gazebo)
posi null (-- this is because of the added system.err.print...)
soni null  (--and this too...)
SpaceWandererExample: > Error connecting to Player:
    [ javaclient2.PlayerException: [PlayerClient]: Error reading header: java.io.EOFException ]

I am wondering..devices are created correctly when using Stage and not when using Gazebo...since the code is the same..is something wrong with my world and cfg files or there is incompatibility between gazebo 0.7? I saw that examples were tested with Gazebo 0.6... What is more, I haven't found a complete example with Javaclient2 using Gazebo, please if there is sth could anybody let me know?

Thank u in advance,
Manya

Re: [PlayerClient]: Error reading header: java.io.EOFException

by maniabee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What I forgot to put..is the reply of Player..when running the java program..

accepted client 0 on port 6665, fd 6
gz_iface.c:214 opening /tmp/gazebo-root-0/position.robot1 060 304
Segmentation fault (core dumped)



maniabee wrote:
Hello,

I am a newbie...so maybe my problem is very cliche. I have been using Player 2.0.3/Gazebo 0.7.0 (and sometimes Stage 2.0.3) I tried the example the SpaceWandererExample as it is, once with Stage ...and once with Gazebo. With Stage it works fine, but with Gazebo it outputs

SpaceWandererExample: > Error connecting to Player:
    [ javaclient2.PlayerException: [PlayerClient]: Error reading header: java.io.EOFException ]

after that, I added the following in the catch loop, which showed that posi and soni device is null, they're never created

if (robot == null){System.err.println("Server null");}
if (posi == null){ System.err.println("posi null");}
if (soni == null){System.err.println("soni null");}

My cfg is

driver
(
name "gazebo"
provides ["simulation:0"]
plugin "libgazeboplugin"
server_id "default"
)
driver
(
name "gazebo"
provides ["position2d:0" "sonar:0"]
gz_id "robot1"
)

and my world includes

<model:Pioneer2DX>
        <id>robot1</id>
        <xyz>0 0 0.200</xyz>
        <model:SickLMS200>
                <id>laser1</id>
                <xyz>0.0 0.0 0.00</xyz>
        </model:SickLMS200>
</model:Pioneer2DX>

The procedure I follow is
a)gazebo *.world
b)player *.cfg
c)java -classpath . SpaceWandererExample (from within the Javaclient/class)

each run...outputs the following
a)** Gazebo 0.7.0    etc...**
using display [:0.0]
rendering: [GLX offscreen] direct [no] RGBA [8 8 8 8] depth [24]
server id [0]
b)* 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/mania/thesis/examples/hopeworks/./libgazeboplugin...
trying to load /usr/local/lib/libgazeboplugin...
success
invoking player_driver_init()...

 ** Gazebo plugin v0.7.0 etc**
success
  Gazebo Plugin driver creating 1 device
    6665.31.0 is  a simulation interface.
gz_client.c:122 opening /tmp/gazebo-root-0
gz_iface.c:214 opening /tmp/gazebo-root-0/sim.default 060 180
  Gazebo Plugin driver creating 2 devices
    6665.4.0 is  a position2d interface.
    6665.5.0 is  a sonar interface.
Listening on ports: 6665

c)Player v.2.0.3
selected devices [localhost:6665]:
 6665:simulation:0 (gazebo)
 6665:position2d:0 (gazebo)
 6665:sonar:0 (gazebo)
posi null (-- this is because of the added system.err.print...)
soni null  (--and this too...)
SpaceWandererExample: > Error connecting to Player:
    [ javaclient2.PlayerException: [PlayerClient]: Error reading header: java.io.EOFException ]

I am wondering..devices are created correctly when using Stage and not when using Gazebo...since the code is the same..is something wrong with my world and cfg files or there is incompatibility between gazebo 0.7? I saw that examples were tested with Gazebo 0.6... What is more, I haven't found a complete example with Javaclient2 using Gazebo, please if there is sth could anybody let me know?

Thank u in advance,
Manya

Re: [PlayerClient]: Error reading header: java.io.EOFException

by maniabee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok, I fixed that when I figured out that I needed a different  "driver block" in the cfg file for sonar... it shouldn't be in the same block with position2d.

Next problem was that position3d interface, which substitutes now the position2d in my experiment, gave me problems using setSpeed function in my code. What I did then is changing the constant in the code of setVelocity function in Position3DInterface.java to PLAYER_POSITION3D_CMD_SET_VEL (in place of the 2nd constant in sendHeader call), so that the 1st line of try block ,it looks like that...

sendHeader (PLAYER_MSGTYPE_CMD, PLAYER_POSITION3D_CMD_SET_VEL, 24+4);

This is the way I got setSpeed working...

Now, I try to request Laser Interface but it seems to give me errors as well. Actually, I get an
"error reading header" because of the laser request... Has anybody had the same problem? Should it be a matter of my cfg file again? I post it

driver
(
name "gazebo"
provides ["simulation:0"]
plugin "libgazeboplugin"
server_id "default"
)

driver
(
name "gazebo"
provides ["position3d:0"]
gz_id "robot1"
)

driver
(
name "gazebo"
provides ["sonar:0"]
gz_id "sonar1"
)


driver
(
name "gazebo"
provides ["laser:0"]
gz_id "laser1"
)







What I forgot to put..is the reply of Player..when running the java program..

accepted client 0 on port 6665, fd 6
gz_iface.c:214 opening /tmp/gazebo-root-0/position.robot1 060 304
Segmentation fault (core dumped)



maniabee wrote:
Hello,

I am a newbie...so maybe my problem is very cliche. I have been using Player 2.0.3/Gazebo 0.7.0 (and sometimes Stage 2.0.3) I tried the example the SpaceWandererExample as it is, once with Stage ...and once with Gazebo. With Stage it works fine, but with Gazebo it outputs

SpaceWandererExample: > Error connecting to Player:
    [ javaclient2.PlayerException: [PlayerClient]: Error reading header: java.io.EOFException ]

after that, I added the following in the catch loop, which showed that posi and soni device is null, they're never created

if (robot == null){System.err.println("Server null");}
if (posi == null){ System.err.println("posi null");}
if (soni == null){System.err.println("soni null");}

My cfg is

driver
(
name "gazebo"
provides ["simulation:0"]
plugin "libgazeboplugin"
server_id "default"
)
driver
(
name "gazebo"
provides ["position2d:0" "sonar:0"]
gz_id "robot1"
)

and my world includes

<model:Pioneer2DX>
        <id>robot1</id>
        <xyz>0 0 0.200</xyz>
        <model:SickLMS200>
                <id>laser1</id>
                <xyz>0.0 0.0 0.00</xyz>
        </model:SickLMS200>
</model:Pioneer2DX>

The procedure I follow is
a)gazebo *.world
b)player *.cfg
c)java -classpath . SpaceWandererExample (from within the Javaclient/class)

each run...outputs the following
a)** Gazebo 0.7.0    etc...**
using display [:0.0]
rendering: [GLX offscreen] direct [no] RGBA [8 8 8 8] depth [24]
server id [0]
b)* 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/mania/thesis/examples/hopeworks/./libgazeboplugin...
trying to load /usr/local/lib/libgazeboplugin...
success
invoking player_driver_init()...

 ** Gazebo plugin v0.7.0 etc**
success
  Gazebo Plugin driver creating 1 device
    6665.31.0 is  a simulation interface.
gz_client.c:122 opening /tmp/gazebo-root-0
gz_iface.c:214 opening /tmp/gazebo-root-0/sim.default 060 180
  Gazebo Plugin driver creating 2 devices
    6665.4.0 is  a position2d interface.
    6665.5.0 is  a sonar interface.
Listening on ports: 6665

c)Player v.2.0.3
selected devices [localhost:6665]:
 6665:simulation:0 (gazebo)
 6665:position2d:0 (gazebo)
 6665:sonar:0 (gazebo)
posi null (-- this is because of the added system.err.print...)
soni null  (--and this too...)
SpaceWandererExample: > Error connecting to Player:
    [ javaclient2.PlayerException: [PlayerClient]: Error reading header: java.io.EOFException ]

I am wondering..devices are created correctly when using Stage and not when using Gazebo...since the code is the same..is something wrong with my world and cfg files or there is incompatibility between gazebo 0.7? I saw that examples were tested with Gazebo 0.6... What is more, I haven't found a complete example with Javaclient2 using Gazebo, please if there is sth could anybody let me know?

Thank u in advance,
Manya