Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIBNI: Easysensor Servo params in gpg_config.json #296

Open
slowrunner opened this issue Jun 21, 2021 · 1 comment
Open

WIBNI: Easysensor Servo params in gpg_config.json #296

slowrunner opened this issue Jun 21, 2021 · 1 comment

Comments

@slowrunner
Copy link
Contributor

I know this is a real WIBNI

It would be so cool if class easysensors.Servo checked gpg_config.json for "servo-center" (in uS) and "servo-range" (in uS), and there existed a servo_calibration_gui program.

Then easysensor.Servo.reset_servo() could center the servo exactly, and
easysensor.Servo.rotate_servo(x) could be correct,
(and the smaller "servo-range" could prevent servo stall if need be)

On my ModRob Servo Kit, the teeth on the servo and distance sensor servo mount are not sufficiently fine to center the servo then push the mount onto the servo in the centered direction. I have to use ps.rotate_servo(SERVO_1_CENTER_DEG) with value 85 degrees (1424uS), and my "servo-range" is only 1348.

(I do apologize for taking your time with a wild WIBNI.)

@jharris1993
Copy link
Contributor

jharris1993 commented Feb 12, 2022

I absolutely agree and believe this is a justified request instead of a pipe-dream "WIBNI" as it proposes a genuinely useful improvement to a widely supported feature of the robot.

My robot, Charlie, has a pan-and-tilt for his "head" (distance sensor/camera), and I have to keep a set of position constants in every file/program that makes use of the servos so that they can be centered properly.  This becomes a real problem if, for whatever reason, the base position of the servo(s) change.  (i.e.  I recently had to replace the horizontal positioning servo.)  It then becomes necessary to track down every occurrence of the servo calibration constants and change them.

I would be "jumping-up-and-down" happy if the positions, (and limits) were even in servo-degree units, (which is what I do), and use relative offsets from "center".

However, a more elegant solution would be the one @slowrunner recommended where the constants would be in signal units, (μSec), so that "90" becomes an accurate center point.  That being done, limit-of-travel could be done in the servo's degree units, (>= 17 and <= 170 for example)

Another option would be to modify the gpg_config.json to include the values, and mess with the calibration routines later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants