- edited description
Improve RoadCreator class to support multiple geometries
RoadMap structure
This issue has been transformed to the following description. We should provide a RoadCreator class that supports multiple geometries. For doing so, I propose a RoadMap structure like the following:
- RoadMap: base and parent class that holds the complete road structure.
- Road: a road keeps multiple lanes may go in the same direction or not. Just a container for the time being.
- Lane: is a constant width path, parametrized a Curve object that should provide a baseline path.
On the other hand, we need to provide a base Curve and SplineCurve classes to support a specific geometry. RoadCreator will need to be compliant with a Lane so it can load it.
[Old issue] Improve RoadCreator class to support multiple geometries
We need to improve the RoadCreator class to support multiple geometries, such as Splines and Bezier (see issue #174) to make better use of the API.
Parent issue: #172
Comments (9)
-
reporter -
reporter - changed status to open
-
reporter - changed status to new
-
reporter - changed status to open
-
reporter We propose the creation of new entities. We already have some like:
- LaneTermination
- Junction
We will add some new entities:
- Curve
- --> SplineCurve
- --> BezierCurve
- Lane
And then the lane will consume a Curve, so it will be simpler to change the inner implementation. Providing a Curve that will match the API will be enough to change the geometry of the lane.
Here we propose two frames, one which will be called global (x,y,z) isotropic frame and another isotropic frame that will be on the curve trajectory (s,r,h). The former will be consumed from outside, and the latter will be the necessary to locate a point over the curve. Curves objects should provide a path length method (so we can consume in terms of s instead of the curve parametrization).
We will do implementations of Spline and then in future issues for Bezier curves.
-
reporter After a brief update on the code to validate the approach we got the following:
Apparently the only issue is the following:
It is important to say that Bezier for connections are still no being implemented. On the other hand, for splines, just a brief conversion from
s
tot
is being made (t = s / spline.ArcLength()
). -
reporter RoadCreators should be changed. Besides, we need to create a new class to hold the lanes:
- Road
And from it, we will create another one to hold all the Roads:
- RoadMap
These primitives will just work as containers for the scope of this issue.
-
reporter - edited description
-
reporter After adding the connections we get the following:
- Log in to comment