[SOLVED] Steer(), get_speed() and set_speed()



steer() alters the current speed, which in most cases will be the target set_speed(), but if called too soon, while speed is ramping up to the set speed, ( or called during the brief time one wheel of a non-blocking drive_cm() has reached its target), will steer() result in unexpected behavior?

I’m am considering using steer() to tweak my wall following “side clearance” during a drive_inches() but perhaps only should adjust once at the mid-point to avoid startup and stop issues.


Hi @cyclicalobsessive,

I’m gonna bring @Matt into this discussion. He may hold more information on this stuff.

Matt, here’s the source code for the steer method:

And here’s the source code for the set_speed method:

Thank you!


@RobertLucian , @Matt that helped.

get_speed() is the getter for self.speed which is the limit speed. self.speed does not change as the bot moves.

get_motor_status() returns a (relatively) current speed. I was thinking the get_speed() was a selector method to get the current speed out of the motor_status, but it only deals with the limit speed.

Bottom line, I can use steer() with wild abandon.

Thanks. (please mark solved.)