.NET SDK Documentation

    Show / Hide Table of Contents

    Class MotorComponent

    Controls the low-level motor functions.

    Inheritance
    Object
    RobotObject
    Component
    MotorComponent
    Implements
    INotifyPropertyChanged
    Inherited Members
    RobotObject.PropertyChanged
    Namespace: Anki.Vector
    Assembly: Anki.Vector.dll
    Syntax
    public class MotorComponent : Component, INotifyPropertyChanged

    Methods

    | Improve this Doc View Source

    Drive(DriveDirection, TurnDirection, MotorSpeed)

    Drives Vector based on direction and speed

    public Task<StatusCode> Drive(DriveDirection driveDirection, TurnDirection turnDirection, MotorSpeed speed = MotorSpeed.Medium)
    Parameters
    Type Name Description
    DriveDirection driveDirection

    The drive direction.

    TurnDirection turnDirection

    The turn direction.

    MotorSpeed speed

    The speed.

    Returns
    Type Description
    Task<StatusCode>

    A task that represents the asynchronous operation; the task result contains the result from the robot.

    Remarks

    Requires behavior control; see RequestControl(Int32).

    | Improve this Doc View Source

    MoveHead(MoveDirection, MotorSpeed)

    Moves the head based on direction and speed

    public Task<StatusCode> MoveHead(MoveDirection moveDirection, MotorSpeed speed = MotorSpeed.Medium)
    Parameters
    Type Name Description
    MoveDirection moveDirection

    The move direction.

    MotorSpeed speed

    The speed.

    Returns
    Type Description
    Task<StatusCode>

    A task that represents the asynchronous operation; the task result contains the result from the robot.

    Remarks

    Requires behavior control; see RequestControl(Int32).

    | Improve this Doc View Source

    MoveLift(MoveDirection, MotorSpeed)

    Moves the lift based on direction and speed

    public Task<StatusCode> MoveLift(MoveDirection moveDirection, MotorSpeed speed = MotorSpeed.Medium)
    Parameters
    Type Name Description
    MoveDirection moveDirection

    The move direction.

    MotorSpeed speed

    The speed.

    Returns
    Type Description
    Task<StatusCode>

    A task that represents the asynchronous operation.

    Remarks

    Requires behavior control; see RequestControl(Int32).

    | Improve this Doc View Source

    SetHeadMotor(Single)

    Tell Vector’s head motor to move with a certain speed. Positive speed for up, negative speed for down. To unlock the head track call with speed of zero (0).

    public Task<StatusCode> SetHeadMotor(float speed)
    Parameters
    Type Name Description
    Single speed

    Motor speed for Vector’s head, measured in radians per second.

    Returns
    Type Description
    Task<StatusCode>

    A task that represents the asynchronous operation; the task result contains the result from the robot.

    Remarks

    Requires behavior control; see RequestControl(Int32).

    | Improve this Doc View Source

    SetLiftMotor(Single)

    Tell Vector’s lift motor to move with a certain speed. Positive speed for up, negative speed for down. To unlock the lift track call with speed of zero (0).

    public Task<StatusCode> SetLiftMotor(float speed)
    Parameters
    Type Name Description
    Single speed

    Motor speed for Vector’s lift, measured in radians per second.

    Returns
    Type Description
    Task<StatusCode>

    A task that represents the asynchronous operation; the task result contains the result from the robot.

    Remarks

    Requires behavior control; see RequestControl(Int32).

    | Improve this Doc View Source

    SetWheelMotors(Single, Single, Single, Single)

    Tell Vector to move his wheels / treads at a given speed. The wheels will continue to move at that speed until commanded to drive at a new speed. To unlock the wheel track set all speeds to zero (0).

    public Task<StatusCode> SetWheelMotors(float leftWheelSpeed, float rightWheelSpeed, float leftWheelAccel = 0F, float rightWheelAccel = 0F)
    Parameters
    Type Name Description
    Single leftWheelSpeed

    Speed of the left tread (in millimeters per second)

    Single rightWheelSpeed

    Speed of the right tread (in millimeters per second)

    Single leftWheelAccel

    Acceleration of left tread (in millimeters per second squared)

    Single rightWheelAccel

    Acceleration of right tread (in millimeters per second squared)

    Returns
    Type Description
    Task<StatusCode>

    A task that represents the asynchronous operation; the task result contains the result from the robot.

    Remarks

    Requires behavior control; see RequestControl(Int32).

    | Improve this Doc View Source

    StopAllMotors()

    Tell Vector to stop all motors.

    public Task<StatusCode> StopAllMotors()
    Returns
    Type Description
    Task<StatusCode>

    A task that represents the asynchronous operation; the task result contains the result from the robot.

    Remarks

    Requires behavior control; see RequestControl(Int32).

    Implements

    System.ComponentModel.INotifyPropertyChanged
    • Improve this Doc
    • View Source
    Back to top Copyright (c) 2019 by Wayne Venables