Commit 5d9575e7 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Updated the main opendrive library documentation.

parent 070eade0
doc/images/road_structure.png

385 KB | W: | H:

doc/images/road_structure.png

262 KB | W: | H:

doc/images/road_structure.png
doc/images/road_structure.png
doc/images/road_structure.png
doc/images/road_structure.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -17,6 +17,10 @@ The [COpendriveLink](opendrive_link.md) objects include all the geometry informa
The road nodes and the links between them describe the road as a directed graph.
The next image shows an example of the data structure generated by this library.
<img src="images/road_structure.png" alt="Example data structure generate by this library" width="1055" height="496">
### Class structure
The next diagram shows the basic class structure.
......@@ -32,34 +36,22 @@ Some features common to all these classes are:
* Set of common parameters to modify the road representation. All these parameters can only be modified through the main COpendriveRoad object, and can be modified at any time. Keep in mind however, that once the road description has been loaded and the internal geometry generated, the computational cost of changing these parameters can be high, so it is recommended to set these values before loading the road description. These parameters are:
* **resolution**: this is the minimum distance between two consecutive points in any road geometry.
* **scale**: this is a scale factor that is applied to scale up or down the road description withou actually modifying the internal geometry information.
* **scale**: this is a scale factor that is applied to scale up or down the road description without actually modifying the internal geometry information.
* **min_road_length**: this is the minimum length of a road segment to be included when the opendrive file is loaded. Any road segment shorter than this value will be ignored.
* The *<<* operator is overloaded to display human readable information about the road structure.
* The public API is intended to provide access to all the important information of each of the road elements, but without being able to modify them.
## Example road
The road shown in the next figure will be used to complete the description of all classes with an example. The opendrive road descrption can be downloaded [here]().
<img src="images/original_road.png" alt="Opendrive road description used as an example" width="814" height="594">
The dotted lines represent the limits of adjacent road segments. Each road segment include its name and the opendrive segment identifier (in parenthesis). The name of the two road junctions are also displayed but the name of each junction road is omitted for clarity. The name of the road junctions follows the next format:
```
<junction_name>_<origin_road_id>_<origin_lane_id>_<target_road_id>_<target_lane_id>
```
## Important
This is a work in progess and may suffer some changes and updates, although the general
This is a work in progress and may suffer some changes and updates, although the general
## How to use it
* Create a COpendriveRoad object.
* Set the desired resolution, scale and minimum road length.
* Import the Opendrive description file using the *load()* function.
* Retrieve the desired information using the *get_\*()* public functions.
* Retrieve the desired information using the public API functions described here.
This library provides several examples to demonstrate its use in some simple cases:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment