<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><div>Here we are... thank you, Augusto</div>

<div><br></div><a href="http://answers.ros.org/question/904/moving-frames-in-3d-6dof" target="_blank" style="color: rgb(0, 0, 204); ">http://answers.ros.org/question/904/moving-frames-in-3d-6dof</a></span><br><br><div class="gmail_quote">

On Wed, May 11, 2011 at 8:37 AM, tfoote [via ROS-Users] <span dir="ltr"><<a href="mailto:ml-node%2B2926235-1016350096-223042@n3.nabble.com">ml-node+2926235-1016350096-223042@n3.nabble.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">



        Hi Augusto, <br><br>Could you please ask this on <a href="http://answers.ros.org" rel="nofollow" link="external" target="_blank">answers.ros.org</a>..  This is a nice specific question with one or more answers which another person could learn from.  <br>

<br>Thanks,<br>

Tully<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Tue, May 10, 2011 at 9:51 PM, Augusto Luis Ballardini <span dir="ltr"><<a href="http://user/SendEmail.jtp?type=node&node=2926235&i=0&by-user=t" rel="nofollow" link="external" target="_blank">[hidden email]</a>></span> wrote:<br>

</div></div><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote"><div><div></div><div class="h5">

<div><div>Hi everybody, I have a question about frames , transforms and TF. I would like to extend the simples Turtle tf tutorials (<a href="http://www.ros.org/wiki/tf/Tutorials" rel="nofollow" link="external" target="_blank">http://www.ros.org/wiki/tf/Tutorials</a>) based on a 2D space but I'm having a lot of troubles doing it. Unfortunately I didn't find (yet) something on the mailing list or on ros-answers...</div>





<div>I have this 3 frames:</div></div><div><ul><li>world_frame</li><li>odom_frame (with a fixed transform respect to world)</li><li>cart_frame (I move this frame with the odometry data</li></ul><div>Here is the code:</div>





<div><br></div><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote">

static tf::TransformBroadcaster br;<br>static tf::TransformListener tf_;<br></blockquote><div> </div><div>and this </div><div><br></div><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote">





while (ros::ok()){</blockquote><div><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote">

<br>transform.setOrigin(tf::Vector3(3,3,0));<br>transform.setRotation(tf::createQuaternionFromRPY(0.0,0.0,0.0));<br>br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "/world", "/odom"));<br>





</blockquote></div><div><br></div><div>here, with updateOdom I calculate the x,y,theta position from the odometry (like the <a href="https://code.ros.org/svn/ros-pkg/branches/trunk_cturtle/stacks/ros_pkg_tutorials/turtle_tf/src/turtle_tf_broadcaster.cpp" rel="nofollow" link="external" target="_blank">tutorial</a>)</div>





<div> </div><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote">

updateOdom(1);</blockquote><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote">

try</blockquote><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote">

{</blockquote><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote">

<span style="white-space:pre-wrap">     </span>transform.setOrigin(tf::Vector3(x,y,0));</blockquote><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote">



<span style="white-space:pre-wrap">     </span>transform.setRotation(tf::createQuaternionFromRPY(0.0,0.0,th));</blockquote><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote">



<span style="white-space:pre-wrap">     </span>br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "/odom", "/cart_frame"));</blockquote><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote">





}  catch(tf::TransformException e)</blockquote><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote">

{<span style="white-space:pre-wrap">    </span>ROS_WARN("errore transformpose (%s)", e.what()); }</blockquote><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote">



 </blockquote><div><br></div><div>Now what I'm trying to do is move the cart_frame not only with the x+y+th params but with a full 6-dof transform, as if the the cart_frame was moving on a circular garage car ramp, and here starts my question: the simplest way is to add the information to the odometry, so I can call the sendtransform() directly, but what if I had a situation where the odometer always sends only 2D transforms? </div>





<div>In the example I tried to send a transform with a small pitch at the beginning of the while (ros ok())</div><div><br></div><div><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote">



transform.setOrigin(tf::Vector3(3,3,0));<br>transform.setRotation(tf::createQuaternionFromRPY(0.0,0.4,0.0));<br>br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "/world", "/odom"));</blockquote>





</div><div><br></div><div>and this is the outcome <a href="http://www.youtube.com/watch?v=d4ktwwukCV0" rel="nofollow" link="external" target="_blank">http://www.youtube.com/watch?v=d4ktwwukCV0</a>, not properly what I want...</div>

<div><br></div><div>

Ok, probably  I am very tired and confused today but if someone can tell me where I'm wrong I'll be infinitely grateful =)</div>

<div>Thank you </div><div><br></div><font color="#888888"><div>Augusto</div></font></div>
<br></div></div>_______________________________________________<div class="im"><br>
ros-users mailing list<br>
<a href="http://user/SendEmail.jtp?type=node&node=2926235&i=1&by-user=t" rel="nofollow" link="external" target="_blank">[hidden email]</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" rel="nofollow" link="external" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></div></blockquote></div><br><br clear="all"><br>-- <br>Tully Foote<br>Systems Engineer<br>Willow Garage, Inc.<br><a href="http://user/SendEmail.jtp?type=node&node=2926235&i=2&by-user=t" rel="nofollow" link="external" target="_blank">[hidden email]</a><br>

<a href="tel:%28650%29%20475-2827" value="+16504752827" target="_blank">(650) 475-2827</a><div class="im"><br>
<br>_______________________________________________
<br>ros-users mailing list
<br><a href="http://user/SendEmail.jtp?type=node&node=2926235&i=3&by-user=t" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="https://code.ros.org/mailman/listinfo/ros-users" rel="nofollow" link="external" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
        
        <br>
        <br>
        <hr noshade size="1" color="#cccccc">
        </div><div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif"><div class="im">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                </div><a href="http://ros-users.122217.n3.nabble.com/Moving-frames-in-3D-6dof-tp2926091p2926235.html" target="_blank">http://ros-users.122217.n3.nabble.com/Moving-frames-in-3D-6dof-tp2926091p2926235.html</a>
        </div><div><div></div><div class="h5">
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em">
                To start a new topic under ROS-Users, email <a href="mailto:ml-node%2B122217-1927657133-223042@n3.nabble.com" target="_blank">ml-node+122217-1927657133-223042@n3.nabble.com</a> <br>
                To unsubscribe from ROS-Users, <a href="http://ros-users.122217.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=122217&code=dHJpZ2FsQGdtYWlsLmNvbXwxMjIyMTd8MjAxMTIwMjI0NA==" target="_blank">click here</a>.
        </div></div></div></blockquote></div><br>