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

something about sendtransform, quaternion and euler

asked 2015-08-14 20:43:32 -0600

unicornair gravatar image

Hi,you, I'm a clown boy and the following params puzzled me,can you make a description for me? My questions are: first:I don't understand "the translation of the transformtion as a tuple (x, y, z)",It seems that translation is equal to transformtion,they has same means unexpectedly! And what do "msg.x" , "msg.y" and "0" actually mean in robot pose? Can i comprehend like this:msg.x and msg.y are Coordinate value where 0 means z=0?

second:param rotation: the rotation of the transformation as a tuple (x, y, z, w),what does (0, 0, msg.theta) mean in robot pose?And what are the relations between rotation and translation?

sendTransform((msg.x,msg.y,0),
                        tf.transformations.quaternion_from_euler(0, 0, msg.theta),
                        rospy.Time.now(),
                        turtlename,
                        "world")
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-08-15 11:21:46 -0600

kramer gravatar image

You didn't, but should've provided a link to the source of the code you show. I believe it came from the Writing a tf broadcaster in Python.

Translation, in this context, refers to linear movement through space. Transformation refers to the conversion of a position in 3d space (location and orientation) between frames of reference. A transform in ROS represents the position of an object in 3d space at a specific time between two specific frames of reference.

In the case you cite, a fixed elevation (z location coordinate) is given, which happens to be 0. Also, only the theta value (i.e., yaw, rotation around the Z axis) of the Euler orientation changes -- the pitch and roll (rotation around the Y and X axes, respectively) are fixed at 0.

Putting that all together, as the turtle moves in its own frame of reference (i.e., turtlename), its (x,y) location and theta orientation changes (in 2d space on the plane with z=0) relative to the world frame of reference. The sendTransform method enters that information into ROS's TF system with an assigned timestamp.

edit flag offensive delete link more

Comments

Thanks for your detail answer,It helps me out

unicornair gravatar image unicornair  ( 2015-08-18 01:21:01 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-08-14 20:43:32 -0600

Seen: 3,739 times

Last updated: Aug 15 '15