[Dprglist] encoder counts for odometery

Murray Altheim murray18 at altheim.com
Thu Jan 21 00:47:43 PST 2021


On 21/01/21 5:53 pm, David Anderson via DPRGlist wrote:
> Howdy,
> 
> From Tuesday's RBNV, I should have put this link in the
> chat, in response to a question from Jian about measuring
> encoder counts. Not sure if he monitors this list, but here
> is a link to a short paper from a few years ago on calibrating 
> Rcat's encoders and odometery.
> 
> http://www.geology.smu.edu/dpa-www/robo/rcat/calibrate.html
> 
> Hope this is useful,

Yes, very much so.

Along with David's paper I've got a Python class that performs some
of the same calculations, and could easily be adapted for either
use in a different context or ported to a different programming
language:

   https://github.com/ifurusato/ros/blob/master/lib/geometry.py

It's designed to process an object called 'config' that results from
reading a YAML configuration file imported by a ConfigLoader* class,
with example usage as below:

    loader = ConfigLoader(Level.INFO)
    config = loader.configure('config.yaml')
    # now create a Geometry object:
    Geometry geo = Geometry(config)
    st_per_rot = geo.steps_per_rotation()
    st_per_m   = geo.steps_per_meter()
    st_per_cm  = geo.steps_per_cm()

Note: David's formulae includes a 'wheel size error' that I've not
included in my code, and it looks like I've got some learning to do
to figure out the calibration method he's provided. Mine is also in
metric units. After looking at David's paper I'll likely add the
additional functions for wheel travel, difference, etc.

Always good to share! (I know, after four years it bears reminding...)

Cheers,

Murray

* https://github.com/ifurusato/ros/blob/master/lib/config_loader.py
...........................................................................
Murray Altheim <murray18 at altheim dot com>                       = =  ===
http://www.altheim.com/murray/                                     ===  ===
                                                                    = =  ===
     In the evening
     The rice leaves in the garden
     Rustle in the autumn wind
     That blows through my reed hut.
            -- Minamoto no Tsunenobu



More information about the DPRGlist mailing list