Problem using several transformation

asked 2017-08-03 09:58:26 -0500

Bastienm gravatar image

updated 2017-08-04 03:04:41 -0500


I want to do 3D textured reconstruction. To this I did a small state of the art and now want to do this using ros. I want to use ORBSLAM2 for the localisation and I found the package chisel_ros to do the rest of the work ( ). I changed a bit orbslam to publish the transformation cam to world (in fact the tf depth -> map and the tf wolor->map which are the same) through a tf broadcaster as following :

tf::TransformBroadcaster br;

tf::Transform transform;


geometry_msgs::Quaternion q = cvRot2Quat(cam_to_world); transform.setOrigin(tf::Vector3(<float>(0,3),<float>(1,3),<float>(2,3)) ); transform.setRotation( tf::Quaternion(q.x, q.y, q.z, q.w) );

br.sendTransform(tf::StampedTransform(transform, cv_ptrD->header.stamp, "/camera_depth_ref", "map"));

br.sendTransform(tf::StampedTransform(transform, cv_ptrRGB->header.stamp, "/camera_brg_ref", "map"));

On the chiesel side a ros server is emplemented and received tf message like this (same way to do for color and depth transform) :

transformListener.waitForTransform(colorCamera.transform, baseTransform, colorImage.header.stamp, ros::Duration(0.5));

transformListener.lookupTransform(colorCamera.transform, baseTransform, colorImage.header.stamp, tf);

std::cout << "COLOR -- transform read" << std::endl;

But when I'm running all of this chiesel (the ros server part) display "[ WARN] [1501769809.122784924]: Could not find a connection between 'camera_brg_ref' and 'map' because they are not part of the same tree.Tf has two or more unconnected trees." or for the depth"[ WARN] [1501769803.905113498]: Could not find a connection between 'camera_depth_ref' and 'map' because they are not part of the same tree.Tf has two or more unconnected trees."

I tried to use rosrun tf view_frames when I publish only the depth tf, only the color tf ad finally the both color and depth tf (as they are screenshot there are my two screen, the figure is on the right side).

image description image description image description

Could you say me where does it come from ?

---- EDIT ---

As the figure with both depth and color shows only 1 arrow I was looking for a problem in the tree tf. The error was just that I invert the /name in the " br.sendTransform". So I replaced

br.sendTransform(tf::StampedTransform(transform,cv_ptrRGB->header.stamp, "/camera_brg_ref", "map"));


br.sendTransform(tf::StampedTransform(transform, cv_ptrRGB->header.stamp, "map", "camera_brg_ref"));

to make it work.

edit retag flag offensive close merge delete


Please attach the screenshots directly to this post. I've given you enough karma to do so.

gvdhoorn gravatar image gvdhoorn  ( 2017-08-03 10:14:00 -0500 )edit