mirror of
https://github.com/pim-n/road-gen.git
synced 2026-02-03 09:23:09 +01:00
Improve documentation
This commit is contained in:
@ -42,11 +42,10 @@ class SegmentedRoadGenerator(BaseRoadGenerator):
|
|||||||
alpha (float, optional): Dirichlet concentration parameter. A higher value leads to more uniform apportionment of the length amongst the segments, while a lower value allows more random apportionment. Defaults to 1.0.
|
alpha (float, optional): Dirichlet concentration parameter. A higher value leads to more uniform apportionment of the length amongst the segments, while a lower value allows more random apportionment. Defaults to 1.0.
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
ValueError: _description_
|
ValueError: "No valid radius for this turn segment" means a turn is too tight given its segment length and the velocity. To fix this, you can try to reduce the amount of segments or increase length. Increasing alpha (Dirichlet concentration parameter) can also help because this reduces the odds of very small lengths being assigned to turn segments.
|
||||||
ValueError: _description_
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
np.ndarray: _description_
|
Tuple[np.ndarray, np.ndarray]: x and y coordinates of the waypoints describing the random road.
|
||||||
"""
|
"""
|
||||||
if not all(segment in prefabs.PREFABS.keys() for segment in segments):
|
if not all(segment in prefabs.PREFABS.keys() for segment in segments):
|
||||||
raise ValueError(f"Invalid segment type provided. Available choices: {prefabs.SEGMENTS.keys()}")
|
raise ValueError(f"Invalid segment type provided. Available choices: {prefabs.SEGMENTS.keys()}")
|
||||||
|
|||||||
Reference in New Issue
Block a user