Faking an infrared barrier

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Faking an infrared barrier

morgan hendry
Hello

I'm attempting to perform a herding simulation using shepherd robots with infrared beams (think herding a Roomba robot with its infrared door barriers).  I know I need to fake this, and the best way I can think of is to use the truth sensor to read out the position/orientation of the "transmitter", then use that information to extrapolate a "infrared beam".  Whenever the sheep robot's position is a point on that line, it turns away.
 
I can't seem to get the truth device to work however.  When I try and run a simulation with a TruthWidget on one of the robots, gazebo prints out the following:

$ wxgazebo pioneer2dxGripmod.world
starting server
waiting for server
** Gazebo 0.5.2 **
* Part of the Player/Stage Project [http://playerstage.sourceforge.net].
* Copyright 2000-2005 Brian Gerkey, Richard Vaughan, Andrew Howard,
* Nate Koenig and contributors.
* Released under the GNU General Public License.
using display [:0.0]
rendering: [GLXP pbuffer] direct [no] RGBA [8 8 8 0] depth [24]
warning : in pioneer2dxGripmod.world:18 unused attribute [texture2D]
server id [0]
connecting to server
opening simulator interface
waiting for data
stopping server

errors, warnings and messages have been appended to /home/hendry/.gazebo
Traceback (most recent call last):
  File "/usr/local/bin/wxgazebo", line 6, in ?
    main(sys.argv)
  File "/usr/local/lib/python2.4/site-packages/wxgazebo/main.py", line 241, in main
    ifaces = LoadInterfaces(client)
  File "/usr/local/lib/python2.4/site-packages/wxgazebo/main.py", line 114, in LoadInterfaces
    raise gz_error_str()
expected file size: 252 < 268

My cfg and world files are copied below.  I am running Gazebo 0.5.2 and Player 1.6.5 on Ubuntu.  Is there something I am missing?  Is there an easier way to simulate this than the method I'm attempting?

Thank you,

Morgan

------------------------------------

cfg:

# Desc: Player sample configuration file for controlling Gazebo devices
# ROBOT1
# Date: 18 Apr 2003
# CVS: $Id: gazebo.cfg,v 1.10 2005/04/15 18:08:24 gerkey Exp $

driver
(
  name "gz_sim"
  provides ["simulation:0"]
  alwayson 1
)

driver
(
  name "gz_position"
  provides ["position:0"]
  gz_id "robot1"
)

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

driver
(
  name "gz_gripper"
  provides ["gripper:0"]
  gz_id "gripper1"
)

driver
(
name "gz_truth"
provides ["truth:0"]
gz_id "truth1"
)

----------------------------------------------------

world:

<?xml version="1.0"?>
<gz:world xmlns:gz="http://playerstage.sourceforge.net/gazebo/xmlschema/#gz" xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model" xmlns:window="http://playerstage.sourceforge.net/gazebo/xmlschema/#window" xmlns:params="http://playerstage.sourceforge.net/gazebo/xmlschema/#params">

  <model:ObserverCam>
    <id>usercam1</id>
    <xyz>-0.588 -1.430 1.756</xyz>
    <rpy>0 41 46</rpy>
    <imageSize>640 480</imageSize>
  </model:ObserverCam>

  <model:LightSource>
    <id>light1</id>
    <xyz>-1.000 -1.000 10.000</xyz>
  </model:LightSource>

  <model:GroundPlane>
    <id>ground1</id>
    <texture2D>grid.ppm</texture2D>
  </model:GroundPlane>

  <model:Pioneer2DX>
    <id>robot1</id>
    <xyz>1.000 1.000 1.000</xyz>
    <rpy>-0 0 0</rpy>

  <model:TruthWidget>
      <id>truth1</id>
  </model:TruthWidget>

    <model:SickLMS200>
      <id>laser1</id>
      <xyz>0.0 0 0</xyz>
    </model:SickLMS200>
   
    <model:Pioneer2Gripper>
      <id>gripper1</id>
      <xyz>0.14003 0 -0.0975</xyz>
    </model:Pioneer2Gripper>

  </model:Pioneer2DX>

 <model:Pioneer2DX>
    <id>robot2</id>
    <xyz>2.000 1.500 1.000</xyz>
    <rpy>-0 0 0</rpy>

  <model:TruthWidget>
      <id>truth2</id>
  </model:TruthWidget>

    <model:SickLMS200>
      <id>laser2</id>
      <xyz>0.0 0 0</xyz>
    </model:SickLMS200>
   
    <model:Pioneer2Gripper>
      <id>gripper2</id>
      <xyz>0.14003 0 -0.0975</xyz>
    </model:Pioneer2Gripper>
 
  </model:Pioneer2DX>

<model:Pioneer2DX>
    <id>robot3</id>
    <xyz>1.500 3.000 1.000</xyz>
    <rpy>-0 0 0</rpy>

  <model:TruthWidget>
      <id>truth3</id>
  </model:TruthWidget>

    <model:SickLMS200>
      <id>laser3</id>
      <xyz>0.0 0 0</xyz>
    </model:SickLMS200>
   
    <model:Pioneer2Gripper>
      <id>gripper3</id>
      <xyz>0.14003 0 -0.0975</xyz>
    </model:Pioneer2Gripper>
 
  </model:Pioneer2DX>

  <model:SimpleSolid>
      <xyz>3.000 -0.250 -0.000</xyz>
      <shape>box</shape>
      <size>6.00 0.5 0.5</size>
      <color>1 1 0</color>
      <mass>100.0</mass>
      <rpy>0 0 0</rpy>
  </model:SimpleSolid>
 
  <model:SimpleSolid>
      <xyz>3.000 4.250 -0.000</xyz>
      <shape>box</shape>
      <size>6.00 0.5 0.5</size>
      <color>1 1 0</color>
      <mass>100.0</mass>
      <rpy>0 0 0</rpy>
  </model:SimpleSolid>

  <model:SimpleSolid>
      <xyz>-.2500 2.000 -0.000</xyz>
      <shape>box</shape>
      <size>0.50 4.00 0.5</size>
      <color>1 0 0</color>
      <mass>100.0</mass>
      <rpy>0 0 0</rpy>
  </model:SimpleSolid>

  <model:SimpleSolid>
      <xyz>6.2500 2.000 -0.000</xyz>
      <shape>box</shape>
      <size>0.50 4.00 0.5</size>
      <color>1 0 0</color>
      <mass>100.0</mass>
      <rpy>0 0 0</rpy>
  </model:SimpleSolid>

</gz:world>

----------------------------------------------------


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
Reply | Threaded
Open this post in threaded view
|

Re: Faking an infrared barrier

Nicola Bellotto
Hi,

I'm having the same problem of Morgan, that is Gazebo crashes when I try to
put a TruthWidget in my world file (below is the error msg). The funny thing
is that it happens only with "wxgazebo" but not with "gazebo"...
Any news about that?

Cheers

Nicola


[belush@csres106 ~]$ wxgazebo
~/projects/hello/gazebo_worlds/office_1_person.world
starting server
waiting for server
connecting to server
opening simulator interface
waiting for data
stopping server
Traceback (most recent call last):
  File "/usr/local/bin/wxgazebo", line 6, in ?
    main(sys.argv)
  File "/usr/local/lib/python2.3/site-packages/wxgazebo/main.py", line 241, in
main
    ifaces = LoadInterfaces(client)
  File "/usr/local/lib/python2.3/site-packages/wxgazebo/main.py", line 114, in
LoadInterfaces
    raise gz_error_str()
expected file size: 252 < 268


On Monday 14 Nov 2005 04:30, morgan hendry wrote:

> Hello
>
> I'm attempting to perform a herding simulation using shepherd robots with
> infrared beams (think herding a Roomba robot with its infrared door
> barriers).  I know I need to fake this, and the best way I can think of is
> to use the truth sensor to read out the position/orientation of the
> "transmitter", then use that information to extrapolate a "infrared beam".
> Whenever the sheep robot's position is a point on that line, it turns away.
>
> I can't seem to get the truth device to work however.  When I try and run a
> simulation with a TruthWidget on one of the robots, gazebo prints out the
> following:
>
> $ wxgazebo pioneer2dxGripmod.world
> starting server
> waiting for server
> ** Gazebo 0.5.2 **
> * Part of the Player/Stage Project [http://playerstage.sourceforge.net].
> * Copyright 2000-2005 Brian Gerkey, Richard Vaughan, Andrew Howard,
> * Nate Koenig and contributors.
> * Released under the GNU General Public License.
> using display [:0.0]
> rendering: [GLXP pbuffer] direct [no] RGBA [8 8 8 0] depth [24]
> warning : in pioneer2dxGripmod.world:18 unused attribute [texture2D]
> server id [0]
> connecting to server
> opening simulator interface
> waiting for data
> stopping server
>
> errors, warnings and messages have been appended to /home/hendry/.gazebo
> Traceback (most recent call last):
>   File "/usr/local/bin/wxgazebo", line 6, in ?
>     main(sys.argv)
>   File "/usr/local/lib/python2.4/site-packages/wxgazebo/main.py", line 241,
> in main ifaces = LoadInterfaces(client)
>   File "/usr/local/lib/python2.4/site-packages/wxgazebo/main.py", line 114,
> in LoadInterfaces raise gz_error_str()
> expected file size: 252 < 268
>
> My cfg and world files are copied below.  I am running Gazebo 0.5.2 and
> Player 1.6.5 on Ubuntu.  Is there something I am missing?  Is there an
> easier way to simulate this than the method I'm attempting?
>
> Thank you,
>
> Morgan

--
------------------------------------------
Nicola Bellotto
University of Essex
Department of Computer Science
Wivenhoe Park
Colchester CO4 3SQ
United Kingdom

Room: 1N1.2.8
Tel. +44 (0)1206 874094
E-Mail: [hidden email]
URL: http://privatewww.essex.ac.uk/~nbello
------------------------------------------


-------------------------------------------------------
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!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
Reply | Threaded
Open this post in threaded view
|

Re: Faking an infrared barrier

Nate Koenig
Hello,

Check to make sure you have only one version of Gazebo installed.

-nate

On 12/8/05, Nicola Bellotto <[hidden email]> wrote:

> Hi,
>
> I'm having the same problem of Morgan, that is Gazebo crashes when I try to
> put a TruthWidget in my world file (below is the error msg). The funny thing
> is that it happens only with "wxgazebo" but not with "gazebo"...
> Any news about that?
>
> Cheers
>
> Nicola
>
>
> [belush@csres106 ~]$ wxgazebo
> ~/projects/hello/gazebo_worlds/office_1_person.world
> starting server
> waiting for server
> connecting to server
> opening simulator interface
> waiting for data
> stopping server
> Traceback (most recent call last):
>   File "/usr/local/bin/wxgazebo", line 6, in ?
>     main(sys.argv)
>   File "/usr/local/lib/python2.3/site-packages/wxgazebo/main.py", line 241, in
> main
>     ifaces = LoadInterfaces(client)
>   File "/usr/local/lib/python2.3/site-packages/wxgazebo/main.py", line 114, in
> LoadInterfaces
>     raise gz_error_str()
> expected file size: 252 < 268
>
>
> On Monday 14 Nov 2005 04:30, morgan hendry wrote:
> > Hello
> >
> > I'm attempting to perform a herding simulation using shepherd robots with
> > infrared beams (think herding a Roomba robot with its infrared door
> > barriers).  I know I need to fake this, and the best way I can think of is
> > to use the truth sensor to read out the position/orientation of the
> > "transmitter", then use that information to extrapolate a "infrared beam".
> > Whenever the sheep robot's position is a point on that line, it turns away.
> >
> > I can't seem to get the truth device to work however.  When I try and run a
> > simulation with a TruthWidget on one of the robots, gazebo prints out the
> > following:
> >
> > $ wxgazebo pioneer2dxGripmod.world
> > starting server
> > waiting for server
> > ** Gazebo 0.5.2 **
> > * Part of the Player/Stage Project [http://playerstage.sourceforge.net].
> > * Copyright 2000-2005 Brian Gerkey, Richard Vaughan, Andrew Howard,
> > * Nate Koenig and contributors.
> > * Released under the GNU General Public License.
> > using display [:0.0]
> > rendering: [GLXP pbuffer] direct [no] RGBA [8 8 8 0] depth [24]
> > warning : in pioneer2dxGripmod.world:18 unused attribute [texture2D]
> > server id [0]
> > connecting to server
> > opening simulator interface
> > waiting for data
> > stopping server
> >
> > errors, warnings and messages have been appended to /home/hendry/.gazebo
> > Traceback (most recent call last):
> >   File "/usr/local/bin/wxgazebo", line 6, in ?
> >     main(sys.argv)
> >   File "/usr/local/lib/python2.4/site-packages/wxgazebo/main.py", line 241,
> > in main ifaces = LoadInterfaces(client)
> >   File "/usr/local/lib/python2.4/site-packages/wxgazebo/main.py", line 114,
> > in LoadInterfaces raise gz_error_str()
> > expected file size: 252 < 268
> >
> > My cfg and world files are copied below.  I am running Gazebo 0.5.2 and
> > Player 1.6.5 on Ubuntu.  Is there something I am missing?  Is there an
> > easier way to simulate this than the method I'm attempting?
> >
> > Thank you,
> >
> > Morgan
>
> --
> ------------------------------------------
> Nicola Bellotto
> University of Essex
> Department of Computer Science
> Wivenhoe Park
> Colchester CO4 3SQ
> United Kingdom
>
> Room: 1N1.2.8
> Tel. +44 (0)1206 874094
> E-Mail: [hidden email]
> URL: http://privatewww.essex.ac.uk/~nbello
> ------------------------------------------
>
>
> -------------------------------------------------------
> 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!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Playerstage-gazebo mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
>


-------------------------------------------------------
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!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
Reply | Threaded
Open this post in threaded view
|

Re: Faking an infrared barrier

Nicola Bellotto
On Friday 09 Dec 2005 15:43, Nate Koenig wrote:
> Check to make sure you have only one version of Gazebo installed.

Indeed I cleaned all the Python stuff, reinstalled Gazebo and now it works.
Thanks
Nicola

>
> -nate
>
> On 12/8/05, Nicola Bellotto <[hidden email]> wrote:
> > Hi,
> >
> > I'm having the same problem of Morgan, that is Gazebo crashes when I try
> > to put a TruthWidget in my world file (below is the error msg). The funny
> > thing is that it happens only with "wxgazebo" but not with "gazebo"...
> > Any news about that?
> >
> > Cheers
> >
> > Nicola
> >
> >
> > [belush@csres106 ~]$ wxgazebo
> > ~/projects/hello/gazebo_worlds/office_1_person.world
> > starting server
> > waiting for server
> > connecting to server
> > opening simulator interface
> > waiting for data
> > stopping server
> > Traceback (most recent call last):
> >   File "/usr/local/bin/wxgazebo", line 6, in ?
> >     main(sys.argv)
> >   File "/usr/local/lib/python2.3/site-packages/wxgazebo/main.py", line
> > 241, in main
> >     ifaces = LoadInterfaces(client)
> >   File "/usr/local/lib/python2.3/site-packages/wxgazebo/main.py", line
> > 114, in LoadInterfaces
> >     raise gz_error_str()
> > expected file size: 252 < 268
> >
> > On Monday 14 Nov 2005 04:30, morgan hendry wrote:
> > > Hello
> > >
> > > I'm attempting to perform a herding simulation using shepherd robots
> > > with infrared beams (think herding a Roomba robot with its infrared
> > > door barriers).  I know I need to fake this, and the best way I can
> > > think of is to use the truth sensor to read out the
> > > position/orientation of the "transmitter", then use that information to
> > > extrapolate a "infrared beam". Whenever the sheep robot's position is a
> > > point on that line, it turns away.
> > >
> > > I can't seem to get the truth device to work however.  When I try and
> > > run a simulation with a TruthWidget on one of the robots, gazebo prints
> > > out the following:
> > >
> > > $ wxgazebo pioneer2dxGripmod.world
> > > starting server
> > > waiting for server
> > > ** Gazebo 0.5.2 **
> > > * Part of the Player/Stage Project
> > > [http://playerstage.sourceforge.net]. * Copyright 2000-2005 Brian
> > > Gerkey, Richard Vaughan, Andrew Howard, * Nate Koenig and contributors.
> > > * Released under the GNU General Public License.
> > > using display [:0.0]
> > > rendering: [GLXP pbuffer] direct [no] RGBA [8 8 8 0] depth [24]
> > > warning : in pioneer2dxGripmod.world:18 unused attribute [texture2D]
> > > server id [0]
> > > connecting to server
> > > opening simulator interface
> > > waiting for data
> > > stopping server
> > >
> > > errors, warnings and messages have been appended to
> > > /home/hendry/.gazebo Traceback (most recent call last):
> > >   File "/usr/local/bin/wxgazebo", line 6, in ?
> > >     main(sys.argv)
> > >   File "/usr/local/lib/python2.4/site-packages/wxgazebo/main.py", line
> > > 241, in main ifaces = LoadInterfaces(client)
> > >   File "/usr/local/lib/python2.4/site-packages/wxgazebo/main.py", line
> > > 114, in LoadInterfaces raise gz_error_str()
> > > expected file size: 252 < 268
> > >
> > > My cfg and world files are copied below.  I am running Gazebo 0.5.2 and
> > > Player 1.6.5 on Ubuntu.  Is there something I am missing?  Is there an
> > > easier way to simulate this than the method I'm attempting?
> > >
> > > Thank you,
> > >
> > > Morgan
> >
> > --
> > ------------------------------------------
> > Nicola Bellotto
> > University of Essex
> > Department of Computer Science
> > Wivenhoe Park
> > Colchester CO4 3SQ
> > United Kingdom
> >
> > Room: 1N1.2.8
> > Tel. +44 (0)1206 874094
> > E-Mail: [hidden email]
> > URL: http://privatewww.essex.ac.uk/~nbello
> > ------------------------------------------
> >
> >
> > -------------------------------------------------------
> > 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! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> > _______________________________________________
> > Playerstage-gazebo mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
>
> -------------------------------------------------------
> 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!
> <a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=Click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=Click
> _______________________________________________
> Playerstage-gazebo mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo

--
------------------------------------------
Nicola Bellotto
University of Essex
Department of Computer Science
Wivenhoe Park
Colchester CO4 3SQ
United Kingdom

Room: 1N1.2.8
Tel. +44 (0)1206 874094
E-Mail: [hidden email]
URL: http://privatewww.essex.ac.uk/~nbello
------------------------------------------


-------------------------------------------------------
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!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo