Final project information
About the data file format
As you probably know by now, the formats for the three data files are
quite different, and I want your programs to read a single file
format. The main differences (aside from the format of the data)
between the three data sets i've selected from RADISH are:
- Units: centimeters versus meters, degrees versus radians
- Different number of laser readings (181 for "stanford", 180 for the
others)
- Different representation of laser readings (lines versus ranges)
- The "aces" file (which uses lines) indicates the offset from the
center of the laser range scanner from the robot center.
- While the "aces" file nicely alternates the position and laser
readings, the "intel" file generally has two position lines in a row
(which are in general different), and the "stanford" file generally
has a number of laser scans in a row (evidently without any position
information associated with the scans).
I've settled on a data format which will:
- Alternate position and laser scans, starting
with a position datum. I am doing this by:
- discarding any laser scan before the first position datum
- only using the last position datum before a laser scan
- only using the first laser scan after a position datum
I think these are reasonable choices, but you can let me know if
you think otherwise.
- Distances will be in meters (to 3 decimal places), angles will be
in degrees (to one decimal place). The choice of units for angles
follows my general convention of making external representations of
angles (than people may read or look at) in degrees, while all
internal representations (i.e. only seen by the program) are in radians.
- Laser scans will be represented by ranges (not lines)
- There will be a short header containing the following:
# laser-offset 0.06 0.0 0.0
# laser-angles 180 -89.5 89.5 1.0
This will tell you the offset (which I have set to 0.0 0.0 0.0 for the
"intel" and "stanford" data sets; this may or may not be correct but I
haven't seen any information on it). Assume that the robot frame is
oriented so that the x axis points forwards.
The "laser-angles" line tells
you how many ranges will be on each line, the angle of the first, the
angle of the last, and the angular step between each.
It would probably be fine if you ignored the 181st laser datum in
the "stanford" data set and shifted them by half a degree, but I've
left it like this for completeness.
Conversion script and standard data files
I've written a litte script in Ruby, convert.rb that will convert the three
files to the standard format. Since I'm providing the standard files,
you don't actually need to run this, but it's here for your
information or in case you'd like to play around with it. By the way,
this script looks at the filename that you give it (on the command
line), so it won't work for other data files, though it should be easy
to set it up for other (similarly formatted) data files.
This script by default will produce the standard data file, but it
can also produce an "odometry" file and a "laser" file which are
suitable for plotting to see what the raw data look like. I plotted
these files in gnuplot with the line:
plot "aces-laser.dat" using 1:2 with dots, "aces-odometry.dat" using 1:2 with lines
I've included the resulting pictures below. As you can see, the
"aces" and "stanford" files produce something that resembles the
environment. The "intel" file produces a big blob, so I'm not sure
that I've interpreted the data in the file properly. (Relative versus
absolute position datum, for example.)
Here are the data files in our standard format:
FYI, here's the output my script produced when creating these
files:
$ ./convert.rb aces3_publicb.rtl all
Processed 21957 lines which contained:
7375 odometry measurements
7375 laser scans (only 7374 used).
$ ./convert.rb intel.script all
Processed 40546 lines which contained:
26915 odometry measurements
13631 laser scans (only 13631 used).
$ ./convert.rb stanford-gates1.log all
Processed 179428 lines which contained:
20724 odometry measurements
118312 laser scans (only 20724 used).
If you run this script on your machine, you may need to change the
first line so it has the path to ruby on your system. (For example,
in the CS SUNOS environment, it is at /usr/local/bin/ruby.) You can
also call it by running ruby directly, for example:
$ ruby convert.rb stanford-gates1.log all
Pictures
Here are pictures of the raw data. (Actually, I have thrown out all
laser measurements greater than 5 meters for these plots.) As you can
see, the odometry drifts over the course of the run.