himanshuk32 / Odometry-for-Holonomic-Drive

Odometry Control of 3 wheel and 4 wheel Omni Drive Mobile robots
8 stars 3 forks source link

Questions about this code #1

Closed lefuturiste closed 2 years ago

lefuturiste commented 4 years ago

Hello,

I'm a hobbyist in robotic and I'm looking to do odometry for my 4 mecanum wheel holonomic robot. My wheel configuration is 4 wheels all oriented toward the same direction:

image

I use REV Core hex motors which have a integrated quadratic encoder. So I was wondering if I can use these encoders (at least 3 of theses) to do my odometry and known the position and the orientation of my robot. I'm really interested in this repository here and my questions are:

Thanks you very much in advance!

himanshuk32 commented 2 years ago

Hi,

First of all, sorry for the very late reply.

I will try to answer your questions.

  1. The code is made for omni-directional robot consisting of 3 omni wheels. The wheels are placed at the vertices of an equilateral triangle with each wheel's axis facing towards the center of the triangle. They are represented by the indices 1,2 and 3 in the code. In addition to this configuration, two rotary encoders (high precision) are placed at the center of the robot. They are perpendicular to each other and face in the robot's local X and Y. They are represented by x and y in the code.

  2. For the 4-wheeled mecanuum drive, you can compute the x and y position of the robot using the four wheels, provided the rotary encoders are highly accurate. You can compute the velocity of the robot using Forward Kinematics and then integrating the same would give you the X and Y position. But, you would need an IMU for estimating the orientation of the robot.