On 3/23/2011 4:57 AM, Simone Gaiera wrote:
> No I have alredy a map in which move the robot. I use a roomba 500 with that
> name "stage"
> provides ["simulation:0"]
> plugin "stageplugin"
> worldfile "simulazione.world"
> name "roomba"
> provides ["position2d:1" "bumper:1" ]
> port "/dev/ttyUSB0"
> model "roomba500"
> safe 1
> roomba500 true
> include "irobot.inc"
> include "map.inc"
> quit_time 3600
> paused 0
> resolution 0.02
> size [ 635.000 666.000 ] # in pixels
> scale 36.995 # pixels per meter
> center [ -0.040 -0.274 ]
> rotate [ 0 0 ]
> show_data 1 # 1=on 0=off
> name "cave"
> size [16.000 16.000 0.800]
> pose [0 0 0 0]
> bitmap "bitmaps/map.png"
> name "roomba500"
> pose [ -6.432 -5.895 0 45.000 ]
> localization "gps"
> localization_origin [ 0 0 0 0 ]
> I see the robot in the map and the robot works good so I try to use
> playerjoy. the robot moves in my room but it don't move in the map...can you
> help me?
Doing what you want to do requires you writing an extra plugin driver or
client program that reads the (x,y,yaw) position from the roomba500's
position2d:0 interface, and then setting the position of the roomba
_model_ in Stage through the simulation:0 interface.
Remember that the (x,y,yaw) positions provided by the roomba500 robot
are totally independent from your simulation coordinates in Stage, and
will also probably drift over time. You may be able to line them up if
you start the robot in a known spot on the map, but this alignment will
probably not last for long. If you have a pretty good map of your area,
you can use rangefinders to try to localize yourself in it with the amcl
driver; otherwise you're left at the mercy of the accuracy of the
Roomba's (rather poor) wheel rotation counters.