Namespace Anki.Vector
Classes
AnimationComponent
Animation related classes, functions, events and values.
Animations represent a sequence of highly coordinated movements, faces, lights, and sounds used to demonstrate an emotion or reaction.
Animations can control the following tracks: head, lift, treads, face, audio and backpack lights.
There are two ways to play an animation on Vector: PlayAnimation(Animation, UInt32, Boolean, Boolean, Boolean) and PlayAnimationTrigger(AnimationTrigger, UInt32, Boolean, Boolean, Boolean, Boolean). For PlayAnimationTrigger, you select a pre-defined group of animations, and the robot will choose which animation from the group to run when you execute the method. When calling PlayAnimation, you select the specific animation you want the robot to run. We advise you to use PlayAnimationTrigger instead of PlayAnimation, since individual animations can be deleted between Vector OS versions.
By default, when an SDK program starts, the SDK will request a list of known animation triggers and animations from the robot, which will be loaded and available from GetAnimationTriggers() and GetAnimations(), respectively.AudioComponent
Support for Vector’s speakers
Vector's speakers can be used for playing user-provided audio. You can use the PlayStream(Stream, UInt32, UInt32) method to play a stream of 16bit mono audio data.
Authentication
This static class for logging into Vector and creating RobotConfiguration instances for connecting to a Vector robot.
The Login(String, String, String, String, IPAddress) method is the best way to use this class; provide all the necessary parameters and that method will retrieve the certificate, login to Anki's server, login to Vector, and return a RobotConfiguration instance that be stored and used to connect to Vector.
The remaining methods in this class can be used to retrieve each piece of connection information separately
BehaviorComponent
Behavior related classes and functions.
Behaviors represent a complex task which requires Vector’s internal logic to determine how long it will take.This may include combinations of animation, path planning or other functionality.
For commands such as GoToPose(Pose, Boolean, Int32), DriveOnCharger() and DockWithCube(LightCube, Nullable<Single>, AlignmentType, Single, Int32), Vector uses path planning, which refers to the problem of navigating the robot from point A to B without collisions. Vector loads known obstacles from his map, creates a path to navigate around those objects, then starts following the path. If a new obstacle is found while following the path, a new plan may be created.
CameraComponent
Support for Vector’s camera.
Vector has a built-in camera which he uses to observe the world around him. You can start receiving camera images from Vector by calling the StartFeed() method. The ImageReceived event will be raised for each frame received. Although there is an ImageEncoding property, the data received from Vector is always in the color JPEG format.
The camera resolution is 1280 x 720 with a field of view of 90 deg (H) x 50 deg (V).
Capabilities
Features supported by the current robot firmware.
Component
Abstract base class for components.
ControlComponent
Management of the control of Vector's behaviors.
When you connect to Vector with this SDK he will behave normally. Taking control of Vector will disable his internal behaviors (driving around autonomously, responding to voice commands, etc). You are required to take control of Vector in order to execute commands that move Vector or provide other output.
Call the RequestControl(Int32) method to request control of Vector and ReleaseControl() to release control. Unless you use priority level OverrideBehaviors Vector will regain control automatically if he senses an edge or runs low on battery. You can subscribe to the ControlGranted and ControlLost events to get feedback on when you have acquired or lost control.
EventComponent
Event handlers to subscribe to robot events.
FaceComponent
Manage the state of the faces on the robot.
MotorComponent
Controls the low-level motor functions.
NavMapComponent
Represents Vector's navigation memory map.
The NavMapComponent object subscribes for nav memory map updates from the robot to store and dispatch.
PhotoComponent
Access the photos on Vector.
ReserveBehaviorControl
A ReserveBehaviorControl object can be used to suppress the ordinary idle behaviors of the Robot and keep Vector still between SDK control instances.
Care must be taken when blocking background behaviors, as this may make Vector appear non-responsive.
As long as this object is not disposed, background behaviors will not activate, keeping Vector still while other SDK scripts may take control. Highest-level behaviors like returning to the charger due to low battery will still activate.
If there is a need to keep background behaviors from activating in a single script, the class may be used to reserve behavior control while in scope.
Robot
The main robot class for managing Vector.
The Robot object is responsible for managing the state and connections to a Vector, and is typically the entry-point to running the SDK.
RobotConfiguration
The robot configuration information
RobotObject
Abstract base class for all robot owned objects.
ScreenComponent
Manage the state of the faces on the robot.
StimulationInfo
Vector stimulation info
VisionComponent
Utility methods for Vector’s vision
Vector’s can detect various types of objects through his camera feed.
WorldComponent
Vector’s known view of his world.
This view includes objects and faces it knows about and can currently see with its camera.
Structs
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.
RobotStatus
Robot Status class and exposed properties for Vector’s various states.
TouchSensorData
A touch sample from the capacitive touch sensor, accompanied with the robot’s conclusion on whether this is considered a valid touch.
Interfaces
IRemoteRobotConfiguration
Robot configuration information for remote (over the Internet) connections. This structure does not include IP address, instead it has a RemoteHost property which can contain an IP address or hostname and optionally include the port to connect with.
IRobotConfiguration
Robot configuration information
Enums
AlignmentType
Which part of the robot to align with an object.
ControlPriority
Vector control priority level
DriveDirection
The drive direction (forwards or backwards)
MasterVolumeLevel
Use these values for setting the master audio volume. See SetMasterVolume(MasterVolumeLevel).
MotorSpeed
The speed of the motors for drive and move
MoveDirection
The direction for moving head or lift (up, down)
PlaybackResult
The playback result
TurnDirection
The drive turn direction (left, right)