ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

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.

Thanks,

-Jon Stephan

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

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

joq gravatar image

rostest is probably the easiest soltution.

edit flag offensive delete link more

Comments

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
1

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

Question Tools

2 followers

Stats

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

Seen: 495 times

Last updated: Oct 24 '12