Generic Motor

Microsoft Robotics

Glossary Item Box

Microsoft Robotics Developer StudioSend feedback on this topic

Generic Motor

Generic Motor

The Generic Motor service enables you control a single motor (and access its state). This is different than the Generic Differential Drive service which coordinates two motor services (typically for driving a robot).

This service provides the following operations, but only as requests. Notifications for a motor's state generally require an encoder service.

GetReturns the entire state of the motor.
MotorReplaceChanges the state of the motor.
SetMotorPowerSets a motor power setting. This operation specifies the target power setting using TargetPower, a value from -1.0 to 1.0. (Negative values mean reverse).


Not every motor is part of the drive unit of a robot. The general motor state is represented by the following properties.

CurrentPowerdoubleIndicates the current motor power, a value from -1.0 to 1.0, where negative values indicate running in reverse.
HardwareIdentifierintIdentifies the hardware port the encoder uses.
NamestringSpecifies a descriptive name for the motor.
PosePoseIndicates the position and orientation of the motor.
PowerScalingFactordoubleIndicates the multiplier applied to CurrentPower to set the power for the motor.
ReversePolarityBooleanIndicates the direction (polarity) of the power to the motor. Setting this to true reverses the motor.


The service also supports the definition of a wheeled motors and includes the following properties.

WheelSpeeddoubleIndicates the current speed setting of the wheels in meters per second.
NamestringSpecifies a descriptive name for the motor.
MotorStateMotorStateIndicates the basic properties of the motor.
RadiusdoubleSpecifies the radius of the motor's attached wheel.
GearRatiodoubleSpecifies the ratio of the motor to the wheel. For example, 1/5 means the wheel rotates 5 times slower than the motor.
EncoderStateEncoderStateOptionally the state of a motor's encoder can be included as part of this wheeled motor state.


Updated information might be available online in the MSDN Library page:

VPL Robotics Services: Generic EncoderGeneric Differential DriveRobotics Services Overview



© 2012 Microsoft Corporation. All Rights Reserved.