Package com.viam.common.v1
Class Common.GeoPose.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<Common.GeoPose,Common.GeoPose.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<Common.GeoPose,Common.GeoPose.Builder>
com.viam.common.v1.Common.GeoPose.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,Common.GeoPoseOrBuilder,Cloneable
- Enclosing class:
Common.GeoPose
public static final class Common.GeoPose.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<Common.GeoPose,Common.GeoPose.Builder>
implements Common.GeoPoseOrBuilder
GeoPose is a GPS position and orientation, optionally with altitude. Orientation is expressed in the east-north-up tangent frame at location: +X east, +Y north, +Z up. Viam base axes are +X right, +Y forward, and +Z up, so the identity orientation (o_x, o_y, o_z, theta) = (0, 0, 1, 0) is level and faces north: forward is north and right is east. The same rotation as an orientation vector is Viam's Tait-Bryan Euler sequence, intrinsic z-y'-x'' (yaw, then pitch, then roll), in degrees: - yaw: right-handed rotation about local up (+Z). Zero faces north. Positive yaw is counterclockwise viewed from above, so a compass heading in degrees clockwise from north is the negation of yaw. - pitch: right-handed rotation about the base's forward axis (+Y). - roll: right-handed rotation about the base's right axis (+X). With pitch 0, positive roll raises the forward axis; that angle is the elevation of forward above the local horizon. Exactly one of heading or orientation_vector is set. heading is only the compass yaw of a level pose (pitch 0, roll 0). It is not added to orientation_vector.Protobuf type
viam.common.v1.GeoPose-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescriptionOptional altitude in metersCompass heading in degrees, clockwise from north.Latitude and longitude in degreesFull orientation in the east-north-up tangent frame at location.doubleOptional altitude in metersdoubleCompass heading in degrees, clockwise from north.Latitude and longitude in degreesFull orientation in the east-north-up tangent frame at location.booleanOptional altitude in metersbooleanCompass heading in degrees, clockwise from north.booleanLatitude and longitude in degreesbooleanFull orientation in the east-north-up tangent frame at location.mergeLocation(Common.GeoPoint value) Latitude and longitude in degreesFull orientation in the east-north-up tangent frame at location.setAltitude(double value) Optional altitude in meterssetHeading(double value) Compass heading in degrees, clockwise from north.setLocation(Common.GeoPoint value) Latitude and longitude in degreessetLocation(Common.GeoPoint.Builder builderForValue) Latitude and longitude in degreesFull orientation in the east-north-up tangent frame at location.setOrientationVector(Common.Orientation.Builder builderForValue) Full orientation in the east-north-up tangent frame at location.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getOrientationCase
- Specified by:
getOrientationCasein interfaceCommon.GeoPoseOrBuilder
-
clearOrientation
-
hasLocation
public boolean hasLocation()Latitude and longitude in degrees
.viam.common.v1.GeoPoint location = 1 [json_name = "location"];- Specified by:
hasLocationin interfaceCommon.GeoPoseOrBuilder- Returns:
- Whether the location field is set.
-
getLocation
Latitude and longitude in degrees
.viam.common.v1.GeoPoint location = 1 [json_name = "location"];- Specified by:
getLocationin interfaceCommon.GeoPoseOrBuilder- Returns:
- The location.
-
setLocation
Latitude and longitude in degrees
.viam.common.v1.GeoPoint location = 1 [json_name = "location"]; -
setLocation
Latitude and longitude in degrees
.viam.common.v1.GeoPoint location = 1 [json_name = "location"]; -
mergeLocation
Latitude and longitude in degrees
.viam.common.v1.GeoPoint location = 1 [json_name = "location"]; -
clearLocation
Latitude and longitude in degrees
.viam.common.v1.GeoPoint location = 1 [json_name = "location"]; -
hasAltitude
public boolean hasAltitude()Optional altitude in meters
optional double altitude = 3 [json_name = "altitude"];- Specified by:
hasAltitudein interfaceCommon.GeoPoseOrBuilder- Returns:
- Whether the altitude field is set.
-
getAltitude
public double getAltitude()Optional altitude in meters
optional double altitude = 3 [json_name = "altitude"];- Specified by:
getAltitudein interfaceCommon.GeoPoseOrBuilder- Returns:
- The altitude.
-
setAltitude
Optional altitude in meters
optional double altitude = 3 [json_name = "altitude"];- Parameters:
value- The altitude to set.- Returns:
- This builder for chaining.
-
clearAltitude
Optional altitude in meters
optional double altitude = 3 [json_name = "altitude"];- Returns:
- This builder for chaining.
-
hasHeading
public boolean hasHeading()Compass heading in degrees, clockwise from north. Level pose: pitch 0, roll 0.
double heading = 2 [json_name = "heading"];- Specified by:
hasHeadingin interfaceCommon.GeoPoseOrBuilder- Returns:
- Whether the heading field is set.
-
getHeading
public double getHeading()Compass heading in degrees, clockwise from north. Level pose: pitch 0, roll 0.
double heading = 2 [json_name = "heading"];- Specified by:
getHeadingin interfaceCommon.GeoPoseOrBuilder- Returns:
- The heading.
-
setHeading
Compass heading in degrees, clockwise from north. Level pose: pitch 0, roll 0.
double heading = 2 [json_name = "heading"];- Parameters:
value- The heading to set.- Returns:
- This builder for chaining.
-
clearHeading
Compass heading in degrees, clockwise from north. Level pose: pitch 0, roll 0.
double heading = 2 [json_name = "heading"];- Returns:
- This builder for chaining.
-
hasOrientationVector
public boolean hasOrientationVector()Full orientation in the east-north-up tangent frame at location. o_x, o_y, o_z, theta in degrees, same orientation vector as Pose.
.viam.common.v1.Orientation orientation_vector = 4 [json_name = "orientationVector"];- Specified by:
hasOrientationVectorin interfaceCommon.GeoPoseOrBuilder- Returns:
- Whether the orientationVector field is set.
-
getOrientationVector
Full orientation in the east-north-up tangent frame at location. o_x, o_y, o_z, theta in degrees, same orientation vector as Pose.
.viam.common.v1.Orientation orientation_vector = 4 [json_name = "orientationVector"];- Specified by:
getOrientationVectorin interfaceCommon.GeoPoseOrBuilder- Returns:
- The orientationVector.
-
setOrientationVector
Full orientation in the east-north-up tangent frame at location. o_x, o_y, o_z, theta in degrees, same orientation vector as Pose.
.viam.common.v1.Orientation orientation_vector = 4 [json_name = "orientationVector"]; -
setOrientationVector
Full orientation in the east-north-up tangent frame at location. o_x, o_y, o_z, theta in degrees, same orientation vector as Pose.
.viam.common.v1.Orientation orientation_vector = 4 [json_name = "orientationVector"]; -
mergeOrientationVector
Full orientation in the east-north-up tangent frame at location. o_x, o_y, o_z, theta in degrees, same orientation vector as Pose.
.viam.common.v1.Orientation orientation_vector = 4 [json_name = "orientationVector"]; -
clearOrientationVector
Full orientation in the east-north-up tangent frame at location. o_x, o_y, o_z, theta in degrees, same orientation vector as Pose.
.viam.common.v1.Orientation orientation_vector = 4 [json_name = "orientationVector"];
-