turtlesim node doesn't work

asked 2019-04-07 15:08:02 -0500

q576333 gravatar image

updated 2019-04-07 22:30:27 -0500

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.

edit retag flag offensive close merge delete

Comments

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 your devel, and build directories from your catkin_ws package. then execute catkin_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 your catkin_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 execute catkin_make. When catkin_make gives errors, sometimes I use catkin_make_isolated.

TharushiDeSilva gravatar imageTharushiDeSilva ( 2019-04-07 22:37:08 -0500 )edit

Thanks for your responds. I have solved my problem, my turtlesim node can work.

q576333 gravatar imageq576333 ( 2019-04-12 02:31:17 -0500 )edit