odom_broadcaster.sendTransform(odom_trans) compiling error
Hi guys,
I'm trying to follow this tutorial http://www.ros.org/wiki/navigation/Tutorials/RobotSetup/Odom and I attach to my driver controll node but when I compile it the following error occurred
error: request for member ‘sendTransform’ in ‘odom_broadcaster’, which is of non-class >type ‘tf::TransformBroadcaster*’
this is the line it refers to
odom_broadcaster.sendTransform(odom_trans);
if I try to comment that line compile goes "well", but maybe I don't receive the transform for the base link?
Could someone help me?
EDIT 1: I'm sorry but I found somewhere that, that line chage from "tf::TransformBroadcaster odom_broadcaster" to "tf::TransformBroadcaster *odom_broadcaster" so changed it but without a great idea of what i'm doing. So I restore the original version and now the error is:
undefined reference to `tf::TransformBroadcaster::TransformBroadcaster()'
undefined reference to 'tf::TransformBroadcaster::sendTransform(geometry_msgs::TransformStamped_<std::allocator<void> > const&)'
I'm sorry but i thought I restored everything but I was wrong.
any new suggestion?
thanks a lot
EDIT 2:
Finnaly it works, maybe not in the right way but it works. I add the tf_broadcaster.cpp source in my source folder and also the line in my CMakelist.txt and compile it. I think it's not correct but for the moment is enough.