@@ -10,10 +10,10 @@ import {
1010 StopRequest ,
1111} from '../../gen/component/gantry/v1/gantry_pb' ;
1212import type { RobotClient } from '../../robot' ;
13- import type { Options } from '../../types' ;
13+ import type { Options , KinematicsFileFormat } from '../../types' ;
1414import { doCommandFromClient } from '../../utils' ;
1515import type { Gantry } from './gantry' ;
16- import { GetGeometriesRequest } from '../../gen/common/v1/common_pb' ;
16+ import { GetGeometriesRequest , GetKinematicsRequest , GetKinematicsResponse } from '../../gen/common/v1/common_pb' ;
1717
1818/**
1919 * A gRPC-web client for the Gantry component.
@@ -118,6 +118,25 @@ export class GantryClient implements Gantry {
118118 return resp . isMoving ;
119119 }
120120
121+ /**
122+ * Get the kinematics for the gantry.
123+ *
124+ * @param extra - Any additional parameters to send to the server.
125+ * @param callOptions - Options for the gRPC call.
126+ * @returns The kinematics for the gantry.
127+ */
128+ async getKinematics ( extra : JsonValue = { } , callOptions = this . callOptions ) : Promise < KinematicsFileFormat > {
129+ const request = new GetKinematicsRequest ( {
130+ name : this . name ,
131+ extra : Struct . fromJson ( extra ) ,
132+ } ) ;
133+
134+ this . options . requestLogger ?.( request ) ;
135+
136+ const resp = await this . client . getKinematics ( request , callOptions ) ;
137+ return resp . kinematicsFileFormat ! ;
138+ }
139+
121140 async doCommand (
122141 command : Struct ,
123142 callOptions = this . callOptions
0 commit comments