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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.protobuf.StructSend/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/secdoublegetCompassHeading(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, namedMethods inherited from class com.viam.sdk.core.resource.Resource
close, createStatus, getName, getSubtype, named
-
Constructor Details
-
MovementSensorRPCClient
-
-
Method Details
-
doCommand
Description copied from class:ResourceSend/Receive arbitrary commands to the Resource -
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
-
getLinearVelocity
Description copied from class:MovementSensorGet the current linear velocity as a Vector3 with x, y, and z axes represented in m/sec- Specified by:
getLinearVelocityin classMovementSensor- Returns:
- the Vector3 representation of the linear velocity in m/sec
-
getAngularVelocity
Description copied from class:MovementSensorGet the current angular velocity as a Vector3 with x, y, and z axes represented in degrees/sec- Specified by:
getAngularVelocityin classMovementSensor- Returns:
- The Vector3 representation of the angular velocity in degrees/sec
-
getCompassHeading
Description copied from class:MovementSensorGet the current compass heading in degrees- Specified by:
getCompassHeadingin classMovementSensor- Returns:
- the compass heading in degrees
-
getProperties
public Movementsensor.GetPropertiesResponse getProperties(Optional<com.google.protobuf.Struct> extra) Description copied from class:MovementSensorGet the supported properties of this sensor- Specified by:
getPropertiesin classMovementSensor- Returns:
- the Properties response
-
getAccuracy
Description copied from class:MovementSensorGet the accuracy of the various sensors- Specified by:
getAccuracyin classMovementSensor- Returns:
- the accuracies of the sensor
-
getLinearAcceleration
Description copied from class:MovementSensorGet the current linear acceleration as a Vector3 with x, y, and z axes represented in m/sec^2- Specified by:
getLinearAccelerationin classMovementSensor- Returns:
- the Vector3 representation of the linear acceleration in m/sec^2
-
getOrientation
Description copied from class:MovementSensorGet the current orientation- Specified by:
getOrientationin classMovementSensor- Returns:
- the orientation
-
getPosition
Description copied from class:MovementSensorGet the current GeoPoint (latitude, longitude) and altitude (m)- Specified by:
getPositionin classMovementSensor- Returns:
- the Position response
-
getReadings
public Map<String,com.google.protobuf.Value> getReadings(Optional<com.google.protobuf.Struct> extra) Description copied from class:MovementSensorObtain 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:
getReadingsin classMovementSensor- Returns:
- the readings for the MovementSensor
-