/
Calibration

Calibration

This page details of to calibrate the system for a given physical configuration. This needs to be performed every time the camera and/or valve position changes or if targeting objects at a significantly different height.

Valve Grid Alignment

The position of the spray droplets must be aligned with the grid in the software. Incorrect calibration will result in the system thinking the position of valves is shifted horizontally and targeting will be inaccurate.

  1. Place a piece of paper under the print head at the approximate height of objects you will spray

  2. Select “Test Shot” to fire all valves onto the paper. You may need to adjust valve open time and/or add dye to the liquid to more easily see the spray pattern. Ideally you want to see 32 individual spray marks (may be less well defined if the paper is a lot lower than the print head).

  3. Move the vehicle forward in a straight line until the spray pattern is in the vertical centre of the camera frame. You must drive straight for this to be accurate.

  4. Adjust the “Spray centre offset” and “Row Width” sliders until each spray mark is in its own column. Most importantly look at the first and last columns, the other may not line up as well.

  5. Record the values of “Spray centre offset” and “Row Width” and update these in the code. Variables “SliderCentreDefault” and “SliderWidthDefault” respectively.

Example of grid alignment with spray location.

Pixel Size

The physical length of the vertical pixels must be recorded for a given camera and object height. This allows the system to know the physical position of an object in the frame.

  1. Place a ruler or object with accurate markings in the frame. This must be at the approximate height of objects to be targeted. Ensure the rule is square to the frame.

  2. Measure the vertical length in pixels of a distance on the object. Try to include as much of the vertical frame as possible in your measurement. You can use the “Horizontal Line Offset” slider to note the pixel value at each vertical location.

  3. Calculate the size of each pixel in m/pixel. e.g. “physical length”/”pixel length”

  4. Record this value and update the “pixToMeters" variable in the code. Be sure that the units are m/pix

  5. Note the accuracy of the spray system is very sensitive to this value. Ensure it is measured accurately and inputted with high precision.

If you are are having issues with the accuracy of the system you can check this pixToMeters value by moving the horizontal line and buffer to the top, middle and lower portion the frame. If the accuracy changes across these three areas then there is likely an issue with the pixToMeters value. Use the pix2meter offset slider to make small adjusts until all three positions produce the same result.

Printhead position

The distance between the valves and the camera frame centre must be accurately measured. The easiest way to measure this is to:

  1. Fire the valves onto a piece of paper using the “Test Shot” button

  2. Drive straight backwards until the line of sprayed liquid is in the vertical centre of the camera frame.

  3. Fire the valves again onto a piece of paper

  4. Measure the distance between valve firings in (1) and (3). This is the distance between the valves and centre of the camera frame.

  5. Record this value and change variable “centframePos” in the code. This must be recorded in m, to high precision.

  6. Be careful to drive straight backwards and to avoid moving the paper during measurement, it may be convenient to tape it to the floor.

Accuracy Troubleshooting

It is easiest to check calibration by first using the “colour_detection” script and spraying coloured squares on paper. However, it can also be performed with the main YOLO code.

  1. Get the system setup so it is calibrated (see above) and is detecting the colour as desired.

  2. Set the vehicle velocity to a low stetting (e.g 0.25m/s)

  3. Set the “Horizontal Line Offset” to the centre of the frame (672) and reduce the buffer to 30. Set FPS to 8.

  4. Drive over the paper and fine tune the velocity until the vertical spray accuracy is acceptable (~+/-3mm). If the velocity is significantly different to what you expected there may be an error with the pixToMeters or centframePos values.

  5. Move the “Horizontal Line Offset” to the top quarter of the frame. If the vertical accuracy is poor, adjust the Pix2meter offset to improve accuracy.

  6. Move the “Horizontal Line Offset” to the bottom quarter of the frame. If the accuracy is poor with the current settings, there is likely an issue with one of the calibrations.

  7. Once the vertical accuracy is dialled in, look at the horizontal accuracy. If this accuracy is poor, make sure the Valve Grid Alignment calibration is correct and that you are shooting at the calibrated height. Some errors in horizontal accuracy may be due misalignment in the valve spray patterns.

  8. Once the accuracy is set, increase the buffer size and the speed of the system and finetune the velocity again.

 

 

Related content

Ongoing Issues/Challenges/Future Work
Ongoing Issues/Challenges/Future Work
More like this
Dispersion Volume
Dispersion Volume
More like this
Hardware BOM
Read with this
Software User Guide
Software User Guide
More like this
Hardware images
Read with this
Physical Setup
More like this