Runs a python program that takes in 2 arguments:
-
a file path to a rosbag file containing
nav_msgs/Pathmessages.Default:
data/path_test -
an integer specifiying the number of points to simplify to.
Default:
50
Using the Ramer-Douglas-Peucker algorithm, the points provided by the rosbag message is simplified. In the original RDP algorithm, the parameter used to simply the path is a value ε, that represents a distance dimension. In this algorithm, a similar method of simplification is adopted but instead of using a value of ε, the number of points to keep is specified instead.
- Depending on the version of
pipyou are using, run the following command:
pip install -r requirements.txt
-
Move the
.bagfile into the folderrdp/data/. You can use any other folder or file name as long as it is correctly provided to the program when ran -
Run the program using the following command for defualt settings:
python path.py
- For help with the parameters, run
python path.py -horpython path.py --help
usage: path.py [-h] [-p FILE_PATH] [-n NUMPOINTS]
Simplify path using Ramer-Douglas-Peuker algorithm
optional arguments:
-h, --help show this help message and exit
-p FILE_PATH, --file_path FILE_PATH
path to rosbag file
-n NUMPOINTS, --numpoints NUMPOINTS
number of points