[ros-users] Moving frames in 3D (6dof)

Augusto Luis Ballardini aballardini at tiscali.it
Wed May 11 15:26:39 UTC 2011


Here we are... thank you, Augusto

http://answers.ros.org/question/904/moving-frames-in-3d-6dof

On Wed, May 11, 2011 at 8:37 AM, tfoote [via ROS-Users] <
ml-node+2926235-1016350096-223042 at n3.nabble.com> wrote:

> Hi Augusto,
>
> Could you please ask this on answers.ros.org..  This is a nice specific
> question with one or more answers which another person could learn from.
>
> Thanks,
> Tully
>
> On Tue, May 10, 2011 at 9:51 PM, Augusto Luis Ballardini <[hidden email]<http://user/SendEmail.jtp?type=node&node=2926235&i=0&by-user=t>
> > wrote:
>
>> Hi everybody, I have a question about frames , transforms and TF. I would
>> like to extend the simples Turtle tf tutorials (
>> http://www.ros.org/wiki/tf/Tutorials) 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...
>> I have this 3 frames:
>>
>>    - world_frame
>>    - odom_frame (with a fixed transform respect to world)
>>    - cart_frame (I move this frame with the odometry data
>>
>> Here is the code:
>>
>> static tf::TransformBroadcaster br;
>>> static tf::TransformListener tf_;
>>>
>>
>> and this
>>
>> while (ros::ok()){
>>
>>
>>> transform.setOrigin(tf::Vector3(3,3,0));
>>> transform.setRotation(tf::createQuaternionFromRPY(0.0,0.0,0.0));
>>> br.sendTransform(tf::StampedTransform(transform, ros::Time::now(),
>>> "/world", "/odom"));
>>>
>>
>> here, with updateOdom I calculate the x,y,theta position from the odometry
>> (like the tutorial<https://code.ros.org/svn/ros-pkg/branches/trunk_cturtle/stacks/ros_pkg_tutorials/turtle_tf/src/turtle_tf_broadcaster.cpp>
>> )
>>
>>
>>> updateOdom(1);
>>
>> try
>>
>> {
>>
>>  transform.setOrigin(tf::Vector3(x,y,0));
>>
>>  transform.setRotation(tf::createQuaternionFromRPY(0.0,0.0,th));
>>
>>  br.sendTransform(tf::StampedTransform(transform, ros::Time::now(),
>>> "/odom", "/cart_frame"));
>>
>> }  catch(tf::TransformException e)
>>
>> { ROS_WARN("errore transformpose (%s)", e.what()); }
>>
>>
>>
>>
>> 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?
>> In the example I tried to send a transform with a small pitch at the
>> beginning of the while (ros ok())
>>
>> transform.setOrigin(tf::Vector3(3,3,0));
>>> transform.setRotation(tf::createQuaternionFromRPY(0.0,0.4,0.0));
>>> br.sendTransform(tf::StampedTransform(transform, ros::Time::now(),
>>> "/world", "/odom"));
>>
>>
>> and this is the outcome http://www.youtube.com/watch?v=d4ktwwukCV0, not
>> properly what I want...
>>
>> Ok, probably  I am very tired and confused today but if someone can tell
>> me where I'm wrong I'll be infinitely grateful =)
>> Thank you
>>
>> Augusto
>>
>> _______________________________________________
>>
>> ros-users mailing list
>> [hidden email]<http://user/SendEmail.jtp?type=node&node=2926235&i=1&by-user=t>
>> https://code.ros.org/mailman/listinfo/ros-users
>>
>>
>
>
> --
> Tully Foote
> Systems Engineer
> Willow Garage, Inc.
> [hidden email]<http://user/SendEmail.jtp?type=node&node=2926235&i=2&by-user=t>
> (650) 475-2827
>
>
> _______________________________________________
> ros-users mailing list
> [hidden email]<http://user/SendEmail.jtp?type=node&node=2926235&i=3&by-user=t>
> https://code.ros.org/mailman/listinfo/ros-users
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://ros-users.122217.n3.nabble.com/Moving-frames-in-3D-6dof-tp2926091p2926235.html
>  To start a new topic under ROS-Users, email
> ml-node+122217-1927657133-223042 at n3.nabble.com
> To unsubscribe from ROS-Users, click here<http://ros-users.122217.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=122217&code=dHJpZ2FsQGdtYWlsLmNvbXwxMjIyMTd8MjAxMTIwMjI0NA==>.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20110511/8086352f/attachment-0002.html>


More information about the ros-users mailing list