Does Raspbian for Robots/DexterOS actually USE the calibration data?

@cleoqc
@cyclicalobsessive

Viz.:

Question:

Does RFR or DexterOS actually USE the generated calibration data we generate?

Or is implementing calibration left as an “exercise for the student”?

If it does use the calibration data, can you point me to the part of the code where it lives?

Thanks!

The code lives in easygopigo3.py file,

EasyGoPiGo3 class, load_robot_constants() method

def load_robot_constants(self, config_file_path="/home/pi/Dexter/gpg3_config.json"):

and is called by EasyGoPiGo3.__init__()

# load wheel diameter & wheel base width
        # should there be a problem doing that then save the current default configuration
        try:
            self.load_robot_constants()

which is called when a user instantiates an easygopigo3.EasyGoPiGo3 class object:

import easygopigo3

egpg = easygopigo3.EasyGoPiGo3()

No, only the EasyGoPiGo3 interface / driver code does.

2 Likes

So there is the question to track down: “Does Bloxter use a GoPiGo3 interface / driver that loads the config file?”

I don’t know anything about Bloxter, but if it is possible to see the underlying code generated, perhaps you can see if it is instantiating an EasyGoPiGo3() python class via import easygopigo3 (easygopigo3.py) or import GoPiGo3Scratch (GoPiGo3Scratch.py) ?

1 Like

Bloxter does use it, indeed.

If you are an advanced user and use directly the gopigo3.py library, bypassing easygopigo3, then you won’t benefit from it.

Latest version of DexterOS would have that feature, earlier versions would not.

2 Likes

Which then begs the Musical Question: Where is it? Can I simply copy over my existing calibration data from R4R?

Oh, another thing about calibration. . . . .

I was reading another post about this guys robots, some of which had a noticeable “skew” to one side or the other, and another poster talking about the accuracy of the calibration. (IMHO when you need decimal precision in robot positioning, maybe the GoPiGo isn’t for you? :grinning:)

Examining the wheels, motors, encoders, etc - I noticed that there was a definite “step” in the motor’s travel caused by the field magnets, armature, and magnetic flux paths - and there were six distinct steps.

Oooh! Cool beanies! I discovered something new to share!! (Not that a 60° rotary step at 120/1 would amount to a hill of beans. . .)

Then. . . . Well wadda ya’ know? Good 'ole @cyclicalobsessive beat me to it in one of his many - very intelligent - posts. I guess I gotta get up earlier in the morning if I’m going to have any chance against him! :laughing:

Au contraire! This is the secret of the known universe. Six times one-twenty divided by two makes two pies. (And that hill of beans is only 0.290 mm, but you will always be fed two hills of beans.)

As to your other question - “Your mission, should you choose to accept it, …”

1 Like

From the first screen of DexterOS (and only from that screen) you have access to a calibration tool.

If you know your numbers, you can enter them directly:

2 Likes