Class ServoRPCClient
java.lang.Object
com.viam.sdk.core.resource.Resource
com.viam.sdk.core.component.Component
com.viam.sdk.core.component.servo.Servo
com.viam.sdk.core.component.servo.ServoRPCClient
-
Nested Class Summary
Nested classes/interfaces inherited from class com.viam.sdk.core.resource.Resource
Resource.Reconfigurable, Resource.Stoppable
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.protobuf.Struct
Send/Receive arbitrary commands to the ResourcegetGeometries
(Optional<com.google.protobuf.Struct> extra) Get all geometries associated with the Component, in their current configuration, in the frame of the Component.int
getPosition
(com.google.protobuf.Struct extra) Get the current angle (degrees) of the servo.boolean
isMoving()
Get if the servo is currently moving.void
move
(int angle, com.google.protobuf.Struct extra) Move the servo to the provided angle.void
stop
(com.google.protobuf.Struct extra) Stop the servo.Methods inherited from class com.viam.sdk.core.component.servo.Servo
fromRobot, getPosition, move, named, stop
Methods inherited from class com.viam.sdk.core.resource.Resource
close, createStatus, getName, getSubtype, named
-
Constructor Details
-
ServoRPCClient
-
-
Method Details
-
doCommand
Description copied from class:Resource
Send/Receive arbitrary commands to the Resource -
move
public void move(int angle, com.google.protobuf.Struct extra) Description copied from class:Servo
Move the servo to the provided angle. -
getPosition
public int getPosition(com.google.protobuf.Struct extra) Description copied from class:Servo
Get the current angle (degrees) of the servo.- Specified by:
getPosition
in classServo
- Returns:
- the current angle of the servo in degrees
-
stop
public void stop(com.google.protobuf.Struct extra) Description copied from class:Servo
Stop the servo. It is assumed that the servo stops immediately. -
isMoving
public boolean isMoving()Description copied from class:Servo
Get if the servo is currently moving. -
getGeometries
Description copied from class:Component
Get all geometries associated with the Component, in their current configuration, in the frame of the Component.- Overrides:
getGeometries
in classComponent
- Returns:
- the geometries associated with the Component
-