This is the documentation of TC. Methods for the configuration, deployment and use of TC are given. The main features are:
- Environment design and build: Definition of positions and roads connecting them.
- Set current vehicles positions: The current position of each vehicle is set.
- Set goal vehicles positions: The desired goal position for each vehicle is set.
- Retrieve next vehicles positions: Returns the next positions of the vehicles.
- Specify dynamic obstacles: If any, dynamic obstacles obstructing the previously defined
roads are indicated. - Compute solutions: The optimal trajectory is computed for each vehicle .
It is assumed that TC will be integrated into an application specific vehicles manager software/system. In the application tailored solution, the TC will be used as a module that is in charge of the traffic control. A processor with high processing capabilities and instructions per seconds rate is desirable (i.e. high clock speeds). The number of available cores is not relevant, since
a TC is a single threaded process.
Preliminary notes
The expected timeout period and needed RAM memory will depend on the final application in which TC is deployed, the environment (including the presence of obstacles) and the system reaction timings. On-site or simulation based assessment is highly recommended.
The hardware platform in which TC is deployed and run plays an important role. Its real-time response is closely related with its computational capabilities. It shall be verified that TC meets the expected performance and behavior on the target application.
Installation
TC can be installed and run on both Windows and GNU/Linux systems (x86 architecture). It could also be compatible
with other operating systems. The installation can simply done by:
- Creating a directory and/or changing current directory to a desired workspace path.
- Copying the binary executable file and giving execution permissions. In GNU/Linux, an Ada runtime system (i.e. gnat) shall be present.
TC can be executed by running the launcher binary: ./tc-launcher
_<os>. Standard input and output is used to pass commands and retrieve data. The TC programming interface is divided into different parts aligned with its use cases.
Settings
First, TC settings can be adjusted, specifically, the maximum available RAM, CPU time and logging feature. The expected timeout period and needed RAM memory will depend on the final application in which TC is deployed, the environment (including the presence of obstacles) and the system reaction timings.
Method | Description | Arguments | Return |
Settings_Set_Max_RAM | Sets the maximum available RAM | Natural | [none] |
Settings_Set_Timeout | Sets the maximum available CPU time (in milliseconds) before a timeout is raised | Natural | [none] |
Settings Enable Logging | Enables logging feature (a tc.log file is created). | [none] | [none] |
Settings Disable Logging | Disables logging | [none] | [none] |
Initialization & Mission
Once configured, TC can be initialized and build and major versions information retrieved. Before missions can be carried out, the environment needs to be build up and vehicles current and goals positions defined.
Method | Description | Arguments | Return |
TC_Init | Initializes TC | [none] | [none] |
TC_Generation | Prints TC generation, the major version, specifically, the year of development. | [none] | String |
TC_Build_Version | Prints the build version | [none] | String |
TC_Start_Mission | Mission starts, it automatically computes the solution. Returns true if successful. | [none] | Boolean |
TC_Get_Num_Step | Retrieves the number of steps to reach the goal | [none] | Natural |
TC_End_Mission | Mission end | [none] | [none] |
Environment
The environment can be determined and built up following next methods. The maximum number of positions and roads are statically defined and fixed during compilation. This measure is applied to avoid systematic errors and internal data inconsistencies. The environment needs to be firstly cleared.
Method | Description | Arguments | Return |
Environment_Clean | Cleans the current environment model. | [none] | [none] |
Environment_Build | The environment is built. The model is created. For any change, a clean shall be done. | [none] | [none] |
Environment_Get_Max_Pos | Returns the number of maximum positions that can be defined in the environment | [none] | Natural |
Environment_Get_Max_Roads | Returns the number of maximum roads that can be defined in the environment | [none] | Natural |
Environment_Add_One_Way Road | A one way road is added from position (argument 1) to position (argument 2) | Pos_ID Pos_ID | [none] |
Environment_Add_Two_Way_Road_One_Lane | A two way road (one lane) is added from position (argument 1) to position (argument 2). A single vehicle can go through each time | Pos_ID Pos_ID | [none] |
Environment_Add_Two _Way_Road_Two_Lanes | A one way road (two lane) is added from position (argument 1) to position (argument 2) Two vehicles can go through in each direction each time. | Pos_ID Pos_ID | [none] |
Vehicle
Following methods enable the vehicle management. Current and desired goal positions of the vehicles are specified. Once the solution is computed, the next position of each vehicle can be retrieved. Optionally the distance of a vehicle to a given position
can also be obtained. When goal is suddenly reached, the same position as the desired one will be returned.
Method | Description | Arguments | Return |
Vehicle_Set_Current_Pos | Sets the current position for a given vehicle | Vehicle_ID Pos_ID | [none] |
Vehicle_Get_Current_Pos | Provides the current position for a vehicle | Vehicle_ID | Pos_ID |
Vehicle_Get_Dis_To_Pos | Returns the distance of the vehicle to the position | Vehicle_ID Pos_ID | Natural |
Vehicle_Set_Goal_Pos | Sets the goal position of a vehicle | Vehicle_ID Pos_ID | [none] |
Vehicle_Get_Next_Pos | Provides the next position of a given vehicle. | Vehicle_ID | Pos_ID |
Vehicle_Get_Step_Pos | Provides the position of the vehicle at a given step. | Vehicle_ID Natural | Pos_ID |
Vehicle_Moved_Forward | The vehicles are moved forward following the previously computed path. Returns true if Goal reached. | [none] | Boolean |
Vehicle_Goal_Reached | Check if goal positions reached. True if yes . Otherwise, false | [none] | Boolean |
Obstacles
Current obstacles present in the environment, if any, are specified. This procedure will of course depend on the number detected and identified obstacles. This task is out of scope of TC. For this purpose, environment sensing systems and methods should be used, such as vision systems or movement detection sensors.
Method | Description | Arguments | Return |
Obstacles_Clean | The list of obstacles is cleared | [none] | [none] |
Obstacles_Add_Obstacle | New obstacle detected between positions 1 (1st argument) to position 2 is indicated (2nd argument) | Pos_ID Pos_ID | [none] |
Obstacles_Get_Num | The number of obstacles is retrieved. | [none] | Natural |
Obstacles_Present | Indicates if an obstacles has been defined between two positions. | Pos_ID Pos_ID | Boolean |
Obstables_Confirm | Obstacles are confirmed, the paths are recomputed. Returns true if successful. | [none] | Boolean |
Monitoring
During execution, the current CPU time employed can be obtained. In addition, the number of statically configured vehicles can be retrieved. The collection of this data is not mandatory, although advised to monitor the performance of TC.
Method | Description | Arguments | Return |
Monitoring_Get_Num_Vehicles | Returns the number of statically configured vehicles | [none] | Natural |
Monitoring_Get_CPU_Time | Returns current CPU time (in seconds) employed for the computation of the solution | [none] | Float |