Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The reason is pretty simple:

Your CMake target is called tests_mynode. But your launch file tries to call test_mynode.

Another side note: your CMakeLists.txt file should look more like this:

if(CATKIN_ENABLE_TESTING)
  find_package(rostest REQUIRED)
  add_rostest_gtest(tests_mynode test/alaunch.launch test/mytest.cpp)
  target_link_libraries(tests_mynode ${catkin_LIBRARIES})
endif()

The reason is pretty simple:

Your CMake target is called tests_mynode. But your launch file tries to call test_mynode.

Another side note: your CMakeLists.txt file should look more like this:

if(CATKIN_ENABLE_TESTING)
  find_package(rostest REQUIRED)
  add_rostest_gtest(tests_mynode test/alaunch.launch test/mytest.cpp)
  target_link_libraries(tests_mynode ${catkin_LIBRARIES})
endif()