Ask Your Question
0

error for tf::TransformListener

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

ushergod gravatar image

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

/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
3

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

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 imagesina.cb ( 2014-08-10 13:06:46 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 2,549 times

Last updated: Jun 18 '14