Questions regarding ROSbot.cpp

Hello,

I have some questions regarding the code which is in the ROSbot.h (hFramework/ROSbot.h at master · husarion/hFramework · GitHub)

Question 1:
What does the diameter represent that is defined in this line: float diameter_mod = 1.24?

Question 2:
How did you come up with this value for the encoder tics?
uint16_t enc_res = 1633; // encoder tics per wheel revolution

Question 3:
What are the units for this value, and how did you come up with 8000?
float wheel_max_speed = 8000;

Hello n_jak,

Q1: float diameter_mod = 1.24 is modifier used for ROSbot odometry. When turning, real rotation angle is lower 1.24 times than determined by encoders. It is caused by wheel slippage.

Q2: It is encoder resolution multiplied by gear ratio: 48*30613/900 = 1632.693. You can find details in ROSbot manual.

Q3: This is wheel max speed in encoder tics per second. It roughly equals to ROSbot max speed.

Regards,
Łukasz

Hello Łukasz,

Thank you for your reply.

Did you determine the real rotation angle through testing, or is there a way to estimate it through the kinematics of skidding. If so, how would I be able to estimate the real rotation angle?

Hello n_jak,

We determined this value through tests. It may vary, depending on floor surface.
If you want to get most accurate odometry results, you will have to experiment in your environment.

Regards,
Łukasz