turtlesim node doesn't work
Hello everyone
Recently, I try to using turtlesim node to test my algorithm. Therefore, I need understand turtlesim node source code, so I download code to my catkin_ws folder from github. Before catkin_make all catkin_ws folder, turtlesim node can work very well. But when I catkin_make (no modify turtlesim code), face some problem. the error code as follows :
//usr/lib/x86_64-linux-gnu/libapr-1.so.0: undefined reference to「uuid_generate@UUID_1.0」
collect2: error: ld returned 1 exit status
turtlesim/CMakeFiles/turtlesim_node.dir/build.make:210: recipe for target '/home/rtioms_ros/catkin_ws/devel/lib/turtlesim/turtlesim_node' failed
make[2]: *** [/home/rtioms_ros/catkin_ws/devel/lib/turtlesim/turtlesim_node] Error 1
CMakeFiles/Makefile2:8213: recipe for target 'turtlesim/CMakeFiles/turtlesim_node.dir/all' failed
make[1]: *** [turtlesim/CMakeFiles/turtlesim_node.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Actually, I should not catkin_make
turtlesim source code, so I try to remove all turtlesim folder from catkin_ws, and try catkin_make again. now, no any error code, then try to rosrun
my original turtlesim node, but it doesn't work. It says as follows:
[rosrun] Couldn't find executable named turtlesim_node below /home/rtioms_ros/catkin_ws/src/turtlesim
How to solve my problem make turtlesim node can work??
I hope everyone can help me, thank you.
As I understand, you get the final error message because you have removed the
turtlesim
package from your workspace. If you wish to remove it completely, you can delete yourdevel
, andbuild
directories from yourcatkin_ws
package. then executecatkin_make
again. Then the turtlesim_node will be loaded from your/opt/ros/<distro>/share
workspace (If you have pre installed it from the command line).If you wish to integrate
turtlesim
package in your workspace, you can clone or copy the source from github, place it inside yourcatkin_ws/src
folder. Next you can execute the following command in the root of your workspace. (Be connected to internet)rosdep install -y --from-paths src --ignore-src --rosdistro <distro>
. Replace <distro> by your ROS version name. The above command installs any missing dependency related your package. Then executecatkin_make
. Whencatkin_make
gives errors, sometimes I usecatkin_make_isolated
.Thanks for your responds. I have solved my problem, my turtlesim node can work.