Skip to content

Gimbal Convention #30

@tawfiq1200

Description

@tawfiq1200

We were discussing the convention of the gimbal and I am copying some of the things we discussed for reference:

I had a confusion about the convention the gimbal and Gazebo are having and then @murphym18 said this:

So far I’ve seen three conventions (but six are possible):

  1. The FRD convention. This is used in aviation. This is what gazebo uses:

gazeb_convention

  1. The convention Ankit showed us :
    The “pitch” axis points right.
    The “roll” axis points backwards.
    The “yaw” axis points down.

However, This webpage does not specify a vector for any of the axes. So we don’t know what direction the vector (1, 0, 0) maps to.

My best guess is that (1, 0, 0) is the roll access, (0, 1, 0) is the yaw axis and (0, 0, 1) is the pitch axis. But that could be wrong. In fact, they list yaw first. So if we assume that (1, 0, 0) is yaw, and we apply right hand rule, then (0, 1, 0) is the pitch axis and (0, 0, 1) points backwards… I’m not sure.

  1. The convention used by the SD-HX10 gimbal. This convention isn’t clear to me. Someone at SD said they would update the manual. Here’s my best guess: This convention is like FRD except we need to convert to euler angles, multiply by -1, then convert back to a Quaternion. I’m not sure, but could we interpret this as:
    the x-axis points backwards? (b/c -1 * forward == backwards)
    the y-axis points left? (b/c -1 * right == left)
    the z-axis points up? (b/c -1 * down == up)

I have seen some evidence that this Interpretation might be correct:

PX4 issue #19933 - gimbal orientation broken in case of pitch == -90 and yaw != 0

Specifically, I’m referring to this image from the github issue:

image_gimbal

The axes are labeled with blue rotation arrows. And I think the side with the blue label is the positive direction. If this is the case, then my interpretation above seems correct (x=backwards, y=left, z=down). But I wouldn’t say this is strong evidence.

The core question

For me, it would be most helpful if we could answer the following questions:

what direction does this vector point: (1, 0, 0)?
what direction does this vector point: (0, 1, 0)?
what direction does this vector point: (0, 0, 1)?The SD-HX10 gamble convention isn’t clear to me either. 

Then at some point, @murphym18 said this:

According to the gimbal controller:

what direction does this vector point: (1, 0, 0)? If we rotate around this axis what does the gimbal do? Put another way, if we build a quaternion using the axis angle formula, and we give this vector as the axis and we give a positive angle, what does the gimbal do?
what direction does this vector point: (0, 1, 0)? If we rotate around this axis what does the gimbal do? 
what direction does this vector point: (0, 0, 1)? If we rotate around this axis what does the gimbal do? 

I think, the answers are:

(1, 0, 0) == -1 * the drone's compass heading. This is the "backwards" axis but it's level with the horizon. If we rotate around this axis, the gimbal rolls left.
(0, 0, 1) == up. It points away from the ground (that is to say, -1 * the direction a plumbline points). If we rotate around this axis, the gimbal yaws left.
(0, 1, 0) is determined by the right hand rule. We can find this direction by taking the cross product: (0, 0, 1) X (1, 0, 0). But intuitively this points to the "left" since our neutral gimbal frame is level with the horizon.  the gimbal would look down if we were to rotate around this axis by a positive angle.

They said on the phone that the gimbal frame doesn't follow the drone's body frame exactly. Nate gave a good reason as to why: The gimbal tries to keep the camera level with the horizon where down in the image points towards the ground. And to do so, the gimbal updates its orientation very quickly using an IMU. This way the video will look stable even if the drone is moving around. This is good because if we had to command the gimbal to keep the image level with the horizon, then we'd record worse video because our sensor data is older and our commands arrive later. The controller has the newest data since it's connected to the sensors and its commands arrive earlier because it's directly connected to the motors.

Then at some point, I made the following assumption which may not be accurate:

Okay, then just to confirm, this is the Gazebo convention and drone is the exact opposite:

roll (+ angles=rotate right, - angles=rotate left)
pitch (+ angles=look up, - angles=look down)
yaw (+ angles=turn right, - angles=turn left)

So, drone is:

roll (- angles=rotate right, + angles=rotate left)
pitch (- angles=look up, + angles=look down)
yaw (- angles=turn right, + angles=turn left)

The drone should match Ankit's simulator's convention however.

Then @murphym18 replied to that:

I think it's confusing to say that the gimbal convention for gazebo is opposite from the SD-HX10 convention. And I don't think Ankit's convention is the same as the SD-HX10's convention.

To describe each gimbal convention we need to know:

The neutral orientation. This is how the neutral frame moves with the drone.
The spatial direction of each principal axis. We know this property when we can point in the direction of the "roll," "pitch," and "yaw" axes
The numerical vector associated with each principal axis. We know this property when we can assign numbers to the roll pitch and yaw axes.

For the SD-HX10 gimbal convention

The neutral orientation follows the body frame of the drone partially (the gimbal frame moves when the drone changes its compass heading)
spatially: It seems like roll is around the "backwards" axis, pitch is around the "left" axis, and yaw is around the "up" axis.
numerical: the roll axis is (1, 0, 0), the pitch axis is (0, 1, 0) and the yaw axis is (0, 0, 1)

For the Gazebo gimbal convention

The neutral orientation follows the body frame exactly
spatially: the roll axis points forward, the pitch axis points right, the yaw axis points down (this one property might be opposite from the SD-HX10, however)
numerically: the roll axis is (1, 0, 0), the pitch axis is (0, 1, 0), the yaw axis is (0, 0, 1)
For the convention Ankit showed us, I don't have much information. I have this link: https://compsci290-s2016.github.io/CoursePage/Materials/EulerAnglesViz/

From this link, I can say:
It looks like the neutral orientation follows the body frame exactly. Is this true?
spatially: roll axis points backwards, the pitch axis points right, the yaw axis points down
numerically: I have no information. But I would guess that the roll axis is (1, 0, 0), the pitch axis is (0, 1, 0) and the yaw axis is (0, 0, 1)

It seems like there are differences between all three conventions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions