ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How do I run a unit test with different rosparams?

asked 2012-10-20 05:40:02 -0600

updated 2012-10-20 17:31:28 -0600

What is the best way to run a ROS unittest on a Python node multiple times using different rosparam parameters?

I know how to set rosparams within the test nodes, but I don't know how to force the node under test to re-read the parameters.


-Jon Stephan

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-10-24 17:43:49 -0600

joq gravatar image

rostest is probably the easiest soltution.

edit flag offensive delete link more


Sure, I'm using rostest. But I want to run two tests with the rosparams set to two different values. Most nodes (or at least my nodes) only read parameters on initialization. Is there a way to tell a node to re-initialize?

Jon Stephan gravatar image Jon Stephan  ( 2012-10-27 15:53:18 -0600 )edit

Rerun it. There's no internal state or official starting state you can force it to return to. If the node writers wish they can make it reread the parameters regularly, but usually it's expected to restart things.

tfoote gravatar image tfoote  ( 2013-01-14 15:56:22 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2012-10-20 05:40:02 -0600

Seen: 400 times

Last updated: Oct 24 '12