ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

converting optical frame to base frame tf

asked 2013-02-24 10:07:23 -0600

ee.cornwell gravatar image

I'm trying to transform an optical frame -> x=right, y=down, z=forward to a base frame with the orientation -> x=forward, y=left, z=up.

I attempted to try the translation in a tf broadcaster, but was unsuccessful. Any ideas?

System:Ubuntu, Fuerte, Precise

edit retag flag offensive close merge delete

Comments

1

You need to be more specific about what you mean by unsuccessful. Check out the launch file kinect_frames.launch file in openni_launch package for an example of how to do exactly what you are asking here

jarvisschultz gravatar image jarvisschultz  ( 2013-02-24 13:44:28 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-02-24 13:46:44 -0600

kalectro gravatar image

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"));
edit flag offensive delete link more

Comments

Thanks, I was on the right track...I just wasn't sending the right angles.

ee.cornwell gravatar image ee.cornwell  ( 2013-02-25 06:05:35 -0600 )edit

Question Tools

Stats

Asked: 2013-02-24 10:07:23 -0600

Seen: 902 times

Last updated: Feb 24 '13