For Next Time
In this class you will learn some techniques for tuning and testing your particle filter.
We'll begin with the simplest form of tuning, static configuration. By configuration we mean setting the values of various constants that control the program's behavior (e.g., number of particles, amount of noise in various updates, etc.). By static we mean that the configuration must be set before launching the node.
Sometimes it is nice to be able to change the configuration of your node dynamically (i.e. while it is running). To do this, we'll need to create a .cfg file to define the configuration of our node.
Tip: to save the configuration parameters to a YAML execute this command.
$ rosrun dynamic_reconfigure dynparam dump /pf new_params.yaml
To load these configuration parameters, run this command.
$ rosrun dynamic_reconfigure dynparam load /pf new_params.yaml
Play around with the built-in particle Filter
If you want to see what this approach looks like taken to the next level, run the built-in particle filter (using the procedure defined in the robot localization assignment). You will see quite a few parameters can be dynamically reconfigured.
Together, we'll write a node to perform quantitative benchmarking of your particle filter.
Disclaimer: I haven't tried this yet (e.g., to try different values of z_hit). Honestly, it will be a significant amount of work. Here is one possible strategy for doing this.
benchmarker.py
to launch test.launch
and play the bag file (e.g., using Popen). Once the bag files has stopped playing (i.e. the process terminates), you will know that the test case is over. When this happens, you can kill the process you used to launch test.launch
.