Class MovementSensorRPCClient
java.lang.Object
com.viam.sdk.core.resource.Resource
com.viam.sdk.core.component.Component
com.viam.sdk.core.component.movementsensor.MovementSensor
com.viam.sdk.core.component.movementsensor.MovementSensorRPCClient
gRPC Client for a MovementSensor component
-
Nested Class Summary
Nested classes/interfaces inherited from class com.viam.sdk.core.resource.Resource
Resource.Reconfigurable, Resource.Stoppable
-
Field Summary
Fields inherited from class com.viam.sdk.core.component.movementsensor.MovementSensor
SUBTYPE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.protobuf.Struct
Send/Receive arbitrary commands to the ResourcegetAccuracy
(Optional<com.google.protobuf.Struct> extra) Get the accuracy of the various sensorsgetAngularVelocity
(Optional<com.google.protobuf.Struct> extra) Get the current angular velocity as a Vector3 with x, y, and z axes represented in degrees/secdouble
getCompassHeading
(Optional<com.google.protobuf.Struct> extra) Get the current compass heading in degreesgetGeometries
(Optional<com.google.protobuf.Struct> extra) Get all geometries associated with the Component, in their current configuration, in the frame of the Component.getLinearAcceleration
(Optional<com.google.protobuf.Struct> extra) Get the current linear acceleration as a Vector3 with x, y, and z axes represented in m/sec^2getLinearVelocity
(Optional<com.google.protobuf.Struct> extra) Get the current linear velocity as a Vector3 with x, y, and z axes represented in m/secgetOrientation
(Optional<com.google.protobuf.Struct> extra) Get the current orientationgetPosition
(Optional<com.google.protobuf.Struct> extra) Get the current GeoPoint (latitude, longitude) and altitude (m)getProperties
(Optional<com.google.protobuf.Struct> extra) Get the supported properties of this sensorgetReadings
(Optional<com.google.protobuf.Struct> extra) Obtain the measurements/data specific to this sensor.Methods inherited from class com.viam.sdk.core.component.movementsensor.MovementSensor
fromRobot, named
Methods inherited from class com.viam.sdk.core.resource.Resource
close, createStatus, getName, getSubtype, named
-
Constructor Details
-
MovementSensorRPCClient
-
-
Method Details
-
doCommand
Description copied from class:Resource
Send/Receive arbitrary commands to the Resource -
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
-
getLinearVelocity
Description copied from class:MovementSensor
Get the current linear velocity as a Vector3 with x, y, and z axes represented in m/sec- Specified by:
getLinearVelocity
in classMovementSensor
- Returns:
- the Vector3 representation of the linear velocity in m/sec
-
getAngularVelocity
Description copied from class:MovementSensor
Get the current angular velocity as a Vector3 with x, y, and z axes represented in degrees/sec- Specified by:
getAngularVelocity
in classMovementSensor
- Returns:
- The Vector3 representation of the angular velocity in degrees/sec
-
getCompassHeading
Description copied from class:MovementSensor
Get the current compass heading in degrees- Specified by:
getCompassHeading
in classMovementSensor
- Returns:
- the compass heading in degrees
-
getProperties
public Movementsensor.GetPropertiesResponse getProperties(Optional<com.google.protobuf.Struct> extra) Description copied from class:MovementSensor
Get the supported properties of this sensor- Specified by:
getProperties
in classMovementSensor
- Returns:
- the Properties response
-
getAccuracy
Description copied from class:MovementSensor
Get the accuracy of the various sensors- Specified by:
getAccuracy
in classMovementSensor
- Returns:
- the accuracies of the sensor
-
getLinearAcceleration
Description copied from class:MovementSensor
Get the current linear acceleration as a Vector3 with x, y, and z axes represented in m/sec^2- Specified by:
getLinearAcceleration
in classMovementSensor
- Returns:
- the Vector3 representation of the linear acceleration in m/sec^2
-
getOrientation
Description copied from class:MovementSensor
Get the current orientation- Specified by:
getOrientation
in classMovementSensor
- Returns:
- the orientation
-
getPosition
Description copied from class:MovementSensor
Get the current GeoPoint (latitude, longitude) and altitude (m)- Specified by:
getPosition
in classMovementSensor
- Returns:
- the Position response
-
getReadings
public Map<String,com.google.protobuf.Value> getReadings(Optional<com.google.protobuf.Struct> extra) Description copied from class:MovementSensor
Obtain the measurements/data specific to this sensor. If a sensor is not configured to have a measurement or fails to read a piece of data, it will not appear in the readings dictionary.- Specified by:
getReadings
in classMovementSensor
- Returns:
- the readings for the MovementSensor
-