Skip to main content

A general purpose, ROS installable OR pure python package for keeping track of machine calibration data.

Project description

calibration_manager

A simple, general purpose, ROS installable OR pure python package for keeping track of calibration data.

installation:

pip3 install calibration_manager 

Calibrations are organized by machine, component, and time of the calibration in a file structure. Thay may contain any standard python type, and will automatically load numpy arrays.

Once created, calibrations can be loaded and accessed as a dictionary:

import calibration_manager

cal = calibration_manager.Calibration('my_machine')
cal.load_all()
p = cal.cmp['my_parameter']
arr = cal.cmp['my_np_array']

If ros is installed (optional!) and the code has connection to a roscore, it will automatically upload parameters to the rosparam server in /{my_machine}/{my_component}/{ros_params} (location can be overwritten).

To create an example calibration, run the following and look in ~/.ros/calibrations/:

cal.save_example_cal()

To save a new calibration, just construct a dictionary of your parameters and pass to cal:

my_np_array = np.random.rand(3,3)
my_calibration = {
    'A': 3.0,
    'B': True,
    'C': 'pinhole',
    subsystem = {
        '1': my_np_array
    }
}
cal.save('camera1', my_calibration)

Calibrations are stored in ~/.ros/calibrations/ by default, but this can overwritten with:

cal = calibration_manager.Calibration('my_machine', '/my/calibration/location/')

Future work:

  • csv support with pandas
  • ros package install support, apt install support
  • calibration comparison visualization
  • c++ ros support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

calibration_manager-0.0.1.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

calibration_manager-0.0.1-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page