I made this post because I couldn`t find any detailed explanation on the web about how to build a node from scratch and it may help anyone trying to self-learn ROS. I tried to build a node for controlling the Turtle sim using my PS4 joystick using different buttons and axis with learning purpose for later applying at my robot.
However while trying to run I receive back the message:
couldn`t find executable named teleop_joy below /home/rmb/workspace1/src/test_node
My code: https://github.com/renanmb/SURP
It happens using rosrun and roslaunch. I don`t understand why since I tryied to keep the code very similar to the code found at the Ros Joy Tutorial ( http://wiki.ros.org/joy/Tutorials/WritingTeleopNode ).
I also used as example the code found at JetsonHacks https://github.com/jetsonhacks/jetsoncar_teleop
Thanks for the support.
Originally posted by renanmb on ROS Answers with karma: 33 on 2017-06-22
Post score: 0
Original comments
Comment by gvdhoorn on 2017-06-22:
Probably not the answer you are looking for, but: have you completed the regular -- beginner -- ROS tutorials on the wiki? This would seem to be something that is covered there.
Comment by gvdhoorn on 2017-06-22:
One thing to check: have you built your workspace (ie: ran catkin_make
) and then source
d the devel/setup.bash
file?
Comment by renanmb on 2017-06-22:
Yes, I did all tutorials.
I know that I need to compile running catkin_make or cmake, and for each workspace that I will be working with I need to source the devel/setup.bash . I followed all that and still get the message that there is no executable. The mistake is probably at CMakeLists, file .cpp
Comment by gvdhoorn on 2017-06-22:
If I try to compile your code, I get three compiler errors. Is the code on your github repo identical to what you have on your machine? If so, then it would make sense that rosrun
can't find teleop_joy
, as it won't be created due to the compiler failing.
Comment by gvdhoorn on 2017-06-22:
If I fix those errors, the binary is generated and after source devel/setup.bash
I can successfully run: rosrun test_node teleop_joy
. The CMakeLists.txt
seems ok. At least on my end only the compiler errors were preventing things from working.
Comment by renanmb on 2017-06-22:
but why the compiler is failing? Is It probably something in the CMakeLists? I don`t know what I made wrong because I just followed like it says in the Tutorial.
I not included the directory include, but I think is only necessary CMakeLists.txt , package.xml and the executable in the src directory.
Comment by gvdhoorn on 2017-06-22:
There is nothing wrong with CMakeLists.txt
. See my answer.
Comment by renanmb on 2017-06-22:
So what was the errors in the compiler? I got lost trying to learn CMake in 1 night.
So do you think it is an installation problem with the compiler? Both my devices run on ARM 64.