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

Twist message coordinate system convention

asked 2011-05-11 03:44:59 -0600

jrivero gravatar image

Trying to know what kind of coordinate system is using in twist message[1] (angular velocities) is not clear to us what does "free space" refers to.

¿Is it refering to EULER ZYX convention? ¿Or Fixed Frame?

In the second case, we can create a Quaterion[2] from EULER ZYX, and we would be interested to know if there is any method to extract the Fixed Frame coordinates from this quaternion.

Thanks a lot.

[1] http://www.ros.org/doc/api/geometry_m...
[2] http://www.continuousphysics.com/Bull...

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
3

answered 2011-05-11 20:14:40 -0600

tfoote gravatar image

To answer your direct question. Velocities are instantaneous and therefore there is no such thing as Euler notation vs fixed frame notation. Also note that quaternions represent orientations and are not appropriate for velocities.

You can convert between all the different conventions, Euler*, Fixed axis etc. You will also find that EulerZYX(YPR) and FixedXYZ(RPY) is conveniently the same three components.

edit flag offensive delete link more

Comments

"Velocities are instantaneous" is the key concept here to understand that the coordinate system has nothing to do in this case. Crystal clear now. Thanks a lot.
jrivero gravatar image jrivero  ( 2011-05-12 02:05:17 -0600 )edit
12

answered 2011-05-11 07:01:51 -0600

Eric Perko gravatar image

See Coordinate Conventions, axis orientation for info on how ROS usually defines the axes of a coordinate system. Note that some applications may not follow those conventions (for example, UAVs often operate in a North-East-Down frame, so their positive z-axis points down, not up).

Since I'm not 100% sure what is unclear, let me give you some general Twist explanation and examples. Hopefully they can help answer your question.

When using a Twist message, you can interpret the components as follows:

  • linear.x - translational velocity along the x-axis
  • linear.y - translational velocity along the y-axis
  • linear.z - translational velocity along the z-axis
  • angular.x - rotational velocity about the x-axis
  • angular.y - rotational velocity about the y-axis
  • angular.z - rotational velocity about the z-axis

Translational velocities will have units like m/s and rotational velocities will have units like rads/s. Note that nowhere in there did we define which way those axes point - that is up to the reference frame that the Twist is relative to (see TwistStamped for a message that includes the header with frame_id in it as well as the Twist).

As an example that might help you have a more clear interpretation, assume for a moment we have a coordinate frame defined according to the above Coordinate Conventions that is fixed to the "origin" of a robot (often called the base_link frame). This frame is oriented such that positive x-axis points forwards, positive z-axis points upwards and the z-axis is on the center of rotation (dead center between the wheels and along the axle for a differential drive robot). This means that if we are interpreting a Twist relative to this reference frame, a command of linear.x = 1.0 means that the robot should move straight forward at 1.0 m/s. A command of angular.z = 1.0 means that the robot should spin at 1.0 rads/s about the center of rotation (this would correspond to yaw).

edit flag offensive delete link more

Comments

Thanks a lot for the detailed explanation. All is clear now.
jrivero gravatar image jrivero  ( 2011-05-12 02:07:19 -0600 )edit

Hi @Eric Perko. Thanks for your well explanation. I need some suggestion regarding similar type of requirement. since i am working on a application development for a pipe-robot which has 3-legs apart at 120 deg with servo mounted at the end of legs in such a way that the wheel direction is forward along with the pipe axis (can say x-axis), I can well move it forward and in reverse direction but failed to rotate/twist it along with x-axis. I am looking for some solution/suggestions which can help me to move it forward/backward (x-axis linear) and rotate/twist it CW/CCW (x-axis angular). Please suggest~

Ashkr gravatar image Ashkr  ( 2021-01-08 00:07:54 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2011-05-11 03:44:59 -0600

Seen: 6,463 times

Last updated: May 11 '11