ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

error for tf::TransformListener

asked 2014-04-20 18:28:42 -0500

ushergod gravatar image

updated 2014-04-20 18:30:07 -0500

/usr/bin/ld: CMakeFiles/linedetect.dir/src/linedetect.cpp.o: undefined reference to symbol 'tf::TransformListener::~TransformListener()' /usr/bin/ld: note: 'tf::TransformListener::~TransformListener()' is defined in DSO /opt/ros/hydro/lib/libtf.so so try adding it to the linker command line /opt/ros/hydro/lib/libtf.so: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[2]: * [/home/sihanwan/catkin_ws/devel/lib/lab2/linedetect] Error 1 make[1]: [lab2/CMakeFiles/linedetect.dir/all] Error 2 make: ** [all] Error 2

this is my class

**class Change { public: laser_geometry::LaserProjection projector;

    ros::NodeHandle n;
    ros::Publisher pub;
    ros::Subscriber sub;
    Change();
    void scanCallback(const sensor_msgs::LaserScan::ConstPtr& scan_in);
private:
    tf::TransformListener listener;

};**

any help appreciated!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2014-06-18 12:51:12 -0500

b3l33 gravatar image

The following worked for me... I added "tf" to my CMakeLists.txt find_package(). E.g.:

find_package( catkin REQUIRED COMPONENTS roscpp .... tf)

edit flag offensive delete link more

Comments

It worked for me too! Thanks! :)

sina.cb gravatar image sina.cb  ( 2014-08-10 13:06:46 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-04-20 18:28:42 -0500

Seen: 4,347 times

Last updated: Jun 18 '14