When I did what the instructor says in the exercise1.1 for the c++ course. The code didn’t work. I pasted the error below

user:~/catkin_ws$ source devel/setup.bash
user:~/catkin_ws$ rosrun c_scripts unit1_exercise
[rosrun] Couldn’t find executable named unit1_exercise below /home/user/catkin_ws/src/cpp_course_repo/utilities/cpp_course_repo/c_scripts

there are a few things it could be. have you run user:~/catkin_ws$ catkin_make before you source it? Or is it because your missing the

set(csname unit1_exercise)

add_executable(${csname} src/${csname}.cpp)

add_dependencies(${csname} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

target_link_libraries(${csname} ${catkin_LIBRARIES})

in your CMakeList file?

1 Like

This topic was automatically closed after 2 days. New replies are no longer allowed.