
## Examples ##


### Simple scan matching ###

Simple scan-matching:

	$ sm2 < in.log > out.log

where `in.log` may be in either Carmen or JSON format.

### Creating a PDF ###

Creating a PDF:

	$ log2pdf -use odometry  -in in.log -out out_odometry.pdf
	$ log2pdf -use estimate  -in in.log -out out_estimate.pdf

### Examining one particular matching (video) ###

To zoom on one particular matching, write a "journal"
using the `-file_jj` option of `sm2`:

	$ sm2 -file_jj journal.txt < in.log > out.log

Extract what you are interested in from the journal.
In this example, the 13th matching:

	$ json_extract -nth 13 < journal.txt > matching13.txt

Create the animation:

	$ sm_animate -in matching13.txt

### Help! ICP doesn't work ###

Actually, there are a million reasons for which it shouldn't work.
If it gives strange results, try the following:

1. Plot the data! Plot the input and plot the output using `log2pdf`.

2. Plot the animation! Use the procedure above and inspect the resulting videos.

3. Double-check the parameters you are using. Note that there are some like
   `max_correspondence_dist` which depend on the scale of your data. A value
   of 2m might work for a big robot making large movements, but not for a little
   Khepera.

4. Smooth your data -- if your sensor is very noisy, like an Hokuyo, it's worth
   to do simple low-pass filtering. Especially for PLICP which uses the orientation
   information.








