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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.protobuf.StructSend/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.intgetPosition(com.google.protobuf.Struct extra) Get the current angle (degrees) of the servo.booleanisMoving()Get if the servo is currently moving.voidmove(int angle, com.google.protobuf.Struct extra) Move the servo to the provided angle.voidstop(com.google.protobuf.Struct extra) Stop the servo.Methods inherited from class com.viam.sdk.core.component.servo.Servo
fromRobot, getPosition, move, named, stopMethods inherited from class com.viam.sdk.core.resource.Resource
close, createStatus, getName, getSubtype, named
-
Constructor Details
-
ServoRPCClient
-
-
Method Details
-
doCommand
Description copied from class:ResourceSend/Receive arbitrary commands to the Resource -
move
public void move(int angle, com.google.protobuf.Struct extra) Description copied from class:ServoMove the servo to the provided angle. -
getPosition
public int getPosition(com.google.protobuf.Struct extra) Description copied from class:ServoGet the current angle (degrees) of the servo.- Specified by:
getPositionin classServo- Returns:
- the current angle of the servo in degrees
-
stop
public void stop(com.google.protobuf.Struct extra) Description copied from class:ServoStop the servo. It is assumed that the servo stops immediately. -
isMoving
public boolean isMoving()Description copied from class:ServoGet if the servo is currently moving. -
getGeometries
Description copied from class:ComponentGet all geometries associated with the Component, in their current configuration, in the frame of the Component.- Overrides:
getGeometriesin classComponent- Returns:
- the geometries associated with the Component
-