Closed Sgail7 closed 7 months ago
Just pondering, We could make angular Z a unit coefficient for the left motors. Ex. the speed of the left motors are equal to linear X * (Angular Z + 1) /2 ?
What would be the benefit of doing that? Furthermore, would we then leave the right motors the same in terms of calculations? Would the part of the formula (Angular Z + 1) not make the calculations of angular z inaccurate to what the real input was?
Just a few things to take care of before proceeding:
Just removed the only other instance of linear y I could find. I didn't want to remove it from ParseTwistandReturn and processTwist since those are for the teleop messages and don't affect the kinematics.
Definitely agree on testing out the code. Would be really nice to verify that the speeds we input are the real life speeds as well.
Perfect, we'll get to testing as soon as possible
Code has been tested with 1 motor. PWM overflow fixes work and so do the only positive PWM values. I'm requesting for this to be merged into mainline.
Updated main branch ruleset to allow updates, still requires code reviews.
Removed redundant linear y, made it so that pwm can never exceed 255, rpm can never exceed maximum set rpm, and RPMtoPWM function can only output positive PWM values.