Bad odometry alone can indeed give you massive errors; it’s nearly impossible to track position with odometry alone.  This is why SLAM is such a big problem and there’s so many approaches that deal with data from many different sensors with okay readings into one pretty-good position estimate.  But I’ll get off my soapbox now.


I’d probably go back to the beginning and make sure the Roboteq is reporting reasonable values for translation and rotation.  Looking at the map, it looks like the roboteq may be over-reporting rotation information and throwing off the laser corrections.  If you can, try plotting the odometry data you have to see if it makes sense in terms of distance traversed and yaw angle during turns (it won’t be perfect, but it should be reasonably similar.)  Alternatively, you can watch the robot state in playerprint and drive your robot with playerjoy:  if you move forward a meter the x position should increase by about 1, if you spin 90 degrees to the left the yaw position should increase by about pi/2, etc.

 

Rich

 

From: Aslund [mailto:sebastian.aslund@gmail.com]
Sent: Friday, September 24, 2010 4:24 AM
To: playerstage-users@lists.sourceforge.net
Subject: Re: [Playerstage-users] Problems with writelog and position geometry

 

Hey

I have tried to follow the different steps and the map I get is still a total mess.
I have tried to run the log in PlayerView and the laser information is perfect with the motion of the robot.

My room is nearly squared, but then map I get can seen here: http://yfrog.com/5xfinecj
Can the error in odometry really result in such a bad map?

Regards

Sebastian

On 21 September 2010 15:54, Rich Mattes <jpgr87@gmail.com> wrote:

Hi,

 

I discovered a bug in the documentation generation…I was going to point you to the docs for pmap, but they don’t seem to be generated.  I’ll point you to the source it’s generated from instead[1].  The documentation lists a few parameters you can play with to smooth the map, namely “num_samples.”  There are some examples towards the bottom of the comment block on how to improve the map output.

 

Rich

 

[1] http://playerstage.svn.sourceforge.net/viewvc/playerstage/code/player/trunk/utils/pmap/pmap_test.cpp?revision=7165&view=markup

 

From: Aslund [mailto:sebastian.aslund@gmail.com]
Sent: Tuesday, September 21, 2010 9:13 AM


To: playerstage-users@lists.sourceforge.net
Subject: Re: [Playerstage-users] Problems with writelog and position geometry

 

Hey Rich

Thanks for the information.
I have played a bit more around and found out that pmaptest is able to produce a map, but only if I disable the GUI, somehow it doesn't work with GUI enabled.
The new problem is that I get a map out, but the picture is totally wrong of what it should be and is properly due to the drifting error in my robot's odometry. The question is the how I counter this problem so I can get a decent map?

Regards

Sebastian

On 20 September 2010 15:42, Rich Mattes <jpgr87@gmail.com> wrote:

Hi,

 

Geometry is different from Odometry.  When writelog starts up, it sends a PLAYER_POSITION2D_REQ_GET_GEOM to the position2d devices its logging.  The roboteq driver doesn’t have any code to handle this request, so ProcessMessage returns -1 and the request is not fulfilled.  The geometry request is used to convey the overall size of the robot; whether or not it makes sense to handle requests like that from the Roboteq driver is questionable (maybe via an optional tuple in the config file?)

 

As far as pmap goes, check to see that logfile.h/cpp (called from pmap_test.cc) are reading the correct tokens out of your logfile.  A cursory look at the code indicates that if you’re only getting the following message once is probably having trouble reading from your log file.

 

0.000 m 0.000 rotations 0 scans 0 steps in 0 seconds

-nan msec/scan -nan msec/step

 

 

Rich

 

From: Aslund [mailto:sebastian.aslund@gmail.com]
Sent: Monday, September 20, 2010 9:08 AM
To: playerstage-users@lists.sourceforge.net
Subject: Re: [Playerstage-users] Problems with writelog and position geometry

 

Hey

I have tried to look into the code an apparently writelog is unable to get any geometry information, but when I look at the Roboteq driver, then it updates the geometry if it register encoders, which it does. So if the roboteq driver publishes position2D information, then why cant writelog not read them?

Sebastian

On 20 September 2010 10:22, Aslund <sebastian.aslund@gmail.com> wrote:

Hey everyone

I am working on implementing some path planning and for that I need a map. I have read about how to use writelog and pmaptest to create a grid map, but sadly I am unable to produce any data in my logs. I hope someone can see where I go wrong. 
When I run player on my robot, then I get the following message:
-------
Adding position2d interface.
Configuring Roboteq serial port at /dev/ttyS0
Computed maximum forward velocity of 0.870628 m/s.
Computed maximum rotational velocity of 3.414229 rad/s.
listening on 6665
Listening on ports: 6665
AX2500 found.
Encoder present.
Short circuit detection capable.
warning : unable to get position geometry
------

When I try to get the log while I move around with PlayerView, then pmaptest gives the following output with the generated logfile;
------
aslund@SDURobot:~$ pmaptest --grid_scale 0.05 mydata2010_09_17_13_24_16.log
range_count = 489
range_max = 5.600000
angle_min = -1.500000
angle_max = 1.500000
angle_step = 0.006136
allocating 8192 bytes for scans
allocating 607 Mb of map space (estimated lower bound)
0.000 m 0.000 rotations 0 scans 0 steps in 0 seconds
-nan msec/scan -nan msec/step
------

My .cfg file is this:
------
driver
(
  name "hokuyo_aist"
  provides ["ranger:0"]
  portopts "type=serial,device=/dev/ttyACM0,timeout=1"
  min_angle "-1.5"
  max_angle "1.5"
)

driver
(
  name "rangertolaser"
  requires ["ranger:0"] # read from ranger:0
  provides ["laser:0"] # output results on laser:0
)

driver
(
  name "roboteq"
  provides ["position2d:0" "power:0"]
  devicepath "/dev/ttyS0"
  motor_control_mode "197"
  invert_directions "true"
  encoder_ppr "1024"
  wheel_circumference "1.28"
  axle_length "0.255"
  gear_ratio "7.742"
)
driver
(
  name "writelog"
  log_directory "/home/aslund"
  basename "mydata"
  requires ["laser:0" "position2d:0"]
  provides ["log:0"]
  alwayson 1
  autorecord 1
)
------

Thanks for your help.

Sebastian Aslund

 


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Playerstage-users mailing list
Playerstage-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-users

 


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Playerstage-users mailing list
Playerstage-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-users