Hi,
In the exercise 3.1 solution.There is some redundancy in CMakeLists.txt file.
we are already creating a librabry here with robot_manager.cpp file as follows
## Declare a C++ library
add_library(${PROJECT_NAME}_lib
src/robot_manager.cpp
)
I think we just need to link library to the robot_manager_node.cpp executable. Instead, in the solution,
you are compiling robot_manager.cpp file again as shown below which is kind of redundancy
# add the executable
add_executable(robot_manager_node src/robot_manager_node.cpp [color=#]src/robot_manager.cpp[/color])
target_link_libraries(robot_manager_node ${catkin_LIBRARIES} my_robot_manager_lib)
you can change above lines as follows
add_executable(robot_manager_node src/robot_manager_node.cpp)
target_link_libraries(robot_manager_node ${catkin_LIBRARIES} my_robot_manager_lib)