Ask Your Question
1

Are there any real world rostest examples using parameters?

asked 2016-02-24 17:08:59 -0600

chaoflow gravatar image

The last snippet at http://wiki.ros.org/rostest/Writing defines a parameter. However, I could not find any code I could test that show cases that this actually works.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-02-25 13:19:19 -0600

Dirk Thomas gravatar image

rostest basically uses roslaunch files ( http://wiki.ros.org/roslaunch/XML ). And in launch files you can specify parameters ( http://wiki.ros.org/roslaunch/XML/param ) as mentioned in your referenced wiki page.

I think you can safely assume that parameters from launch files get correctly set on the parameter server when you start them. Actually there are specifically tests which ensure such fundamental functionality doesn't regress (rostest launch file: https://github.com/ros/ros_comm/blob/... and the corresponding unit test: https://github.com/ros/ros_comm/blob/... ) and they currently pass.

edit flag offensive delete link more

Comments

Thanks for your quick answer! I meanwhile identified launch-prefix to be the culprit: Nodes with a launch-prefix will attempt to connect to the default ros master (which might be running and lacking the parameters) instead of connecting to the custom ros master started by rostest,

chaoflow gravatar imagechaoflow ( 2016-02-26 03:25:34 -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

1 follower

Stats

Asked: 2016-02-24 17:08:59 -0600

Seen: 647 times

Last updated: Feb 25 '16