Rosrun for C++ nodes, throws an Error
copy-paste of the terminal:
$ rosrun test_pkg_01 test_pub_01.cpp
/home/avinaash/catkin_ws/src/test_pkg_01/src/test_pub_01.cpp: line 8: /bin: Is a directory
/home/avinaash/catkin_ws/src/test_pkg_01/src/test_pub_01.cpp: line 9: catkin_ws: command not found
/home/avinaash/catkin_ws/src/test_pkg_01/src/test_pub_01.cpp: line 10: catkin_ws/: Is a directory
/home/avinaash/catkin_ws/src/test_pkg_01/src/test_pub_01.cpp: line 11: syntax error near unexpected token `('
/home/avinaash/catkin_ws/src/test_pkg_01/src/test_pub_01.cpp: line 11: `int main(int argc, char **argv)'
Asked by Avinaash on 2022-09-18 12:52:45 UTC
Comments
I suspect you're trying to directly execute a
.cpp
file, which wouldn't work.Please see #q244598, which appears to be a duplicate of your post.
In the meantime I'll close your post, as we should try to keep the nr of duplicates to a minimum.
Asked by gvdhoorn on 2022-09-19 02:13:54 UTC