![]() |
VR-Forces 4.0.4 Class Documentation
|
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...

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 DtSimComponent * | creator (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 | |
| DtAnalogInputPort * | myDirectionInputPort |
| Input Port Name: desired-direction Input Port Description: Desired direction (heading) of the entity in radians. | |
| DtAnalogInputPort * | mySpeedInputPort |
| Input Port Name: desired-speed Input Port Description: Desired speed of the entity in m/s. | |
| DtInputPortGroup * | myMovementControlInputPortGroup |
| 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 | |
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
default constructor; not implemented
| DtGroundMoveDirectionController::DtGroundMoveDirectionController | ( | const DtGroundMoveDirectionController & | orig | ) | [private] |
copy constructor; not implemented
| DtGroundMoveDirectionController::DtGroundMoveDirectionController | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
(const DtString&,DtVrfObject*,DtSimManager*,
| name | Reader writer name of this component. |
| owner | The DtVrfObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
| virtual DtGroundMoveDirectionController::~DtGroundMoveDirectionController | ( | ) | [virtual] |
destructor
| const DtGroundMoveDirectionController& DtGroundMoveDirectionController::operator= | ( | const DtGroundMoveDirectionController & | orig | ) | [private] |
assignment operator; not implemented
| virtual bool DtGroundMoveDirectionController::init | ( | ) | [virtual] |
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.
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*,
| name | Reader writer name of this component. |
| owner | The DtVrfObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
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 bool DtGroundMoveDirectionController::createDirectionInputPort | ( | ) | [protected, virtual] |
| virtual bool DtGroundMoveDirectionController::createSpeedInputPort | ( | ) | [protected, virtual] |
| virtual bool DtGroundMoveDirectionController::movementControlInputPortGroup | ( | ) | [protected, virtual] |
| 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.
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.
const DtGroundMoveDirectionControllerDescriptor* DtGroundMoveDirectionController::myMoveDirectionDescriptor [protected] |