File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed 
src/components/pose-tracker Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,11 @@ import { type JsonValue, Struct } from '@bufbuild/protobuf';
22import  type  {  CallOptions ,  PromiseClient  }  from  '@connectrpc/connect' ; 
33import  {  PoseTrackerService  }  from  '../../gen/component/posetracker/v1/pose_tracker_connect' ; 
44import  type  {  RobotClient  }  from  '../../robot' ; 
5- import  type  {  Options  }  from  '../../types' ; 
5+ import  type  {  Options ,   PoseInFrame  }  from  '../../types' ; 
66import  {  doCommandFromClient  }  from  '../../utils' ; 
77import  type  {  PoseTracker  }  from  './pose-tracker' ; 
88import  {  GetGeometriesRequest  }  from  '../../gen/common/v1/common_pb' ; 
9+ import  {  GetPosesRequest  }  from  '../../gen/component/posetracker/v1/pose_tracker_pb' ; 
910
1011/** 
1112 * A gRPC-web client for the Generic component. 
@@ -46,4 +47,19 @@ export class PoseTrackerClient implements PoseTracker {
4647      callOptions 
4748    ) ; 
4849  } 
50+ 
51+   async  getPoses ( 
52+     bodyNames ?: string [ ] , 
53+     extra  =  { } , 
54+     callOptions  =  this . callOptions 
55+   )  { 
56+     const  request  =  new  GetPosesRequest ( { 
57+       name : this . name , 
58+       bodyNames, 
59+       extra : Struct . fromJson ( extra ) , 
60+     } ) ; 
61+ 
62+     const  response  =  await  this . client . getPoses ( request ,  callOptions ) ; 
63+     return  response . bodyPoses ; 
64+   } 
4965} 
Original file line number Diff line number Diff line change 1- import  type  {  Geometry  }  from  '../../gen/common/v1/common_pb' ; 
1+ import  type  {  Geometry ,   PoseInFrame  }  from  '../../gen/common/v1/common_pb' ; 
22import  type  {  Struct ,  Resource  }  from  '../../types' ; 
33
44/** Represents a generic component. */ 
@@ -23,4 +23,9 @@ export interface PoseTracker extends Resource {
2323   * API](https://docs.viam.com/dev/reference/apis/components/generic/#getgeometries). 
2424   */ 
2525  getGeometries : ( extra ?: Struct )  =>  Promise < Geometry [ ] > ; 
26+ 
27+   getPoses : ( 
28+     bodyNames ?: string [ ] , 
29+     extra ?: Struct 
30+   )  =>  Promise < Record < string ,  PoseInFrame > > ; 
2631} 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments