Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What exactly did not work with the tf broadcaster? If the origin is supposed to stay the same, all you need to do is find the right rotation between the frames and broadcast like so:

tf::TransformBroadcaster br;
tf::Transform transform;
transform.setOrigin( tf::Vector3(0,0,0)); 
transform.setRotation( tf::Quaternion(x,y,z,w) ); 
br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "optical", "base_link"));