Configure a One-Axis Gantry
Configure a oneaxis
gantry to integrate a one-axis gantry into your robot:
Navigate to the Config tab of your robot’s page in the Viam app.
Click on the Components subtab and navigate to the Create component menu.
Enter a name for your sensor, select the type gantry
, and select the oneaxis
model.
Click Create component.
Edit and fill in the attributes as applicable.
{
"components": [
// < Your motor config >
{
"name": "<your-oneaxis-gantry-name>",
"type": "gantry",
"model": "oneaxis",
"attributes": {
"motor": "<your-motor-name>",
"length_mm": <int>,
"axis": {
"X": <int>,
"Y": <int>,
"Z": <int>
}
},
"depends_on": []
}
]
}
The following attributes are available for oneaxis
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. |
axis | object | Required | The translational axis for the gantry. Must be exactly one of x , y , or z . |
board | Optional | string | name of the board containing the limit switches and pins. If limit_pins exist, board is required. |
limit_pins | Optional | object | 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 | Optional | 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_rpm | int | Optional | The gantry motor ’s default revolutions per minute (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 there is anything we could be doing better, please create an issue.
We're sorry about that. If you'd like to talk to us for help, please join the Community Discord. To ensure we know what's wrong with this page, you can also open an issue.