11/* eslint-disable max-classes-per-file */
2- import { Duration , type ServiceType } from '@bufbuild/protobuf' ;
2+ import { type ServiceType } from '@bufbuild/protobuf' ;
33import {
44 createPromiseClient ,
55 type PromiseClient ,
@@ -26,17 +26,14 @@ import { RobotService } from '../gen/robot/v1/robot_connect';
2626import {
2727 DiscoveryQuery ,
2828 RestartModuleRequest ,
29- Status ,
3029 TransformPCDRequest ,
3130 TransformPoseRequest ,
3231} from '../gen/robot/v1/robot_pb' ;
3332import { MotionService } from '../gen/service/motion/v1/motion_connect' ;
3433import { NavigationService } from '../gen/service/navigation/v1/navigation_connect' ;
35- import { SensorsService } from '../gen/service/sensors/v1/sensors_connect' ;
3634import { SLAMService } from '../gen/service/slam/v1/slam_connect' ;
3735import { VisionService } from '../gen/service/vision/v1/vision_connect' ;
3836import { dialDirect , dialWebRTC , type DialOptions } from '../rpc' ;
39- import type { ResourceName } from '../types' ;
4037import { clientHeaders } from '../utils' ;
4138import GRPCConnectionManager from './grpc-connection-manager' ;
4239import type { Robot } from './robot' ;
@@ -140,10 +137,6 @@ export class RobotClient extends EventDispatcher implements Robot {
140137
141138 private visionServiceClient : PromiseClient < typeof VisionService > | undefined ;
142139
143- private sensorsServiceClient :
144- | PromiseClient < typeof SensorsService >
145- | undefined ;
146-
147140 private servoServiceClient : PromiseClient < typeof ServoService > | undefined ;
148141
149142 private slamServiceClient : PromiseClient < typeof SLAMService > | undefined ;
@@ -366,13 +359,6 @@ export class RobotClient extends EventDispatcher implements Robot {
366359 return this . visionServiceClient ;
367360 }
368361
369- get sensorsService ( ) {
370- if ( ! this . sensorsServiceClient ) {
371- throw new Error ( RobotClient . notConnectedYetStr ) ;
372- }
373- return this . sensorsServiceClient ;
374- }
375-
376362 get servoService ( ) {
377363 if ( ! this . servoServiceClient ) {
378364 throw new Error ( RobotClient . notConnectedYetStr ) ;
@@ -609,10 +595,6 @@ export class RobotClient extends EventDispatcher implements Robot {
609595 VisionService ,
610596 clientTransport
611597 ) ;
612- this . sensorsServiceClient = createPromiseClient (
613- SensorsService ,
614- clientTransport
615- ) ;
616598 this . servoServiceClient = createPromiseClient (
617599 ServoService ,
618600 clientTransport
@@ -737,30 +719,6 @@ export class RobotClient extends EventDispatcher implements Robot {
737719 return resp . resourceRpcSubtypes ;
738720 }
739721
740- // STATUS
741-
742- async getStatus ( resourceNames : ResourceName [ ] = [ ] ) {
743- const resp = await this . robotService . getStatus ( {
744- resourceNames,
745- } ) ;
746- return resp . status ;
747- }
748-
749- async * streamStatus (
750- resourceNames : ResourceName [ ] = [ ] ,
751- durationMs = 500
752- ) : AsyncIterable < Status [ ] > {
753- const stream = this . robotService . streamStatus ( {
754- resourceNames,
755- every : new Duration ( {
756- nanos : durationMs * 1e6 ,
757- } ) ,
758- } ) ;
759- for await ( const val of stream ) {
760- yield val . status ;
761- }
762- }
763-
764722 // MODULES
765723
766724 async restartModule ( moduleId ?: string , moduleName ?: string ) {
0 commit comments