Skip to content
firepick1 (localhost) edited this page Nov 13, 2015 · 4 revisions

HTTP REST measurement service

The /measure REST service measures machine precision by the image offset of camera images taken before and after a series of moves that return to the current location. The /measure service is only available if all the following supporting services are available:

Supported Protocols

Individual requests may return HTTP501 if resources are unavailable. The "default" in the REST urls designates a camera, and can be replaced by any available camera (e.g., "raspistill", "video0", "video1").

➡️ POST /measure/default/jog-precision

Jog precision is defined to be the image offset associated with:

  1. Save current location image
  2. Two jogs in the same random direction along the x-axis
  3. Two jogs in the same random direction along the y-axis
  4. Return to start location
  5. Calculate image offset of current vs. saved images

This sequence is deliberately asymmetric to expose errors. However, the asymmetry itself is randomly oriented so that a series of jog precision tests will reveal directional error if present. The actual motion taken is customizable by providing values for the following optional attributes of the posted JSON object:

{
    "jog":10,
    "n":2
}
➡️ POST /measure/default/lpp-precision

Long Path Precision (LPP) is defined to be the image offset associated with:

  1. LPP move to current location
  2. Two jogs in the same random direction along the x-axis
  3. Two jogs in the same random direction along the y-axis
  4. LPP move to start location
  5. Calculate image offset of current vs. saved images

This sequence is chosen to match the jog precision measurement in its use of four random jogs along the x and y axes. These random movements are bracketed by a starting and ending LPP move to the current location. An LPP move is defined to be "any path that cancels out error without homing." The actual motion taken is customizable by providing values for the following optional attributes of the posted JSON object:

{
    "jog":10,
    "n":2,
    "z1":30,
    "z2":0
}

Currently, an LPP move is defined to be:

  1. Move to (0,0,z1)
  2. Move to (0,0,z2)
  3. Move to desired location

Reserved Protocols

The following URLs are reserved for future use as REST protocols

  • (tbd)

See Also