Bulebots / bulebule

An awesome maze-solving micromouse robot
https://bulebule.readthedocs.io
GNU General Public License v3.0
72 stars 23 forks source link

Constants and whatnot #419

Open thekingisback-code opened 4 years ago

thekingisback-code commented 4 years ago

In config.h

How are the locomotion related constants calculated? (My biggest issue/question is with WHEELS_SEPARATION and SHIFT_AFTER_180_DEG_RUN? I believe I already know how to get MICROMETERS_PER_COUNT. How are the value of the constants SENSORSIDE... determined? What's the main difference between the constants MOUSE_WHEELS_SEPARATION and WHEELS_SEPARATION?

In setup.h

How are you measuring your mouse? (Mouse dimensions) In case modifications are donde to the main PCB, how are the exact dimensions measured?

Peque commented 4 years ago

We need to update the documentation. :sweat_smile:

Mouse dimensions (all viewed from the top):

thekingisback-code commented 4 years ago

We need to update the documentation. πŸ˜…

If all goes well, I could help with that. ☺️

Anyway, isn't WHEELS_SEPARATION used in update_encoder_readings() and in inplace_turn()? And well, those are still used. Am I a little bit confused? Or are you talking about an unreleased version?

Peque commented 4 years ago

Good catch! :blush:

Yeah, it is used in update_encoder_readings() to update the angular_speed variable in the encoder module. That variable, though, would only be used if there was a call to get_encoder_angular_speed(), but there is none (there seems to be one in the logging module, but that is not really used for running).

As of today, the angular speed is read from the gyroscope. Only if you did not want to use the gyro (or if you did not have one) you would need to call get_encoder_angular_speed().

thekingisback-code commented 4 years ago

Oh la la, got it. Thanks! After a week of reading your team code (and don't get me wrong, its amazing) I'm finally getting the hang of it! πŸ˜…

Peque commented 4 years ago

Removed old encoder-based angular speed code to avoid confusion: https://github.com/Bulebots/bulebule/commit/f58a0e7abcaaceb7649490b3ab81eda7409286b9