Packageorg.MARS.robot.locomotion
Classpublic class DifferentialSteering
InheritanceDifferentialSteering Inheritance AbstractElectronicDevice
ImplementsIElectronicDevice, ILocomotion

The basic locomotion used on almost all small robots. It consists of two motors with the wheels of the same size aligned along the same axis.

The wheel system must have the following properties:

The IO Port configuration is as follows:

See also

AbstractElectronicDevice
ILocomotion
IElectronicDevice


Public Properties
 PropertyDefined by
 InheritednumberOfPorts : Number
Get the number of IO ports in the device.
AbstractElectronicDevice
  robot : Robot
[write-only] The robot to be moved by the locomotion
DifferentialSteering
  wheels : Array
DifferentialSteering
Protected Properties
 PropertyDefined by
 Inherited_ports : Array
AbstractElectronicDevice
Public Methods
 MethodDefined by
  
DifferentialSteering(wheelsArray:Array)
Creates a Differential Steering locomotion system with the wheels provided.
DifferentialSteering
 Inherited
getPort(portNumber:Number):IOPort
Get a certain IO port by its number
AbstractElectronicDevice
  
step():void
A function that is called on every step of the physics engine.
DifferentialSteering
Property detail
robotproperty
robot:Robot  [write-only]

The robot to be moved by the locomotion

Implementation
    public function set robot(value:Robot):void
wheelsproperty 
wheels:Array  [read-write]Implementation
    public function get wheels():Array
    public function set wheels(value:Array):void
Constructor detail
DifferentialSteering()constructor
public function DifferentialSteering(wheelsArray:Array)

Creates a Differential Steering locomotion system with the wheels provided. Use the LocomotionUtil for easier definition of the wheel system.

Parameters
wheelsArray:Array — - array containing the two-wheel system

Throws
— Error whenever the wheel system is not as required

See also

LocomotionUtil
Method detail
step()method
public function step():void

A function that is called on every step of the physics engine. It updates the physical state of the robot based on the state of the wheels, which is determined by the values of the input ports.