Base API | Component APIs

Base API

The base API allows you to give commands to your base components for moving all configured components attached to a platform as a whole without needing to send commands to individual components.

The base component supports the following methods:

Method Name Description viam-micro-server Support
MoveStraight Move the base in a straight line across the given distance (mm) at the given velocity (mm/sec).
Spin Turn the base in place, rotating it to the given angle (degrees) at the given angular velocity (degrees/sec).
SetPower Set the linear and angular power of the base, represented as a percentage of max power for each direction in the range of [-1.0 to 1.0].
SetVelocity Set the linear velocity (mm/sec) and angular velocity (degrees/sec) of the base.
GetProperties Get the width and turning radius of the model of base in meters.
IsMoving Returns whether the base is actively moving (or attempting to move) under its own power.
Stop Stop the base from moving immediately.
GetGeometries Get all the geometries associated with the base in its current configuration, in the frame of the base.
Reconfigure Reconfigure this resource.
DoCommand Execute model-specific commands that are not otherwise defined by the component API.
GetResourceName Get the ResourceName for this base.
Close Safely shut down the resource and prevent further use.

API

MoveStraight

Move the base in a straight line across the given distance (mm) at the given velocity (mm/sec).

Parameters:

Returns:

Spin

Turn the base in place, rotating it to the given angle (degrees) at the given angular velocity (degrees/sec).

Parameters:

Returns:

SetPower

Set the linear and angular power of the base, represented as a percentage of max power for each direction in the range of [-1.0 to 1.0].

Parameters:

Returns:

SetVelocity

Set the linear velocity (mm/sec) and angular velocity (degrees/sec) of the base.

Parameters:

Returns:

GetProperties

Get the width and turning radius of the model of base in meters.

Parameters:

Returns:

IsMoving

Returns whether the base is actively moving (or attempting to move) under its own power.

Parameters:

Returns:

Stop

Stop the base from moving immediately.

Parameters:

Returns:

GetGeometries

Get all the geometries associated with the base in its current configuration, in the frame of the base.

Parameters:

Returns:

Reconfigure

Reconfigure this resource.

Parameters:

Returns:

DoCommand

Execute model-specific commands that are not otherwise defined by the component API.

Parameters:

Returns:

GetResourceName

Get the ResourceName for this base.

Parameters:

Returns:

Close

Safely shut down the resource and prevent further use.

Parameters:

Returns: