Class LightCube
Represents Vector’s Cube.
The LightCube object has four LEDs that Vector can actively manipulate and communicate with.
As Vector drives around, he uses the position of objects that he recognizes, including his cube, to localize himself, taking note of the Pose of the objects.
You can subscribe to cube events including ObjectTapped, ObjectAppeared, and ObjectDisappeared.
Vector supports 1 LightCube.
Implements
Inherited Members
Namespace: Anki.Vector.Objects
Assembly: Anki.Vector.dll
Syntax
public class LightCube : ObjectWithId, INotifyPropertyChanged
Properties
| Improve this Doc View SourceFactoryId
Gets the unique hardware id of the physical cube.
public string FactoryId { get; }
Property Type
String |
IsConnected
Gets a value indicating whether the cube is currently connected to the robot.
public bool IsConnected { get; }
Property Type
Boolean |
IsMoving
Gets a value indicating whether the cube’s accelerometer indicates that the cube is moving.
public bool IsMoving { get; }
Property Type
Boolean |
LastMovedStartTime
Gets the time the object most recently started moving
public DateTime LastMovedStartTime { get; }
Property Type
DateTime |
LastMovedStartTimestamp
Gets the time the object most recently started moving in robot time.
public uint LastMovedStartTimestamp { get; }
Property Type
UInt32 |
LastMovedTime
Gets the time the object was last moved.
public DateTime LastMovedTime { get; }
Property Type
DateTime |
LastMovedTimestamp
Gets the last moved robot timestamp.
public uint LastMovedTimestamp { get; }
Property Type
UInt32 |
LastTappedTime
Gets the time the object was last tapped
public DateTime LastTappedTime { get; }
Property Type
DateTime |
LastTappedTimestamp
Gets the robot timestamp when the object was last tapped
public uint LastTappedTimestamp { get; }
Property Type
UInt32 |
LastUpAxisTime
Gets the time the object’s orientation last changed
public DateTime LastUpAxisTime { get; }
Property Type
DateTime |
LastUpAxisTimestamp
Gets the robot timestamp when the object’s orientation last changed
public uint LastUpAxisTimestamp { get; }
Property Type
UInt32 |
ObjectTypeName
Gets the name of the object type.
public override string ObjectTypeName { get; }
Property Type
String |
Overrides
| Improve this Doc View SourceTopFaceOrientationRad
Gets the angular distance from the current reported up axis.
public float TopFaceOrientationRad { get; }
Property Type
Single |
UpAxis
Gets the object’s up_axis value from the last time it changed.
public UpAxis UpAxis { get; }
Property Type
UpAxis |
Methods
| Improve this Doc View SourceSetLightCorners(Light)
Set the light for all corners.
public Task<StatusCode> SetLightCorners(Light light)
Parameters
Type | Name | Description |
---|---|---|
Light | light | The settings for all the lights. |
Returns
Type | Description |
---|---|
Task<StatusCode> | A task that represents the asynchronous operation; the task result contains the result from the function. |
SetLightCorners(Light, Light, Light, Light)
Set the light for each corner.
public Task<StatusCode> SetLightCorners(Light light1, Light light2, Light light3, Light light4)
Parameters
Type | Name | Description |
---|---|---|
Light | light1 | The settings for the first light. |
Light | light2 | The settings for the second light. |
Light | light3 | The settings for the third light. |
Light | light4 | The settings for the fourth light. |
Returns
Type | Description |
---|---|
Task<StatusCode> | A task that represents the asynchronous operation; the task result contains the result from the function. |
SetLightCorners(Light, Light, Light, Light, ColorProfile, Boolean)
Set the light for each corner.
public Task<StatusCode> SetLightCorners(Light light1, Light light2, Light light3, Light light4, ColorProfile colorProfile, bool rotate = false)
Parameters
Type | Name | Description |
---|---|---|
Light | light1 | The settings for the first light. |
Light | light2 | The settings for the second light. |
Light | light3 | The settings for the third light. |
Light | light4 | The settings for the fourth light. |
ColorProfile | colorProfile | The color profile for the cube lights. |
Boolean | rotate | if set to |
Returns
Type | Description |
---|---|
Task<StatusCode> | A task that represents the asynchronous operation; the task result contains the result from the function. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | light1 or light2 or light3 or light4 |
SetLightsOff()
Set all lights off on the cube
public Task<StatusCode> SetLightsOff()
Returns
Type | Description |
---|---|
Task<StatusCode> | A task that represents the asynchronous operation; the task result contains the result from the function. |