Struct ProximitySensorData
A distance sample from the time-of-flight sensor with metadata describing reliability of the measurement
The proximity sensor is located near the bottom of Vector between the two front wheels, facing forward.The reported distance describes how far in front of this sensor the robot feels an obstacle is. The sensor estimates based on time-of-flight information within a field of view which the engine resolves to a certain quality value.
Four additional flags are supplied by the engine to indicate whether this proximity data is considered valid for the robot’s internal path finding. Respecting these is optional, but will help your code respect the behavior of the robot’s innate object avoidance.
Implements
Namespace: Anki.Vector
Assembly: Anki.Vector.dll
Syntax
public struct ProximitySensorData : IEquatable<ProximitySensorData>
Properties
| Improve this Doc View SourceDistanceMm
Gets the distance between the sensor and a detected object
public uint DistanceMm { get; }
Property Type
UInt32 |
FoundObject
Gets a value indicating whether the sensor detected an object in the valid operating range.
public bool FoundObject { get; }
Property Type
Boolean |
IsLiftInFov
Gets a value indicating whether Vector’s lift is blocking the time-of-flight sensor. While the lift will send clear proximity signals, it’s not useful for object detection.
public bool IsLiftInFov { get; }
Property Type
Boolean |
SignalQuality
Gets the quality of the detected object. The proximity sensor detects obstacles within a given field of view, this value represents the likelihood of the reported distance being a solid surface.
public float SignalQuality { get; }
Property Type
Single |
Unobstructed
Gets a value indicating whether the sensor has confirmed it has not detected anything up to its max range.
public bool Unobstructed { get; }
Property Type
Boolean |
Methods
| Improve this Doc View SourceEquals(ProximitySensorData)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ProximitySensorData other)
Parameters
Type | Name | Description |
---|---|---|
ProximitySensorData | 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 SourceToString()
Converts to string.
public override string ToString()
Returns
Type | Description |
---|---|
String | A String that represents this instance. |
Overrides
Operators
| Improve this Doc View SourceEquality(ProximitySensorData, ProximitySensorData)
Implements the operator ==.
public static bool operator ==(ProximitySensorData lhs, ProximitySensorData rhs)
Parameters
Type | Name | Description |
---|---|---|
ProximitySensorData | lhs | The LHS. |
ProximitySensorData | rhs | The RHS. |
Returns
Type | Description |
---|---|
Boolean | The result of the operator. |
Inequality(ProximitySensorData, ProximitySensorData)
Implements the operator !=.
public static bool operator !=(ProximitySensorData lhs, ProximitySensorData rhs)
Parameters
Type | Name | Description |
---|---|---|
ProximitySensorData | lhs | The LHS. |
ProximitySensorData | rhs | The RHS. |
Returns
Type | Description |
---|---|
Boolean | The result of the operator. |