retrieve tf transform
Hellow,
I'm trying to obtain information from the a tf transform. I've loaded my URDF file in the parameter server and run robot and joint state publish. Here is a picture of some links :
So I can see that the transform between /base_link and /camera is publish.
Now here is my code which is very simple as it is a test :
#include <ros/ros.h>
#include <tf/transform_listener.h>
int main(int argc, char** argv){
ros::init(argc, argv, "my_tf_listener");
ros::NodeHandle node;
tf::TransformListener listener(ros::Duration(10));
tf::StampedTransform transform;
try{
geometry_msgs::PointStamped base_point;
listener.lookupTransform("/camera", "/base_link", ros::Time(0), transform);
}
catch(tf::TransformException& ex){
ROS_ERROR("Received an exception trying to transform a point from \"camera\" to \"base_link\": %s", ex.what());
}
};
I'm just trying to have the transformation between /camera and /base_link. But I run in that error :
rosrun tobot_goal listen
[ERROR] [1396346328.110845542]: Received an exception trying to transform a point from "camera" to "base_link": Frame id /camera does not exist! Frames (1):
which would tend to mean that /camera is not publish. And if I try with any other frame I have, the result is the same...
Why can't I seem to not access those transformations ?
Thanks a lot !