Can you write unittests that use the parameter server?
I'm trying to write unittests (in python) that use the parameter server. I'd like to load some parameters from a test yaml file, and use something like the rospy.get_param()
functionality.
The code under test parses information stored as ros parameters, so I to provide test input that is as close as possible to the result of get_param.
In particular, is it possible to:
- Run unit tests without depending/conflicting with the master parameter server (
roscore
may not necessarily be running)? - Load parameters from a test.yaml file?
- Clear the parameter server between different unit tests? (to ensure each test is stateless)
I am aware the rosparam
module can load parameters from a file, but it returns a list of dictionaries instead of loading the parameters into the param server (and the returned data is not compatible with get_param).