aim4.driver.pilot

## Class V2IPilot

- java.lang.Object
- - aim4.driver.pilot.BasicPilot
  - - aim4.driver.pilot.V2IPilot

-     public class V2IPilot
      extends BasicPilot

  An agent that pilots a `AutoVehicleDriverView` autonomously. This agent attempts to emulate the behavior of a real-world autonomous driver agent in terms of physically controlling the Vehicle.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static double` | `DEFAULT_STOP_DISTANCE_BEFORE_INTERSECTION` The default shortest distance before an intersection at which the vehicle stops if the vehicle can't enter the intersection immediately.
    `static double` | `MINIMUM_FOLLOWING_DISTANCE` The minimum distance to maintain between the Vehicle controlled by this AutonomousPilot and the one in front of it.
    `static double` | `TRAVERSING_LANE_CHANGE_LEAD_TIME` The distance, expressed in units of the Vehicle's velocity, at which to switch to a new lane when turning.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `V2IPilot(AutoVehicleDriverView vehicle, AutoDriver driver)` Create an pilot to control a vehicle.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `followAccelerationProfile(V2ICoordinator.ReservationParameter rp)` Follow the acceleration profile received as part of a reservation confirmation from an IntersectionManager.
    `AutoDriver` | `getDriver()` Get the driver this pilot controls.
    `AutoVehicleDriverView` | `getVehicle()` Get the vehicle this pilot controls.
    `void` | `simpleThrottleAction()` The simple throttle action.
    `void` | `takeSteeringActionForTraversing(V2ICoordinator.ReservationParameter rp)` Set the steering action when the vehicle is traversing an intersection.

    - ### Methods inherited from class aim4.driver.pilot.BasicPilot

      `cruise, followCurrentLane, followNewLane`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### MINIMUM_FOLLOWING_DISTANCE

          public static final double MINIMUM_FOLLOWING_DISTANCE

      The minimum distance to maintain between the Vehicle controlled by this AutonomousPilot and the one in front of it. 0.5 meters.
      See Also:
        Constant Field Values

    - #### DEFAULT_STOP_DISTANCE_BEFORE_INTERSECTION

          public static double DEFAULT_STOP_DISTANCE_BEFORE_INTERSECTION

      The default shortest distance before an intersection at which the vehicle stops if the vehicle can't enter the intersection immediately.

    - #### TRAVERSING_LANE_CHANGE_LEAD_TIME

          public static final double TRAVERSING_LANE_CHANGE_LEAD_TIME

      The distance, expressed in units of the Vehicle's velocity, at which to switch to a new lane when turning. 1.5 seconds.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### V2IPilot

          public V2IPilot(AutoVehicleDriverView vehicle,
                  AutoDriver driver)

      Create an pilot to control a vehicle.
      Parameters:
        `vehicle` - the vehicle to control
        `driver` - the driver

  - ### Method Detail

    - #### getVehicle

          public AutoVehicleDriverView getVehicle()

      Get the vehicle this pilot controls.
      Specified by:
        `getVehicle` in class `BasicPilot`

    - #### getDriver

          public AutoDriver getDriver()

      Get the driver this pilot controls.
      Specified by:
        `getDriver` in class `BasicPilot`

    - #### takeSteeringActionForTraversing

          public void takeSteeringActionForTraversing(V2ICoordinator.ReservationParameter rp)

      Set the steering action when the vehicle is traversing an intersection.

    - #### followAccelerationProfile

          public void followAccelerationProfile(V2ICoordinator.ReservationParameter rp)

      Follow the acceleration profile received as part of a reservation confirmation from an IntersectionManager. If none exists, or if it is empty, just cruise. Modifies the acceleration profile to reflect the portion it has consumed. TODO: do not modify the acceleration profile

    - #### simpleThrottleAction

          public void simpleThrottleAction()

      The simple throttle action.

Copyright © 2013. All rights reserved.