GuiRitter / OpenBase

An omnidirectional mobile platform with a 3 omnidirectional wheels layout
MIT License
142 stars 45 forks source link

conversion between velocities #10

Open arifle opened 5 years ago

arifle commented 5 years ago

Hello Gui, I need your help to know something about kinematics. Suppose that the cmd_vel gives only a linear and an angular velocity of the robot, e.g. v and omega. How can I convert them into the form of (vx, vy, vz)? I also found that, in some tutorials, the distance between robot center and each wheel is simply replaced by 1 but not the real distance value. What does this mean? Thanks.

GuiRitter commented 5 years ago

Hi there.

  1. By (vx, vy, vz) you mean the velocity in each wheel or the velocity in 3D?
    1. If it's the former, I have the equations in the project's first page.
    2. If it's the latter, I can't give you an answer right away, as my knowledge in kinematics is rusty. There's a chance that trigonometry might be enough to do the trick. You build a right triangle where the hypotenuse is the linear velocity v and it's angle to one of the catheti is omega. Then you just need sine and cosine to find each catheti. One will be vx and the other vy. vz will be zero, as this robot only moves in the plane.
      1. It may be that vy is the one that is zero. It even may be that vx is the one that is zero. There's no rule. You have to choose which means what and stick with it.
  2. About the distance between center and wheel being 1, I know nothing. But maybe you can scale your robot in order to make that distance 1 so the equations can be used, if only temporarily.