fake

Configure a fake gantry to test implementing a gantry component on your machine without any physical hardware. The fake gantry is single-axis: it tracks position in memory along one prismatic joint, validates moves against the axis length, always returns false from IsMoving, and returns true immediately from Home.

{
  "name": "<your-fake-gantry-name>",
  "model": "fake",
  "api": "rdk:component:gantry",
  "attributes": {
    "length_mm": <float>,
    "model_path": "<path_to_gantry_model>"
  }
}
{
  "name": "my-fake-gantry",
  "model": "fake",
  "api": "rdk:component:gantry",
  "attributes": {
    "length_mm": 1000
  }
}

The following attributes are available for fake gantries:

NameTypeRequired?Description
length_mmfloatOptionalTravel length of the single axis in millimeters. Defaults to 100 when omitted. Cannot be set together with model_path.
model_pathstringOptionalPath to a kinematic configuration file for a single-DoF prismatic gantry. This path should point to the exact location where the file is located on your computer running viam-server. Cannot be set together with length_mm.

See GitHub for API call return specifications.

Test the gantry

Once your gantry is configured and connected, open the gantry’s TEST panel on the CONFIGURE or CONTROL tabs.

Use the panel to adjust the position of the actuator on the axis and check whether it moves as expected.

Gantry test panel.

If the gantry does not appear on the TEST panel, or if you notice unexpected behavior, check your machine’s LOGS tab for errors, and review the configuration.