Package com.viam.component.motor.v1
Interface MotorServiceGrpc.AsyncService
- All Known Implementing Classes:
MotorServiceGrpc.MotorServiceImplBase
- Enclosing class:
- MotorServiceGrpc
public static interface MotorServiceGrpc.AsyncService
A MotorService maintains all motors associated with a robot
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
doCommand
(Common.DoCommandRequest request, io.grpc.stub.StreamObserver<Common.DoCommandResponse> responseObserver) DoCommand sends/receives arbitrary commandsdefault void
getGeometries
(Common.GetGeometriesRequest request, io.grpc.stub.StreamObserver<Common.GetGeometriesResponse> responseObserver) GetGeometries returns the geometries of the component in their current configurationdefault void
getPosition
(Motor.GetPositionRequest request, io.grpc.stub.StreamObserver<Motor.GetPositionResponse> responseObserver) Position reports the position of the robot's motor relative to its zero position This method will return an error if position reporting is not supporteddefault void
getProperties
(Motor.GetPropertiesRequest request, io.grpc.stub.StreamObserver<Motor.GetPropertiesResponse> responseObserver) GetProperties returns a message of booleans indicating which optional features the robot's motor supportsdefault void
goFor
(Motor.GoForRequest request, io.grpc.stub.StreamObserver<Motor.GoForResponse> responseObserver) GoFor instructs the motor to turn at a specified speed, which is expressed in RPM, for a specified number of rotations relative to its starting position This method will return an error if position reporting is not supported If revolutions != 0, this will block until the number of revolutions has been completed or another operation comes in.default void
goTo
(Motor.GoToRequest request, io.grpc.stub.StreamObserver<Motor.GoToResponse> responseObserver) GoTo requests the robot's motor to move to a specific position that is relative to its home position at a specified speed which is expressed in RPM This method will return an error if position reporting is not supporteddefault void
isMoving
(Motor.IsMovingRequest request, io.grpc.stub.StreamObserver<Motor.IsMovingResponse> responseObserver) IsMoving reports if a component is in motiondefault void
isPowered
(Motor.IsPoweredRequest request, io.grpc.stub.StreamObserver<Motor.IsPoweredResponse> responseObserver) IsPowered returns true if the robot's motor is ondefault void
resetZeroPosition
(Motor.ResetZeroPositionRequest request, io.grpc.stub.StreamObserver<Motor.ResetZeroPositionResponse> responseObserver) ResetZeroPosition sets the current position of the motor as the new zero position This method will return an error if position reporting is not supporteddefault void
setPower
(Motor.SetPowerRequest request, io.grpc.stub.StreamObserver<Motor.SetPowerResponse> responseObserver) SetPower sets the percentage of the motor's total power that should be employed expressed a value between -1 and 1 where negative values indicate a backwards direction and positive values a forward directiondefault void
setRPM
(Motor.SetRPMRequest request, io.grpc.stub.StreamObserver<Motor.SetRPMResponse> responseObserver) SetRPM instructs the motor to move at the specified RPM indefinitely.default void
stop
(Motor.StopRequest request, io.grpc.stub.StreamObserver<Motor.StopResponse> responseObserver) Stop turns the robot's motor off
-
Method Details
-
setPower
default void setPower(Motor.SetPowerRequest request, io.grpc.stub.StreamObserver<Motor.SetPowerResponse> responseObserver) SetPower sets the percentage of the motor's total power that should be employed expressed a value between -1 and 1 where negative values indicate a backwards direction and positive values a forward direction
-
goFor
default void goFor(Motor.GoForRequest request, io.grpc.stub.StreamObserver<Motor.GoForResponse> responseObserver) GoFor instructs the motor to turn at a specified speed, which is expressed in RPM, for a specified number of rotations relative to its starting position This method will return an error if position reporting is not supported If revolutions != 0, this will block until the number of revolutions has been completed or another operation comes in. Deprecated: If revolutions is 0, this will run the motor at rpm indefinitely.
-
goTo
default void goTo(Motor.GoToRequest request, io.grpc.stub.StreamObserver<Motor.GoToResponse> responseObserver) GoTo requests the robot's motor to move to a specific position that is relative to its home position at a specified speed which is expressed in RPM This method will return an error if position reporting is not supported
-
setRPM
default void setRPM(Motor.SetRPMRequest request, io.grpc.stub.StreamObserver<Motor.SetRPMResponse> responseObserver) SetRPM instructs the motor to move at the specified RPM indefinitely.
-
resetZeroPosition
default void resetZeroPosition(Motor.ResetZeroPositionRequest request, io.grpc.stub.StreamObserver<Motor.ResetZeroPositionResponse> responseObserver) ResetZeroPosition sets the current position of the motor as the new zero position This method will return an error if position reporting is not supported
-
getPosition
default void getPosition(Motor.GetPositionRequest request, io.grpc.stub.StreamObserver<Motor.GetPositionResponse> responseObserver) Position reports the position of the robot's motor relative to its zero position This method will return an error if position reporting is not supported
-
getProperties
default void getProperties(Motor.GetPropertiesRequest request, io.grpc.stub.StreamObserver<Motor.GetPropertiesResponse> responseObserver) GetProperties returns a message of booleans indicating which optional features the robot's motor supports
-
stop
default void stop(Motor.StopRequest request, io.grpc.stub.StreamObserver<Motor.StopResponse> responseObserver) Stop turns the robot's motor off
-
isPowered
default void isPowered(Motor.IsPoweredRequest request, io.grpc.stub.StreamObserver<Motor.IsPoweredResponse> responseObserver) IsPowered returns true if the robot's motor is on
-
isMoving
default void isMoving(Motor.IsMovingRequest request, io.grpc.stub.StreamObserver<Motor.IsMovingResponse> responseObserver) IsMoving reports if a component is in motion
-
doCommand
default void doCommand(Common.DoCommandRequest request, io.grpc.stub.StreamObserver<Common.DoCommandResponse> responseObserver) DoCommand sends/receives arbitrary commands
-
getGeometries
default void getGeometries(Common.GetGeometriesRequest request, io.grpc.stub.StreamObserver<Common.GetGeometriesResponse> responseObserver) GetGeometries returns the geometries of the component in their current configuration
-