simulation.utils.road package¶
Subpackages¶
- simulation.utils.road.renderer package
- simulation.utils.road.sections package
- Submodules
- simulation.utils.road.sections.bezier_curve module
- simulation.utils.road.sections.blocked_area module
- simulation.utils.road.sections.circular_arc module
- simulation.utils.road.sections.custom_section module
- simulation.utils.road.sections.intersection module
- simulation.utils.road.sections.line_tuple module
- simulation.utils.road.sections.obstacle module
- simulation.utils.road.sections.parking_area module
- simulation.utils.road.sections.road_element module
- simulation.utils.road.sections.road_section module
- simulation.utils.road.sections.speed_limit module
- simulation.utils.road.sections.straight_road module
- simulation.utils.road.sections.surface_marking module
- simulation.utils.road.sections.traffic_island module
- simulation.utils.road.sections.traffic_sign module
- simulation.utils.road.sections.transformable module
- simulation.utils.road.sections.type module
- simulation.utils.road.sections.zebra_crossing module
- Module contents
Submodules¶
simulation.utils.road.config module¶
Classes:
|
- class Config[source]¶
Bases:
object
Attributes:
Methods:
get_prio_sign_dist
([rand])get_turn_sign_dist
([rand])get_surface_mark_dist
([rand])get_sign_road_padding
([rand])- road_width = 0.4¶
- TURN_SF_MARK_WIDTH = 0.072¶
- TURN_SF_MARK_LENGTH = 0.5¶
- ROAD_MARKING_DISTANCE = 0.2¶
- PRIORITY_SIGN_DISTANCE_INTERVALL = (0.3, 0.5)¶
- TURN_SIGN_DISTANCE_INTERVALL = (0.15, 0.25)¶
- SURFACE_MARKING_DISTANCE_INTERVALL = (0.05, 0.25)¶
- SIGN_ROAD_PADDING_INTERVALL = (0.075, 0.125)¶
simulation.utils.road.road module¶
Road class used to define roads as a python class.
A simulated road can be defined through an object of type Road. It contains all sections of that road as a list.
Classes:
|
Container object for roads. |
Functions:
|
|
|
Load road object from file. |
- class Road(use_seed: bool = True, sections: List[simulation.utils.road.sections.road_section.RoadSection] = <factory>, length: float = 0)[source]¶
Bases:
object
Container object for roads.
A road consists of multiple road sections that are concatenated. The sections attribute contains these sections in the correct order.
Attributes:
Name of the road.
Seed used when generating the road.
Use a default seed if none is provided.
All sections of the road.
Length of road.
Methods:
append
(section)Append a road section.
close_loop
([p_curvature])Append a road section that connects the last section to the beginning.
- _name: str = None¶
Name of the road.
The name attribute is determined by the name of the file. It is filled in when the road is generated.
- _seed: str = None¶
Seed used when generating the road.
Determined when generating the road.
- use_seed: bool = True¶
Use a default seed if none is provided.
By default the use_seed attribute is true and a seed is set before creating the road. If use_seed is set to False, the seed is invalidated and there will be different random values every time the road is created.
- sections: List[simulation.utils.road.sections.road_section.RoadSection]¶
All sections of the road.
- length: float = 0¶
Length of road.
- append(section: simulation.utils.road.sections.road_section.RoadSection)[source]¶
Append a road section. Determine id of the section.
- Parameters
section – New road section.
- load(road_name: str, seed: str = 'KITCAR') → simulation.utils.road.road.Road[source]¶
Load road object from file.
- Parameters
road_name – Name of the file containing the road definition.
seed – Predetermine random values.
Module contents¶
Definition of the road module package.
The road module package contains a number of modules and subpackages that are used to create and render roads as Gazebo worlds.