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

How to test a ros package

asked 2018-04-16 00:58:46 -0500

bear234 gravatar image

My goal is to check if a ROS package has been installed from source correctly and can work without any error.

So I'm looking for a common way to do such a test.

I've downloaded the source code of the ROS Base and some other ROS packages from the github and I can see that there is a directory named test in most of packages, such as src/geometry/tf/test/, src/actionlib/test/. But I don't know how to use these test directories.

So is there some common way to do test for each package? If there is not, does it mean that I have to read all of source code and code some test cases by myself to test ROS packages?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-04-16 02:19:12 -0500

mgruhler gravatar image

You can run all tests by calling catkin_make run_test. See the catkin documentation for more info.

Obviously, this just runs all defined/implementes tests and cannot guarantee that it "can work without any error" (though you should be pretty safe with the core packages).

Note that you need to call catkin_test_results as specified on the link above to actually get the results of all tests that have run.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-04-16 00:58:46 -0500

Seen: 814 times

Last updated: Apr 16 '18