Share via


Motor

Glossary Item Box

Robotics Common: Robotics Common Overview

See Also Microsoft Robotics Developer Studio Send feedback on this topic

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.

Operation Description
Get Returns the entire state of the motor.
MotorReplace Changes the state of the motor.
SetMotorPower Sets 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.

Name Type Description
CurrentPower double Indicates the current motor power, a value from -1.0 to 1.0, where negative values indicate running in reverse.
HardwareIdentifier int Identifies the hardware port the encoder uses.
Name string Specifies a descriptive name for the motor.
Pose Pose Indicates the position and orientation of the motor.
PowerScalingFactor double Indicates the multiplier applied to CurrentPower to set the power for the motor.
ReversePolarity Boolean Indicates 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.

Name Type Description
WheelSpeed double Indicates the current speed setting of the wheels in meters per second.
Name string Specifies a descriptive name for the motor.
MotorState MotorState Indicates the basic properties of the motor.
Radius double Specifies the radius of the motor's attached wheel.
GearRatio double Specifies the ratio of the motor to the wheel. For example, 1/5 means the wheel rotates 5 times slower than the motor.
EncoderState EncoderState Optionally 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:
Motor

See Also 

Robotics Common: Robotics Common Overview

 

 

© 2012 Microsoft Corporation. All Rights Reserved.