Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 16

Can you write unittests that use the parameter server?

$
0
0
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: 1. Run unit tests without depending/conflicting with the master parameter server (`roscore` may not necessarily be running)? 1. Load parameters from a test.yaml file? 1. Clear the parameter server between different unit tests? (to ensure each test is stateless) I am aware the `rosparam` [module](http://docs.ros.org/indigo/api/rosparam/html/rosparam-module.html#load_file) 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).

Viewing all articles
Browse latest Browse all 16

Latest Images

Trending Articles





Latest Images