Configure a Single-Axis Gantry
Configure a single-axis
gantry to integrate a single-axis gantry into your robot.
Before configuring the gantry, configure any motor components that are part of the gantry.
Navigate to the Config tab of your robot’s page in the Viam app.
Click on the Components subtab and click Create component.
Select the gantry
type, then select the single-axis
model.
Enter a name for your sensor and click Create.
Edit and fill in the attributes as applicable.
{
"components": [
// < Your motor config >
{
"name": "<your-single-axis-gantry-name>",
"type": "gantry",
"model": "single-axis",
"attributes": {
"motor": "<your-motor-name>",
"length_mm": <int>,
"mm_per_rev": <int>
},
"depends_on": []
}
]
}
The following attributes are available for single-axis
gantries:
Attribute | Type | Inclusion | Description |
---|---|---|---|
length_mm | int | Required | Length of the axis of the gantry in millimeters. |
motor | string | Required | name of the motor that moves the gantry’s actuator. |
board | string | Optional | name of the board containing the limit switches and pins. If limit_pins exist, board is required. |
limit_pins | object | Optional | The boards ’s pins attached to the limit switches on either end. If the motor used does not include an encoder, limit_pins are required to be set. |
limit_pin_enabled_high | boolean | Optional | Whether the limit pins are enabled. Default: false |
mm_per_rev | int | Required | How far the gantry moves (linear, distance in mm) per one revolution of the motor’s output shaft. This typically corresponds to Distance = PulleyDiameter * pi, or the pitch of a linear screw. |
gantry_mm_per_sec | int | Optional | The speed at which the gantry moves in millimeters per second. Used to calculate the gantry motor ’s revolutions per minute (RPM).Default: 100 RPM |
Have questions, or want to meet other people working on robots? Join our Community Discord.
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!