Interface MovementSensor

Represents any sensor that reports information about the robot's direction, position, and/or speed.

interface MovementSensor {
    doCommand: ((command) => Promise<StructType>);
    getAccuracy(extra?): Promise<movementSensorApi.GetAccuracyResponse.AsObject>;
    getAngularVelocity(extra?): Promise<commonApi.Vector3.AsObject>;
    getCompassHeading(extra?): Promise<number>;
    getLinearAcceleration(extra?): Promise<commonApi.Vector3.AsObject>;
    getLinearVelocity(extra?): Promise<commonApi.Vector3.AsObject>;
    getOrientation(extra?): Promise<commonApi.Orientation.AsObject>;
    getPosition(extra?): Promise<movementSensorApi.GetPositionResponse.AsObject>;
    getProperties(extra?): Promise<movementSensorApi.GetPropertiesResponse.AsObject>;
    getReadings(extra?): Promise<Record<string, unknown>>;
}

Hierarchy (view full)

Implemented by

Properties

doCommand: ((command) => Promise<StructType>)

Send/Receive arbitrary commands to the resource.

Type declaration

Methods

  • Get the compass heading, which is a number from 0-359 where 0 is North, 90 is East, 180 is South, and 270 is West

    Parameters

    Returns Promise<number>

  • Return the readings of a sensor.

    Parameters

    Returns Promise<Record<string, unknown>>

Generated using TypeDoc