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

Why does catkin run_tests run without a error but rostest not?

asked 2022-09-15 05:15:33 -0500

Theremin1 gravatar image

I created a test_node in a package my_package which tests some other nodes. If I execute catkin run_tests my_package all tests run flawlessly. If I execute rostest my_package my_test_file.test I get the following error: FAILURE: Test node [my_package_test] does not exist or is not executable

The testfile my_test_file.test executes the following code:

<test pkg="my_package" test-name="test_mock_node" type="my_package_test"> </test>

Could somebody explain me where the error comes from and how I can fix this?

edit retag flag offensive close merge delete

Comments

Today I had the same Error again. Now the problem was that I renamed the executable in my CMake File. The Ros Wiki sazs that there must be a corresponding executable with the same name to the type (here my_package_test) from the launch file. See 1.2.1: http://wiki.ros.org/roslaunch/XML/test

Theremin1 gravatar image Theremin1  ( 2022-11-16 10:06:35 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-09-21 04:02:47 -0500

Theremin1 gravatar image

yea the answer is simple:

After you clean your catkin workspace, of course you have to build your catkin folder and source this workspace. But you also have to build your catkin workspace a second time, which I forgot to do. This is the reason why my_package_test was not found.

catkin clean --yes

catkin build

source devel/setup.bash # or some other source file

catkin build

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-09-15 05:15:33 -0500

Seen: 196 times

Last updated: Sep 21 '22