|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectaim4.vehicle.BasicVehicle
aim4.vehicle.BasicAutoVehicle
public class BasicAutoVehicle
The basic autonomous vehicle.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class aim4.vehicle.BasicVehicle |
---|
BasicVehicle.AccelScheduleMovement, BasicVehicle.Movement, BasicVehicle.MovementFactory, BasicVehicle.MovementWithAccel, BasicVehicle.MoveToTargetVelocityMovement, BasicVehicle.NonAccelMovement, BasicVehicle.PhysicalMovement, BasicVehicle.SteeringMovement, BasicVehicle.TrackMovement |
Nested classes/interfaces inherited from interface aim4.vehicle.AutoVehicleDriverView |
---|
AutoVehicleDriverView.LRFMode |
Field Summary | |
---|---|
protected int |
bitsReceived
The number of bits this Vehicle has received. |
static double |
DEFAULT_TRANSMISSION_POWER
The default distance the Vehicle can transmit messages. |
Fields inherited from class aim4.vehicle.BasicVehicle |
---|
currentTime, movement, spec, vin |
Constructor Summary | |
---|---|
BasicAutoVehicle(VehicleSpec spec,
Point2D pos,
double heading,
double steeringAngle,
double velocity,
double targetVelocity,
double acceleration,
double currentTime)
Construct a vehicle |
Method Summary | |
---|---|
int |
getBitsReceived()
Get the number of bits this Vehicle has received. |
int |
getBitsTransmitted()
Get the number of bits this Vehicle has transmitted. |
AutoDriver |
getDriver()
Getter method for the Driver controlling this Vehicle. |
DoubleGauge |
getFrontVehicleDistanceSensor()
Get this Vehicle's gauge of sensors about the distance, in meters, between p1 and p2, both of them are points on the target lane, where p1 is the point projected from the center of the front of the vehicle, and p2 is the nearest point of another vehicle in the front of the vehicle to p1 on the target lane. |
DoubleGauge |
getFrontVehicleSpeedSensor()
Get this Vehicle's gauge of sensors about the speed, in meters per second, of the vehicle in front of the vehicle on the target lane. |
DoubleGauge |
getIntervalometer()
Get this Vehicle's interval-to-vehicle-in-front gauge. |
V2IMessage |
getLastV2IMessage()
Get the last V2I message |
DoubleGauge |
getLRFAngle()
Get this Vehicle's laser range finder angle gauge. |
DoubleGauge |
getLRFDistance()
Get this Vehicle's laser range finder distance gauge. |
AutoVehicleDriverView.LRFMode |
getLRFMode()
Get the Vehicle's laser range finder operating mode. |
DoubleGauge |
getRearVehicleDistanceSensor()
Get this Vehicle's gauge of sensors about the distance, in meters, between p1 and p2, both of them are points on the target lane, where p1 is the point projected from the center of the front of the vehicle, and p2 is the nearest point of another vehicle behind the vehicle to p1 on the target lane. |
DoubleGauge |
getRearVehicleSpeedSensor()
Get this Vehicle's gauge of sensors about the speed, in meters per second, of the vehicle behind the vehicle on the target lane. |
Lane |
getTargetLaneForVehicleTracking()
Return the target lane for vehicle tracking. |
double |
getTransmissionPower()
Get the Vehicle's transmission power. |
Queue<V2IMessage> |
getV2IOutbox()
Get the queue of V2I messages waiting to be delivered from this Vehicle. |
boolean |
isLRFSensing()
Get whether or not the laser range finder is sensing anything. |
boolean |
isVehicleTracking()
Get whether or not the vehicle tracking sensors are sensing anything. |
List<I2VMessage> |
pollAllMessagesFromI2VInbox()
Get the list of all messages currently in the queue of I2V messages waiting to be read by this Vehicle. |
void |
receive(I2VMessage msg)
Adds a message to the incoming queue of messages received from IntersectionManagers. |
void |
send(V2IMessage msg)
Adds a message to the outgoing queue of messages to be delivered to an IntersectionManager. |
void |
setDriver(AutoDriver driver)
Set this Vehicle's Driver. |
void |
setLRFMode(AutoVehicleDriverView.LRFMode mode)
Set the Vehicle's laser range finder operating mode. |
void |
setLRFSensing(boolean sensing)
Set whether or not the laser range finder is sensing anything. |
void |
setTargetLaneForVehicleTracking(Lane lane)
Set the target lane for vehicle tracking. |
void |
setTransmissionPower(double transmissionPower)
Set the Vehicle's transmission power. |
void |
setVehicleTracking(boolean sensing)
Set whether or not the vehicle tracking sensors are sensing anything. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface aim4.vehicle.VehicleSimView |
---|
checkCurrentTime, getAcceleration, getCenterPoint, getCornerPoints, getEdges, getHeading, getPointAtMiddleFront, getPointAtRear, getPosition, getShape, getShape, getVelocity, getWheelShapes, move, setVIN |
Field Detail |
---|
public static final double DEFAULT_TRANSMISSION_POWER
protected int bitsReceived
Constructor Detail |
---|
public BasicAutoVehicle(VehicleSpec spec, Point2D pos, double heading, double steeringAngle, double velocity, double targetVelocity, double acceleration, double currentTime)
spec
- the vehicle's specificationpos
- the initial position of the Vehicleheading
- the initial heading of the VehiclesteeringAngle
- the initial steering angle of the Vehiclevelocity
- the initial velocity of the VehicletargetVelocity
- the initial target velocityacceleration
- the initial acceleration of the VehiclecurrentTime
- the current timeMethod Detail |
---|
public AutoDriver getDriver()
getDriver
in interface AutoVehicleDriverView
getDriver
in interface VehicleDriverView
getDriver
in class BasicVehicle
null
if none exists.public void setDriver(AutoDriver driver)
setDriver
in interface VehicleSimView
driver
- the new driver to control this Vehiclepublic DoubleGauge getIntervalometer()
read
, except in
the actual physical simulator which is allowed to set these values.
getIntervalometer
in interface AutoVehicleDriverView
public void setLRFMode(AutoVehicleDriverView.LRFMode mode)
mode
- the new laser range finder modeAutoVehicleDriverView.LRFMode
public AutoVehicleDriverView.LRFMode getLRFMode()
getLRFMode
in interface AutoVehicleDriverView
AutoVehicleDriverView.LRFMode
public boolean isLRFSensing()
isLRFSensing
in interface AutoVehicleDriverView
public void setLRFSensing(boolean sensing)
setLRFSensing
in interface AutoVehicleSimView
sensing
- whether or not the laser range finder is sensing anythingpublic DoubleGauge getLRFAngle()
read
,
except in the actual physical simulator which is allowed to set
these values.
public DoubleGauge getLRFDistance()
read
,
except in the actual physical simulator which is allowed to set
these values.
getLRFDistance
in interface AutoVehicleDriverView
public boolean isVehicleTracking()
isVehicleTracking
in interface AutoVehicleDriverView
public void setVehicleTracking(boolean sensing)
setVehicleTracking
in interface AutoVehicleDriverView
sensing
- whether or not the vehicle tracking sensors are sensing
anythingpublic void setTargetLaneForVehicleTracking(Lane lane)
setTargetLaneForVehicleTracking
in interface AutoVehicleDriverView
lane
- the target lane for vehicle trackingpublic Lane getTargetLaneForVehicleTracking()
getTargetLaneForVehicleTracking
in interface AutoVehicleDriverView
public DoubleGauge getFrontVehicleDistanceSensor()
getFrontVehicleDistanceSensor
in interface AutoVehicleDriverView
public DoubleGauge getRearVehicleDistanceSensor()
getRearVehicleDistanceSensor
in interface AutoVehicleDriverView
public DoubleGauge getFrontVehicleSpeedSensor()
getFrontVehicleSpeedSensor
in interface AutoVehicleDriverView
public DoubleGauge getRearVehicleSpeedSensor()
getRearVehicleSpeedSensor
in interface AutoVehicleDriverView
public void setTransmissionPower(double transmissionPower)
transmissionPower
- the new transmission power, in meterspublic double getTransmissionPower()
getTransmissionPower
in interface AutoVehicleDriverView
public Queue<V2IMessage> getV2IOutbox()
getV2IOutbox
in interface VehicleSimView
public List<I2VMessage> pollAllMessagesFromI2VInbox()
pollAllMessagesFromI2VInbox
in interface AutoVehicleDriverView
public void send(V2IMessage msg)
send
in interface AutoVehicleDriverView
msg
- the message to send to an IntersectionManagerpublic void receive(I2VMessage msg)
receive
in interface AutoVehicleDriverView
msg
- the message to send to another Vehiclepublic int getBitsReceived()
getBitsReceived
in interface AutoVehicleDriverView
public int getBitsTransmitted()
getBitsTransmitted
in interface AutoVehicleDriverView
public V2IMessage getLastV2IMessage()
getLastV2IMessage
in interface AutoVehicleDriverView
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |