Quantcast
Viewing all articles
Browse latest Browse all 72

facing error in robot_state_publisher

I am following the tutorials of urdf with robot state publisher: https://wiki.ros.org/urdf/Tutorials/Using%20urdf%20with%20robot_state_publisher but after catkin_make ,I am facing the following error: CMakeFiles/state_publisher.dir/src/state_publisher.cpp.o: In function `main': state_publisher.cpp:(.text+0x492): undefined reference to `tf::TransformBroadcaster::TransformBroadcaster()' state_publisher.cpp:(.text+0x7af): undefined reference to `tf::TransformBroadcaster::sendTransform(geometry_msgs::TransformStamped_> const&)' collect2: error: ld returned 1 exit status r2d2/CMakeFiles/state_publisher.dir/build.make:113: recipe for target '/home/charvi/ROS_PRACTISE/devel/lib/r2d2/state_publisher' failed make[2]: *** [/home/charvi/ROS_PRACTISE/devel/lib/r2d2/state_publisher] Error 1 CMakeFiles/Makefile2:1190: recipe for target 'r2d2/CMakeFiles/state_publisher.dir/all' failed make[1]: *** [r2d2/CMakeFiles/state_publisher.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed I also did the same changes in CMakeLists.txt as mentioned in the tutorials. find_package(catkin REQUIRED COMPONENTS roscpp rospy sensor_msgs std_msgs tf ) include_directories(include ${catkin_INCLUDE_DIRS}) add_executable(state_publisher src/state_publisher.cpp) target_link_libraries(state_publisher ${catkin_LIBRARIES}) catkin_package( INCLUDE_DIRS include CATKIN_DEPENDS roscpp rospy sensor_msgs std_msgs tf )

Viewing all articles
Browse latest Browse all 72

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>