6#include <viam/sdk/resource/stoppable.hpp>
41 virtual std::vector<double>
get_position(
const ProtoStruct& extra) = 0;
57 const ProtoStruct& extra) = 0;
70 virtual bool home(
const ProtoStruct& extra) = 0;
79 virtual std::vector<double>
get_lengths(
const ProtoStruct& extra) = 0;
87 virtual ProtoStruct
do_command(
const ProtoStruct& command) = 0;
96 virtual std::vector<GeometryConfig>
get_geometries(
const ProtoStruct& extra) = 0;
101 using Component::Component;
Extends APIType to additionally define a resource's subtype (e.g., camera).
Definition resource_api.hpp:33
Definition component.hpp:10
A Gantry represents a physical gantry and can be used for controlling gantries of N axes.
Definition gantry.hpp:20
virtual void move_to_position(const std::vector< movement_coordinate > &coordinates, const ProtoStruct &extra)=0
Move the axes of the gantry to the desired positions (mm) at the requested speeds (mm/sec).
virtual ProtoStruct do_command(const ProtoStruct &command)=0
Send/receive arbitrary commands to the resource.
virtual bool home(const ProtoStruct &extra)=0
Run the homing sequence of the gantry to re-calibrate the axes with respect to the limit switches.
std::vector< double > get_position()
Get the positions of the axes of the gantry in millimeters.
Definition gantry.hpp:35
virtual bool is_moving()=0
Reports if the gantry is in motion.
bool home()
Run the homing sequence of the gantry to re-calibrate the axes with respect to the limit switches.
Definition gantry.hpp:62
virtual std::vector< double > get_position(const ProtoStruct &extra)=0
Get the positions of the axes of the gantry in millimeters.
virtual std::vector< GeometryConfig > get_geometries(const ProtoStruct &extra)=0
Returns GeometryConfigs associated with the calling gantry.
void move_to_position(const std::vector< movement_coordinate > &coordinates)
Move the axes of the gantry to the desired positions (mm) at the requested speeds (mm/sec).
Definition gantry.hpp:47
std::vector< double > get_lengths()
Get the lengths of the axes of the gantry in millimeters.
Definition gantry.hpp:73
virtual std::vector< double > get_lengths(const ProtoStruct &extra)=0
Get the lengths of the axes of the gantry in millimeters.
API api() const override
Returns the API associated with a particular resource.
std::vector< GeometryConfig > get_geometries()
Returns GeometryConfigs associated with the calling gantry.
Definition gantry.hpp:90
Definition stoppable.hpp:8
Definition resource_api.hpp:50
A coordinate for moving a single axis of a gantry to a desired position at a requested speed.
Definition gantry.hpp:25
double speed_mm_per_sec
A speed in millimeters per second for the gantry to move at respective to the axis.
Definition gantry.hpp:31
double position_mm
A position for the axis of the gantry to move to, in millimeters.
Definition gantry.hpp:27