Packageorg.MARS.robot.locomotion
Classpublic class Wheel

Represents a wheel used by the locomotion systems

See also

DifferentialSteering


Public Properties
 PropertyDefined by
  direction : Number
Wheel
  maximumRotationSpeed : Number
[write-only]
Wheel
  noiseLevel : Number
The amount of random variations in the wheel's speed produced by the irregularities in the motors.
Wheel
  position : Vector
[read-only]
Wheel
  radius : Number
[read-only]
Wheel
  shape : Polygon
[read-only]
Wheel
  speed : Number
[read-only]
Wheel
Public Methods
 MethodDefined by
  
Wheel(radius:Number, RPS:Number, position:Vector, noiseLevel:Number = 0.1)
Create a wheel with the given properties:
Wheel
Public Constants
 ConstantDefined by
  DEFAULT_COLOR : uint = 0x000000
[static]
Wheel
  FORWARD : Number = 0
[static]
Wheel
  REVERSE : Number = 1
[static]
Wheel
  STOP : Number = 2
[static]
Wheel
Property detail
directionproperty
direction:Number  [read-write]Implementation
    public function get direction():Number
    public function set direction(value:Number):void
maximumRotationSpeedproperty 
maximumRotationSpeed:Number  [write-only]Implementation
    public function set maximumRotationSpeed(value:Number):void
noiseLevelproperty 
public var noiseLevel:Number

The amount of random variations in the wheel's speed produced by the irregularities in the motors.

positionproperty 
position:Vector  [read-only]Implementation
    public function get position():Vector
radiusproperty 
radius:Number  [read-only]Implementation
    public function get radius():Number
shapeproperty 
shape:Polygon  [read-only]Implementation
    public function get shape():Polygon
speedproperty 
speed:Number  [read-only]Implementation
    public function get speed():Number
Constructor detail
Wheel()constructor
public function Wheel(radius:Number, RPS:Number, position:Vector, noiseLevel:Number = 0.1)

Create a wheel with the given properties:

Parameters
radius:Number — - radius of the wheel in pixels
 
RPS:Number — - maximum speed of the wheel in rotations per second
 
position:Vector — - position of the wheel relative to the center of the wheel system
 
noiseLevel:Number (default = 0.1) — - the amount of random variations in the wheel's speed produced by the irregularities in the motors.
Constant detail
DEFAULT_COLORconstant
public static const DEFAULT_COLOR:uint = 0x000000
FORWARDconstant 
public static const FORWARD:Number = 0
REVERSEconstant 
public static const REVERSE:Number = 1
STOPconstant 
public static const STOP:Number = 2