ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Because your node contains elements from two different cpp files you need to let CMake know that they are both required. To do this you'll need to change the line:
add_executable(main test.cpp)
to
add_executable(main test.cpp class.cpp)
Hope this helps.