CMakeFiles/eco_node.dir/src/runtracker.cpp.o: In function `ros::Duration::Duration(double)':
/opt/ros/kinetic/include/ros/duration.h:119: undefined reference to `tf::Transformer::DEFAULT_CACHE_TIME'
CMakeFiles/eco_node.dir/src/runtracker.cpp.o: In function `get_global_pos(Raser_3dPoint&)':
/home/ilook/catkin_ws_test/src/follower/tracker_eco/src/runtracker.cpp:215: undefined reference to `tf::TransformListener::TransformListener(ros::Duration, bool)'
/home/ilook/catkin_ws_test/src/follower/tracker_eco/src/runtracker.cpp:231: undefined reference to `tf::Transformer::waitForTransform(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ros::Time const&, ros::Duration const&, ros::Duration const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) const'
/home/ilook/catkin_ws_test/src/follower/tracker_eco/src/runtracker.cpp:233: undefined reference to `tf::TransformListener::transformPoint(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, geometry_msgs::PointStamped_<std::allocator<void> > const&, geometry_msgs::PointStamped_<std::allocator<void> >&) const'
/home/ilook/catkin_ws_test/src/follower/tracker_eco/src/runtracker.cpp:215: undefined reference to `tf::TransformListener::~TransformListener()'
/home/ilook/catkin_ws_test/src/follower/tracker_eco/src/runtracker.cpp:215: undefined reference to `tf::TransformListener::~TransformListener()'
collect2: error: ld returned 1 exit status
follower/tracker_eco/CMakeFiles/eco_node.dir/build.make:173: recipe for target '/home/ilook/catkin_ws_test/devel/lib/track_pkg/eco_node' failed
make[2]: *** [/home/ilook/catkin_ws_test/devel/lib/track_pkg/eco_node] Error 1
CMakeFiles/Makefile2:447: recipe for target 'follower/tracker_eco/CMakeFiles/eco_node.dir/all' failed
make[1]: *** [follower/tracker_eco/CMakeFiles/eco_node.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
解决办法:
在CmakeList中,添加tf包:
find_package(catkin REQUIRED COMPONENTS
tf
...
)