Skip to content

Finds a feasible centerline, walls, and a signed-distance field from SLAM output

License

Notifications You must be signed in to change notification settings

mlab-upenn/racetrack-fitting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

racetrack-fitting

Finds a feasible centerline, walls, and a signed-distance field from SLAM output

image

Prerequisites

Get track image and info files from Cartographer or some other SLAM tool. The image file should be in pgm format and the info file should be in yaml format. Here is an example track pgm and yaml combination:

track.pgm

image

track.yaml
image: track.pgm
resolution: 0.050000
origin: [-5.659398, -4.766974, 0.000000]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.196

Usage

Clone the repository and run the racetrack-fitting script:

git clone https://github.com/mlab-upenn/racetrack-fitting.git
cd racetrack-fitting
python src/fit_racetrack.py

Plots

To control the plots that are displayed, use

python fit_racetrack.py --plot_mode <0, 1, or 2>

0 shows no plots, 1 (default) shows basic plots, and 2 shows all plots

I/O

You can specify the input file paths and output directory using the command line:

python fit_racetrack.py --pgm_path <path to track image> --yaml_path <path to track info> --out_dir <path to output directory>

Subsampling Period

You can change the subsampling period as follows:

python fit_racetrack.py --subsample_period 20

This changes how sparesly the points are sampled from the centerline and wall paths

subsample_period = 6

Subsampled6

subsample_period = 20

Subsampled20

Examples

Pvc Mtl

About

Finds a feasible centerline, walls, and a signed-distance field from SLAM output

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages