VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtGroundMoveDirectionController Class Reference

A controller for ground automotive entities that takes a direction and speed as input, and outputs throttle, steering, etc, values for the automotive actuator. More...

Inheritance diagram for DtGroundMoveDirectionController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtGroundMoveDirectionController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtGroundMoveDirectionController ()
 destructor
virtual bool init ()
 Initializes myGroundVehicleState.
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual void tick ()
 This gives the thread of control to the component.

Static Public Member Functions

static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,

Protected Member Functions

virtual bool createPorts ()
 Overridden to create the movement control input ports.
virtual bool createPortGroups ()
 Overridden to create the movement control input port group.
virtual bool createDirectionInputPort ()
virtual bool createSpeedInputPort ()
virtual bool movementControlInputPortGroup ()
virtual void setControlsForNormalMove ()
 Sets the output controls for a normal forward movement while steering.
virtual void setControlsForTurnInPlace ()
 Sets the output controls for a turn in place.
virtual bool shouldTurnInPlace ()
 Check whether the vehicle should move normally or turn in place for this tick.

Protected Attributes

bool myTurningLastTick
 Used only for debugging output, so not in PSR.
const
DtGroundMoveDirectionControllerDescriptor
myMoveDirectionDescriptor
Ports and Port Groups
DtAnalogInputPortmyDirectionInputPort
 Input Port Name: desired-direction
Input Port Description: Desired direction (heading) of the entity in radians.
DtAnalogInputPortmySpeedInputPort
 Input Port Name: desired-speed
Input Port Description: Desired speed of the entity in m/s.
DtInputPortGroupmyMovementControlInputPortGroup
 Input Port Group Name: movement-control
Input Port Group Description: Collection of inputs specifying the desired movement of the entity.

Private Member Functions

 DtGroundMoveDirectionController ()
 default constructor; not implemented
 DtGroundMoveDirectionController (const DtGroundMoveDirectionController &orig)
 copy constructor; not implemented
const
DtGroundMoveDirectionController
operator= (const DtGroundMoveDirectionController &orig)
 assignment operator; not implemented

Detailed Description

A controller for ground automotive entities that takes a direction and speed as input, and outputs throttle, steering, etc, values for the automotive actuator.

This controller is intended as an intermediary controller between a controller that is carrying out a task or performing some action by providing a desired speed and heading, and the automotive actuator itself. The controller will cause the entity to stop and pivot, if configured to to so in the descriptor and if the entity is pivot-capable. Uses Descriptor Type: DtGroundMoveDirectionControllerDescriptor


Constructor & Destructor Documentation

default constructor; not implemented

copy constructor; not implemented

DtGroundMoveDirectionController::DtGroundMoveDirectionController ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

destructor


Member Function Documentation

const DtGroundMoveDirectionController& DtGroundMoveDirectionController::operator= ( const DtGroundMoveDirectionController orig) [private]

assignment operator; not implemented

Initializes myGroundVehicleState.

Reimplemented from DtGroundAutoControllerComponent.

Reimplemented in BHAVE::DtBhaveMoveDirectionController.

virtual DtString DtGroundMoveDirectionController::type ( ) const [virtual]

Returns a string identifies the class type of component.

Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key.

Returns:
DtGroundMoveDirectionControllerType

Reimplemented from DtGroundAutoControllerComponent.

Reimplemented in BHAVE::DtBhaveMoveDirectionController.

virtual void DtGroundMoveDirectionController::tick ( ) [virtual]

This gives the thread of control to the component.

The component is ticked once each simulation from by the component list it's on. This base class tick has no functionality.

Reimplemented from DtSimComponent.

static DtSimComponent* DtGroundMoveDirectionController::creator ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
) [static]

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

Returns:
New instance of this class.

Reimplemented in BHAVE::DtBhaveMoveDirectionController.

virtual bool DtGroundMoveDirectionController::createPorts ( ) [protected, virtual]

Overridden to create the movement control input ports.

Calls down to DtGroundAutoControllerComponent::createPorts().

Reimplemented from DtGroundAutoControllerComponent.

Reimplemented in BHAVE::DtBhaveMoveDirectionController.

virtual bool DtGroundMoveDirectionController::createPortGroups ( ) [protected, virtual]

Overridden to create the movement control input port group.

Calls down to DtGroundAutoControllerComponent::createPortGroups().

Reimplemented from DtGroundAutoControllerComponent.

virtual void DtGroundMoveDirectionController::setControlsForNormalMove ( ) [protected, virtual]

Sets the output controls for a normal forward movement while steering.

Reimplemented in BHAVE::DtBhaveMoveDirectionController.

virtual void DtGroundMoveDirectionController::setControlsForTurnInPlace ( ) [protected, virtual]

Sets the output controls for a turn in place.

Either pivot, or K-Turn, depending on the capabilities of the entity.

virtual bool DtGroundMoveDirectionController::shouldTurnInPlace ( ) [protected, virtual]

Check whether the vehicle should move normally or turn in place for this tick.

Returns:
True if the entity should turn in place.

Member Data Documentation

Input Port Name: desired-direction
Input Port Description: Desired direction (heading) of the entity in radians.


Input Port Range: 0 - 2*pi
Input Port Default Value: N/A
Input Group Parent: movement-control

Input Port Name: desired-speed
Input Port Description: Desired speed of the entity in m/s.


Input Port Range: 0 and up. Input Port Default Value: N/A
Input Group Parent: movement-control

Input Port Group Name: movement-control
Input Port Group Description: Collection of inputs specifying the desired movement of the entity.


Used only for debugging output, so not in PSR.


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)