Class Pose
Represents where an object is in the world.
Whenever Vector is delocalized (i.e.whenever Vector no longer knows where he is - e.g.when he's picked up), Vector creates a new pose starting at (0,0,0) with no rotation, with origin_id incremented to show that these poses cannot be compared with earlier ones. As Vector drives around, his pose (and the pose of other objects he observes - e.g.faces, his LightCube, charger, etc.) is relative to this initial position and orientation.
The coordinate space is relative to Vector, where Vector's origin is the point on the ground between Vector's two front wheels. The X axis is Vector's forward direction, the Y axis is to Vector's left, and the Z axis is up.
Only poses of the same origin can safely be compared or operated on.
Implements
Namespace: Anki.Vector.Types
Assembly: Anki.Vector.dll
Syntax
public class Pose : IEquatable<Pose>
Constructors
| Improve this Doc View SourcePose()
Initializes a new instance of the Pose class.
public Pose()
Pose(Position, Quaternion, Nullable<UInt32>)
Initializes a new instance of the Pose class.
public Pose(Position position, Quaternion rotation, uint? originId)
Parameters
Type | Name | Description |
---|---|---|
Position | position | The position. |
Quaternion | rotation | The rotation. |
Nullable<UInt32> | originId | The origin identifier. |
Properties
| Improve this Doc View SourceIsValid
Returns true if this Pose is valid.
public bool IsValid { get; }
Property Type
Boolean |
OriginId
Gets the origin identifier.
public uint? OriginId { get; }
Property Type
Nullable<UInt32> |
Position
Gets the position component of this pose.
public Position Position { get; }
Property Type
Position |
Rotation
Gets the rotation component of this pose.
public Quaternion Rotation { get; }
Property Type
Quaternion |
Methods
| Improve this Doc View SourceEquals(Pose)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Pose other)
Parameters
Type | Name | Description |
---|---|---|
Pose | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
Boolean | true if the current object is equal to the |
Equals(Object)
Determines whether the specified Object, is equal to this instance.
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The Object to compare with this instance. |
Returns
Type | Description |
---|---|
Boolean |
|
Overrides
| Improve this Doc View SourceGetHashCode()
Returns a hash code for this instance.
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
| Improve this Doc View SourceIsComparable(Pose)
Checks whether these two poses are comparable. Poses are comparable if they have the same origin.
public bool IsComparable(Pose other)
Parameters
Type | Name | Description |
---|---|---|
Pose | other | The other pose to compare against. |
Returns
Type | Description |
---|---|
Boolean |
|
RelativeToThis(Pose)
Creates a new pose such that newPose's origin is now at the location of this pose.
public Pose RelativeToThis(Pose newPose)
Parameters
Type | Name | Description |
---|---|---|
Pose | newPose | The pose which origin is being changed. |
Returns
Type | Description |
---|---|
Pose | A new pose relative to this pose |
ToString()
Converts to string.
public override string ToString()
Returns
Type | Description |
---|---|
String | A String that represents this instance. |
Overrides
Operators
| Improve this Doc View SourceEquality(Pose, Pose)
Implements the operator ==.
public static bool operator ==(Pose lhs, Pose rhs)
Parameters
Type | Name | Description |
---|---|---|
Pose | lhs | The LHS. |
Pose | rhs | The RHS. |
Returns
Type | Description |
---|---|
Boolean | The result of the operator. |
Inequality(Pose, Pose)
Implements the operator !=.
public static bool operator !=(Pose lhs, Pose rhs)
Parameters
Type | Name | Description |
---|---|---|
Pose | lhs | The LHS. |
Pose | rhs | The RHS. |
Returns
Type | Description |
---|---|
Boolean | The result of the operator. |