Difference between revisions of "Vehicle Automation"

(Road Information)
(Road Information)
Line 71: Line 71:
 
The API will provide a series of functions that allow the user to input an X,Y,Z location and get logical information at that location, including lane width, road marking type , surface type  . Only a minority of tiles have tags (or attributes) that allow road marking information to be queried by CVED, hence this API will only provide road marking information from BLIs that a marked with tags for road markings. Should a road position not have valid markings tag, a return code will indicate no information was available.
 
The API will provide a series of functions that allow the user to input an X,Y,Z location and get logical information at that location, including lane width, road marking type , surface type  . Only a minority of tiles have tags (or attributes) that allow road marking information to be queried by CVED, hence this API will only provide road marking information from BLIs that a marked with tags for road markings. Should a road position not have valid markings tag, a return code will indicate no information was available.
  
:''GetLaneWidth()''
+
:'''GetLaneWidth()'''
 
:This will return the current width of the current lane at a given XYZ location.
 
:This will return the current width of the current lane at a given XYZ location.
  
:''GetRoadMarkings()''
+
:'''GetRoadMarkings()'''
 
:This will return lane marking type, on the right and left of the lane. This shall also provide distance from center line to inside of lane markings at a given XYZ location.
 
:This will return lane marking type, on the right and left of the lane. This shall also provide distance from center line to inside of lane markings at a given XYZ location.
  
:''GetLaneLayout()''
+
:'''GetLaneLayout()'''
 
:This function shall return the number of lanes, the direction of each lane, and meta-data about the lane, given a XYZ position; this will not function in intersection.
 
:This function shall return the number of lanes, the direction of each lane, and meta-data about the lane, given a XYZ position; this will not function in intersection.
  
:''GetLaneSurfaceType()''
+
:'''GetLaneSurfaceType()'''
 
:This function will return the road surface type at the current location. Documentation will be provided as to what the surface type codes indicate.
 
:This function will return the road surface type at the current location. Documentation will be provided as to what the surface type codes indicate.
  
:''GetRoadTrace()''
+
:'''GetRoadTrace()'''
 
:This function will take the current position, and a distance, and return an array of x,y,z points and lane width, following road. A version of this function will use the driver’s path as specified by the scenario, and use that to navigate any intersections that the function may encounter. Another form of the function will take a direction in, and will navigate the intersection using a given direction (right, left, straight).  Another version will take a corridor id, and provide a trace through the corridor.  
 
:This function will take the current position, and a distance, and return an array of x,y,z points and lane width, following road. A version of this function will use the driver’s path as specified by the scenario, and use that to navigate any intersections that the function may encounter. Another form of the function will take a direction in, and will navigate the intersection using a given direction (right, left, straight).  Another version will take a corridor id, and provide a trace through the corridor.  
  

Revision as of 13:57, 7 January 2018

As standard, the miniSim is equipped with two automation functions:

  • Lane Following
This function allows the user to define a ‘path’ for the own-vehicle vehicle during scenario authoring in ISAT, and, when engaged, the own-vehicle will follow this path. Lane Follow can be engaged/disengaged manually by the driver or operator, or via scenario trigger. NBy default, this will disengage when the driver starts steering.
  • Enhanced ACC
This function allows the driver or scenario to set the desired target speed and follow distance. The system will accelerate the own-vehicle from a standstill, and brake it to a stop as in stop and go traffic.

The Vehicle Automation option provides additional support for the following miniSim functions that allow the user to create and test automated vehicle control algorithms.

  • Virtual World API
This is a programmer interface for the miniSim logical road network, or ‘virtual world’. Using this interface, a user’s system can query the scenario determine the location of scenario objects, road and lane locations, and the status of traffic control devices.
  • Vehicle Automation Option
The NADS team have developed a set of low-level behaviors that can be activated by the scenario, by manual action, or by a user-designed external subsystem. There are also functions for transfer of control, high-level driving style parameters, and support for existing scenario control triggering systems.
  • User-Defined Simulator Subsystem
The minSim supports linking to user-defined subsystems. The ability to link user developed functions to the subsystem has many applications, including the incorporation of active vehicle safety systems or automation functions into the miniSim driver in the loop simulation environment.

Logical Database API

This Logical Database API is to provide a simplified programmer interface into CVED, to serve as a method to extract road information at run time on the MiniSim. This API will not directly serve as an interface into the MiniSim, it will however be able to open the BLI file and run parallel with the MiniSim. As part of the delivery an example program that does provide a communication interface to the MiniSim, and utilizes this API will be delivered. The below figure shows the data-flow, where the example program receives the current state information including the position of the driver, the example program then uses this information to query the API.

Definitions:

CVED Correlated Virtual Environment Database is an API used internally at NADS to read the bli, and query the road network.
BLI Binary Logical road Interface, this is a file that contains all of the logical road information.
SOL The sol file provides static information about static or dynamic objects, such as the bounding box size.
Corridor A corridor is a defined path through an intersection.
Static Object Static objects include signs, and non-moving objects that are either part of the BLI, or inserted into ISAT by the scenario author.
Dynamic Object Dynamic objects are those objects that when created by running the scenario, have a physical presence in the simulation, and are updated by scenario control. These are either ADOs or DDOs.


miniSim Data Flow


Data flow for API


The API is developed in C++; it will be delivered as a library file built in VS 2010, with a header files. The API is object oriented in design and will use Hungarian notation (classes begin with C, member variable will begin with m_). The example program will be provided as a source code distribution, with a project and solution file for VS 2010. This program will be developed with C++. The operation of the example program will require network connectivity with the MiniSim. The API will require in the installation directory of the executable:

  • a copy of the BLI
  • a copy of the SOL file
  • a copy of the scenario file


Description of API Functionality

The API provides an interface that will allow a user to query logical information about the driving environment, such as lane width, distance to next intersection. The API will accept x,y,z locations and provide road related data about said location. This shall have real-time level performance. It also shall be possible to use this API in a system that is not directly connected to the miniSim.

The example program will communicate with the miniSim, and will utilize at least one version of every API available, duplicate calls that only vary in call type (i.e. float vs. double) may only have 1 version called. This program will provided as an example of the API, and will provide validation of the API.

Road Information

The API will provide a series of functions that allow the user to input an X,Y,Z location and get logical information at that location, including lane width, road marking type , surface type . Only a minority of tiles have tags (or attributes) that allow road marking information to be queried by CVED, hence this API will only provide road marking information from BLIs that a marked with tags for road markings. Should a road position not have valid markings tag, a return code will indicate no information was available.

GetLaneWidth()
This will return the current width of the current lane at a given XYZ location.
GetRoadMarkings()
This will return lane marking type, on the right and left of the lane. This shall also provide distance from center line to inside of lane markings at a given XYZ location.
GetLaneLayout()
This function shall return the number of lanes, the direction of each lane, and meta-data about the lane, given a XYZ position; this will not function in intersection.
GetLaneSurfaceType()
This function will return the road surface type at the current location. Documentation will be provided as to what the surface type codes indicate.
GetRoadTrace()
This function will take the current position, and a distance, and return an array of x,y,z points and lane width, following road. A version of this function will use the driver’s path as specified by the scenario, and use that to navigate any intersections that the function may encounter. Another form of the function will take a direction in, and will navigate the intersection using a given direction (right, left, straight). Another version will take a corridor id, and provide a trace through the corridor.
GetOncomingIntersection()
Forms of this function will return: the distance to the next intersection 0, if currently located on an intersection, and list of connected corridors, and their respective turn directions.
GetOncomingHaltLine()
This function will return the distance and x,y,z, location of the next oncoming halt line, version of this function will take the drivers path to determine what halt line to stop at.
GetOncomingMergePoints()
This function will take a distance, and position, it will project forward, and return distances to, and x,y,z location for points where two corridors begin to overlap.
GetLightState()
This function will take in location information and the traffic light state data past from the MiniSim, and will indicate what the traffic light state is for said location.
GetCurvature()
This function will take xyz location, and return the radius of curvature for said location.
GetGrade()
Given an x,y,z get the road grade of the road in degrees.
ChangeLanes()
Given a position (XYZ) on a road segment (not in an intersection) and a lane offset(+ meaning lanes to the right, negative numbers mean to the left, this function will return center of the lane indicated by the lane offset or an error code indicating why it cannot changes lanes( i.e. the lane does not exist, or is an oncoming lane).