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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for calibration_manager-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c9a12db9ae10c2c17515354139da038d09ad659caafadf18d9ee5c7cfb73d1d |
|
MD5 | 7a287595bf066f136dbaf94266eec601 |
|
BLAKE2b-256 | 1a2c62c37e5e9b265efa7929d7c0fa37b1aa5cfc28520ca22ea8ff6847a57bc3 |
Hashes for calibration_manager-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 339a9b1370d4acaed60a3fbc0b4a2cd89af77e4d69d6ba9da8f350c54467cbd0 |
|
MD5 | 45e778cb77b969d5a4c0898d28e59926 |
|
BLAKE2b-256 | 8d3dcd97e4063d883f12b20b44c3846289c04a4fed220a86747e37bb179381e8 |