Class FaceComponent
Manage the state of the faces on the robot.
Implements
Inherited Members
Namespace: Anki.Vector
Assembly: Anki.Vector.dll
Syntax
public class FaceComponent : Component, INotifyPropertyChanged
Methods
| Improve this Doc View SourceCancelFaceEnrollment()
Cancels the face enrollment.
public Task<StatusCode> CancelFaceEnrollment()
Returns
| Type | Description |
|---|---|
| Task<StatusCode> | A task that represents the asynchronous operation; the task result contains the result from the robot. |
EnrollFace(String, Face, Boolean, Boolean, Boolean)
Enrolls face into the robot (untested)
public Task<StatusCode> EnrollFace(string name, Face faceToEnroll, bool saveToRobot = true, bool sayName = true, bool useMusic = true)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | The name. |
| Face | faceToEnroll | The specific observed face to enroll. |
| Boolean | saveToRobot | Save the robot's NVStorage when done (NOTE: will (re)save everyone enrolled!) |
| Boolean | sayName | Play say-name/celebration animations on success before completing |
| Boolean | useMusic | Starts special music during say-name animations (will leave music playing) |
Returns
| Type | Description |
|---|---|
| Task<StatusCode> | A task that represents the asynchronous operation; the task result contains the result from the robot. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | faceToEnroll |
EnrollFace(String, Boolean, Boolean, Boolean)
Enrolls face into the robot (untested)
public Task<StatusCode> EnrollFace(string name, bool saveToRobot = true, bool sayName = true, bool useMusic = true)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | The name of the person to enroll. |
| Boolean | saveToRobot | Save the robot's NVStorage when done (NOTE: will (re)save everyone enrolled!) |
| Boolean | sayName | Play say-name/celebration animations on success before completing |
| Boolean | useMusic | Starts special music during say-name animations (will leave music playing) |
Returns
| Type | Description |
|---|---|
| Task<StatusCode> | A task that represents the asynchronous operation; the task result contains the result from the robot. |
EnrollFace(String, Int32, Boolean, Boolean, Boolean)
Enrolls face into the robot (untested)
public Task<StatusCode> EnrollFace(string name, int observedFaceId, bool saveToRobot = true, bool sayName = true, bool useMusic = true)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | The name of the person to enroll. |
| Int32 | observedFaceId | The ID of a specific observed face to enroll (0 for next one we see) |
| Boolean | saveToRobot | Save the robot's NVStorage when done (NOTE: will (re)save everyone enrolled!) |
| Boolean | sayName | Play say-name/celebration animations on success before completing |
| Boolean | useMusic | Starts special music during say-name animations (will leave music playing) |
Returns
| Type | Description |
|---|---|
| Task<StatusCode> | A task that represents the asynchronous operation; the task result contains the result from the robot. |
EraseAllEnrolledFaces()
Erase the enrollment (name) records for all faces.
public Task<StatusCode> EraseAllEnrolledFaces()
Returns
| Type | Description |
|---|---|
| Task<StatusCode> | A task that represents the asynchronous operation; the task result contains the result from the robot. |
EraseEnrolledFace(KnownFace)
Erases the enrollment (name) record for the face.
public Task<StatusCode> EraseEnrolledFace(KnownFace face)
Parameters
| Type | Name | Description |
|---|---|---|
| KnownFace | face | The face. |
Returns
| Type | Description |
|---|---|
| Task<StatusCode> | A task that represents the asynchronous operation. The task result contains the result of the operation. |
EraseEnrolledFace(Int32)
Erases the enrollment (name) record for the face.
public Task<StatusCode> EraseEnrolledFace(int faceId)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | faceId | The face identifier. |
Returns
| Type | Description |
|---|---|
| Task<StatusCode> | A task that represents the asynchronous operation. The task result contains the result of the operation. |
GetEnrolledFaces()
Gets the enrolled faces.
public Task<IEnumerable<KnownFace>> GetEnrolledFaces()
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<KnownFace>> | A task that represents the asynchronous operation; the task result contains an enumeration of KnownFace instances. |
UpdateEnrolledFace(KnownFace, Face, Boolean, Boolean, Boolean)
Updates an existing enrolled face
public Task<StatusCode> UpdateEnrolledFace(KnownFace faceToUpdate, Face faceToEnroll, bool saveToRobot = true, bool sayName = true, bool useMusic = true)
Parameters
| Type | Name | Description |
|---|---|---|
| KnownFace | faceToUpdate | An existing face to merge final enrollment into. |
| Face | faceToEnroll | The specific observed face to enroll. |
| Boolean | saveToRobot | Save the robot's NVStorage when done (NOTE: will (re)save everyone enrolled!) |
| Boolean | sayName | Play say-name/celebration animations on success before completing |
| Boolean | useMusic | Starts special music during say-name animations (will leave music playing) |
Returns
| Type | Description |
|---|---|
| Task<StatusCode> | A task that represents the asynchronous operation; the task result contains the result from the robot. |
UpdateEnrolledFace(KnownFace, Boolean, Boolean, Boolean)
Updates an existing enrolled face
public Task<StatusCode> UpdateEnrolledFace(KnownFace faceToUpdate, bool saveToRobot = true, bool sayName = true, bool useMusic = true)
Parameters
| Type | Name | Description |
|---|---|---|
| KnownFace | faceToUpdate | An existing face to merge final enrollment into. |
| Boolean | saveToRobot | Save the robot's NVStorage when done (NOTE: will (re)save everyone enrolled!) |
| Boolean | sayName | Play say-name/celebration animations on success before completing |
| Boolean | useMusic | Starts special music during say-name animations (will leave music playing) |
Returns
| Type | Description |
|---|---|
| Task<StatusCode> | A task that represents the asynchronous operation; the task result contains the result from the robot. |
UpdateEnrolledFace(KnownFace, Int32, Boolean, Boolean, Boolean)
Updates an existing enrolled face
public Task<StatusCode> UpdateEnrolledFace(KnownFace faceToUpdate, int observedFaceId, bool saveToRobot = true, bool sayName = true, bool useMusic = true)
Parameters
| Type | Name | Description |
|---|---|---|
| KnownFace | faceToUpdate | An existing face to merge final enrollment into. |
| Int32 | observedFaceId | The ID of a specific observed face to enroll (0 for next one we see) |
| Boolean | saveToRobot | Save the robot's NVStorage when done (NOTE: will (re)save everyone enrolled!) |
| Boolean | sayName | Play say-name/celebration animations on success before completing |
| Boolean | useMusic | Starts special music during say-name animations (will leave music playing) |
Returns
| Type | Description |
|---|---|
| Task<StatusCode> | A task that represents the asynchronous operation; the task result contains the result from the robot. |
UpdateEnrolledFaceName(KnownFace, String)
Updates the name of the enrolled face.
public Task<StatusCode> UpdateEnrolledFaceName(KnownFace face, string newName)
Parameters
| Type | Name | Description |
|---|---|---|
| KnownFace | face | The face to rename. |
| String | newName | The new name. |
Returns
| Type | Description |
|---|---|
| Task<StatusCode> | A task that represents the asynchronous operation. The task result contains the result of the operation. |
UpdateEnrolledFaceName(Int32, String, String)
Updates the name of the enrolled face.
public Task<StatusCode> UpdateEnrolledFaceName(int faceId, string oldName, string newName)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | faceId | The ID of the face to rename. |
| String | oldName | The old name of the face (must be correct, otherwise message is ignored). |
| String | newName | The new name for the face. |
Returns
| Type | Description |
|---|---|
| Task<StatusCode> | A task that represents the asynchronous operation; the task result contains the result from the robot. |