simulation.utils.road package
Subpackages
- simulation.utils.road.renderer package
- Submodules
- simulation.utils.road.renderer.obstacle module
- simulation.utils.road.renderer.start_box module
- simulation.utils.road.renderer.surface_markings module
- simulation.utils.road.renderer.tile module
- simulation.utils.road.renderer.traffic_sign module
- simulation.utils.road.renderer.utils module
- Module contents
- 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
_get_stop_line()arange_with_end()IntersectionIntersection.TYPEIntersection.ORIGINIntersection.STRAIGHTIntersection.LEFTIntersection.RIGHTIntersection.EQUALIntersection.YIELDIntersection.STOPIntersection.PRIORITY_YIELDIntersection.PRIORITY_STOPIntersection.angleIntersection.closingIntersection.turnIntersection.ruleIntersection.sizeIntersection.exit_directionIntersection.invisibleIntersection.sinIntersection.cosIntersection.yIntersection.xIntersection.zIntersection.uIntersection.vIntersection.wIntersection.loIntersection.liIntersection.roIntersection.riIntersection.cp_sign_south()Intersection.cp_surface_south()Intersection.cp_sign_west()Intersection.cp_surface_west()Intersection.cp_sign_north()Intersection.cp_sign_east()Intersection.cp_surface_east()Intersection.middle_line_southIntersection.left_line_southIntersection.right_line_southIntersection.middle_line_eastIntersection.left_line_eastIntersection.right_line_eastIntersection.middle_line_northIntersection.left_line_northIntersection.right_line_northIntersection.middle_line_westIntersection.left_line_westIntersection.right_line_westIntersection.closing_line_eastIntersection.obstaclesIntersection.traffic_signsIntersection.surface_markingsIntersection._speed_limitsIntersection.__transformIntersection.closing_line_westIntersection.closing_line_northIntersection.left_inner_circleIntersection.left_outer_circleIntersection.right_inner_circleIntersection.right_outer_circleIntersection.middle_lineIntersection.linesIntersection.get_beginning()Intersection.get_ending()Intersection.get_bounding_box()Intersection._get_intersection_traffic_signs()Intersection._get_intersection_surface_markings()Intersection.add_dynamic_obstacle()
- simulation.utils.road.sections.line_tuple module
- simulation.utils.road.sections.obstacle module
StaticObstacleParkingObstacleDynamicObstacleDynamicObstacle.id_DynamicObstacle.widthDynamicObstacle.depthDynamicObstacle.current_poseDynamicObstacle.speedDynamicObstacle.trigger_distanceDynamicObstacle.reset_trigger_distanceDynamicObstacle.triggered_at_timeDynamicObstacle.waiting_time_after_triggerDynamicObstacle.heightDynamicObstacle.get_pose()DynamicObstacle.setup()DynamicObstacle.__transformDynamicObstacle._align_line()DynamicObstacle.set_transform()
Pedestrian
- simulation.utils.road.sections.parking_area module
ParkingSpotParkingLotParkingLot.RIGHT_SIDEParkingLot.LEFT_SIDEParkingLot.DEFAULT_LEFT_DEPTHParkingLot.DEFAULT_RIGHT_DEPTHParkingLot.startParkingLot.spotsParkingLot._sideParkingLot.opening_angleParkingLot.__transformParkingLot.depthParkingLot.set_transform()ParkingLot.lengthParkingLot.borderParkingLot.obstaclesParkingLot.lines
ParkingAreaParkingArea.obstaclesParkingArea.traffic_signsParkingArea.surface_markingsParkingArea._speed_limitsParkingArea.__transformParkingArea.TYPEParkingArea.start_lineParkingArea.start_line_lengthParkingArea.left_lotsParkingArea.right_lotsParkingArea.set_transform()ParkingArea.get_bounding_box()ParkingArea.parking_obstaclesParkingArea.lines
- simulation.utils.road.sections.road_element module
- simulation.utils.road.sections.road_section module
MarkedLineRoadSectionRoadSection.SOLID_LINE_MARKINGRoadSection.DASHED_LINE_MARKINGRoadSection.MISSING_LINE_MARKINGRoadSection.DOUBLE_SOLID_LINE_MARKINGRoadSection.DOUBLE_DASHED_LINE_MARKINGRoadSection.DASHED_SOLID_LINE_MARKINGRoadSection.SOLID_DASHED_LINE_MARKINGRoadSection.idRoadSection.is_startRoadSection.left_line_markingRoadSection.middle_line_markingRoadSection.right_line_markingRoadSection.obstaclesRoadSection.traffic_signsRoadSection.surface_markingsRoadSection._speed_limitsRoadSection.TYPERoadSection.__transformRoadSection.prev_lengthRoadSection.set_transform()RoadSection.middle_lineRoadSection.left_lineRoadSection.right_lineRoadSection.linesRoadSection.speed_limitsRoadSection.get_bounding_box()RoadSection.get_beginning()RoadSection.get_ending()RoadSection.add_speed_limit()RoadSection.add_obstacle()RoadSection.add_dynamic_obstacle()RoadSection.setup_dynamic_obstacles()RoadSection.fit_ending()
- simulation.utils.road.sections.speed_limit module
- simulation.utils.road.sections.start_box module
StartBoxErrorStartBoxStartBox.TYPEStartBox.left_line_markingStartBox.middle_line_markingStartBox.right_line_markingStartBox.setup()StartBox.middle_lineStartBox.left_lineStartBox.right_lineStartBox.obstaclesStartBox.traffic_signsStartBox.surface_markingsStartBox._speed_limitsStartBox.__transformStartBox.frameStartBox.get_intersection()
- simulation.utils.road.sections.straight_road module
- simulation.utils.road.sections.surface_marking module
SurfaceMarkingSurfaceMarking.START_BOXSurfaceMarking.START_LINESurfaceMarking.ZEBRA_CROSSINGSurfaceMarking.BLOCKED_AREASurfaceMarking.PARKING_SPOT_XSurfaceMarking.TRAFFIC_ISLAND_BLOCKEDSurfaceMarking.ZEBRA_LINESSurfaceMarking.RIGHT_TURN_MARKINGSurfaceMarking.LEFT_TURN_MARKINGSurfaceMarking.STOP_LINESurfaceMarking.GIVE_WAY_LINESurfaceMarking.ZONE_10_STARTSurfaceMarking.ZONE_20_STARTSurfaceMarking.ZONE_30_STARTSurfaceMarking.ZONE_40_STARTSurfaceMarking.ZONE_50_STARTSurfaceMarking.ZONE_60_STARTSurfaceMarking.ZONE_70_STARTSurfaceMarking.ZONE_80_STARTSurfaceMarking.ZONE_90_STARTSurfaceMarking.ZONE_10_ENDSurfaceMarking.ZONE_20_ENDSurfaceMarking.ZONE_30_ENDSurfaceMarking.ZONE_40_ENDSurfaceMarking.ZONE_50_ENDSurfaceMarking.ZONE_60_ENDSurfaceMarking.ZONE_70_ENDSurfaceMarking.ZONE_80_ENDSurfaceMarking.ZONE_90_ENDSurfaceMarking.kind
SurfaceMarkingPolySurfaceMarkingRect
- simulation.utils.road.sections.traffic_island module
TrafficIslandTrafficIsland.TYPETrafficIsland.LINESTrafficIsland.ZEBRATrafficIsland.island_widthTrafficIsland.zebra_lengthTrafficIsland.curve_area_lengthTrafficIsland.curvatureTrafficIsland.zebra_marking_typeTrafficIsland._sign_distanceTrafficIsland.lengthTrafficIsland.middle_startTrafficIsland.middle_r_zebra_startTrafficIsland.middle_r_zebra_endTrafficIsland.middle_endTrafficIsland.right_zebra_startTrafficIsland.right_zebra_endTrafficIsland.left_zebra_startTrafficIsland.left_zebra_endTrafficIsland.middle_l_zebra_startTrafficIsland.middle_l_zebra_endTrafficIsland.bezier_points_mid_r_startTrafficIsland.bezier_points_mid_r_endTrafficIsland.bezier_points_mid_l_startTrafficIsland.obstaclesTrafficIsland.traffic_signsTrafficIsland.surface_markingsTrafficIsland._speed_limitsTrafficIsland.__transformTrafficIsland.bezier_points_mid_l_endTrafficIsland.middle_line_rTrafficIsland.middle_line_lTrafficIsland.middle_lineTrafficIsland.right_lineTrafficIsland.left_lineTrafficIsland.lines
- simulation.utils.road.sections.traffic_sign module
SignTupleget_all_signs()TrafficSignTrafficSign.ZONE_10_STARTTrafficSign.ZONE_20_STARTTrafficSign.ZONE_30_STARTTrafficSign.ZONE_40_STARTTrafficSign.ZONE_50_STARTTrafficSign.ZONE_60_STARTTrafficSign.ZONE_70_STARTTrafficSign.ZONE_80_STARTTrafficSign.ZONE_90_STARTTrafficSign.ZONE_10_ENDTrafficSign.ZONE_20_ENDTrafficSign.ZONE_30_ENDTrafficSign.ZONE_40_ENDTrafficSign.ZONE_50_ENDTrafficSign.ZONE_60_ENDTrafficSign.ZONE_70_ENDTrafficSign.ZONE_80_ENDTrafficSign.ZONE_90_ENDTrafficSign.RAMP_STARTTrafficSign.RAMP_ENDTrafficSign.PRIORITYTrafficSign.YIELDTrafficSign.STOPTrafficSign.ONCOMING_TRAFFICTrafficSign.NO_OVERTAKING_STARTTrafficSign.NO_OVERTAKING_ENDTrafficSign.TURN_RIGHTTrafficSign.TURN_LEFTTrafficSign.PASS_RIGHTTrafficSign.PASS_LEFTTrafficSign.SHARP_TURN_RIGHT_SMALLTrafficSign.SHARP_TURN_RIGHTTrafficSign.SHARP_TURN_LEFT_SMALLTrafficSign.SHARP_TURN_LEFTTrafficSign.ZEBRA_CROSSINGTrafficSign.PARKINGTrafficSign.EXPRESSWAY_STARTTrafficSign.EXPRESSWAY_ENDTrafficSign.__transformTrafficSign.kindTrafficSign.visible
- simulation.utils.road.sections.transformable module
- simulation.utils.road.sections.type module
- simulation.utils.road.sections.zebra_crossing module
- Module contents
QuadBezierCubicBezierLeftCircularArcRightCircularArcIntersectionIntersection.TYPEIntersection.ORIGINIntersection.STRAIGHTIntersection.LEFTIntersection.RIGHTIntersection.EQUALIntersection.YIELDIntersection.STOPIntersection.PRIORITY_YIELDIntersection.PRIORITY_STOPIntersection.angleIntersection.closingIntersection.turnIntersection.ruleIntersection.sizeIntersection.exit_directionIntersection.invisibleIntersection.sinIntersection.cosIntersection.yIntersection.xIntersection.zIntersection.uIntersection.vIntersection.wIntersection.loIntersection.liIntersection.roIntersection.riIntersection.cp_sign_south()Intersection.cp_surface_south()Intersection.cp_sign_west()Intersection.cp_surface_west()Intersection.cp_sign_north()Intersection.cp_sign_east()Intersection.cp_surface_east()Intersection.middle_line_southIntersection.left_line_southIntersection.right_line_southIntersection.middle_line_eastIntersection.left_line_eastIntersection.right_line_eastIntersection.middle_line_northIntersection.left_line_northIntersection.right_line_northIntersection.middle_line_westIntersection.left_line_westIntersection.right_line_westIntersection.closing_line_eastIntersection.obstaclesIntersection.traffic_signsIntersection.surface_markingsIntersection._speed_limitsIntersection.__transformIntersection.closing_line_westIntersection.closing_line_northIntersection.left_inner_circleIntersection.left_outer_circleIntersection.right_inner_circleIntersection.right_outer_circleIntersection.middle_lineIntersection.linesIntersection.get_beginning()Intersection.get_ending()Intersection.get_bounding_box()Intersection._get_intersection_traffic_signs()Intersection._get_intersection_surface_markings()Intersection.add_dynamic_obstacle()
StaticObstacleParkingObstacleDynamicObstacleDynamicObstacle.id_DynamicObstacle.widthDynamicObstacle.depthDynamicObstacle.current_poseDynamicObstacle.speedDynamicObstacle.trigger_distanceDynamicObstacle.reset_trigger_distanceDynamicObstacle.triggered_at_timeDynamicObstacle.waiting_time_after_triggerDynamicObstacle.heightDynamicObstacle.get_pose()DynamicObstacle.setup()DynamicObstacle.__transformDynamicObstacle._align_line()DynamicObstacle.set_transform()
PedestrianTrafficSignTrafficSign.ZONE_10_STARTTrafficSign.ZONE_20_STARTTrafficSign.ZONE_30_STARTTrafficSign.ZONE_40_STARTTrafficSign.ZONE_50_STARTTrafficSign.ZONE_60_STARTTrafficSign.ZONE_70_STARTTrafficSign.ZONE_80_STARTTrafficSign.ZONE_90_STARTTrafficSign.ZONE_10_ENDTrafficSign.ZONE_20_ENDTrafficSign.ZONE_30_ENDTrafficSign.ZONE_40_ENDTrafficSign.ZONE_50_ENDTrafficSign.ZONE_60_ENDTrafficSign.ZONE_70_ENDTrafficSign.ZONE_80_ENDTrafficSign.ZONE_90_ENDTrafficSign.RAMP_STARTTrafficSign.RAMP_ENDTrafficSign.PRIORITYTrafficSign.YIELDTrafficSign.STOPTrafficSign.ONCOMING_TRAFFICTrafficSign.NO_OVERTAKING_STARTTrafficSign.NO_OVERTAKING_ENDTrafficSign.TURN_RIGHTTrafficSign.TURN_LEFTTrafficSign.PASS_RIGHTTrafficSign.PASS_LEFTTrafficSign.SHARP_TURN_RIGHT_SMALLTrafficSign.SHARP_TURN_RIGHTTrafficSign.SHARP_TURN_LEFT_SMALLTrafficSign.SHARP_TURN_LEFTTrafficSign.ZEBRA_CROSSINGTrafficSign.PARKINGTrafficSign.EXPRESSWAY_STARTTrafficSign.EXPRESSWAY_ENDTrafficSign.__transformTrafficSign.kindTrafficSign.visible
SurfaceMarkingPolySurfaceMarkingRectParkingAreaParkingArea.obstaclesParkingArea.traffic_signsParkingArea.surface_markingsParkingArea._speed_limitsParkingArea.__transformParkingArea.TYPEParkingArea.start_lineParkingArea.start_line_lengthParkingArea.left_lotsParkingArea.right_lotsParkingArea.set_transform()ParkingArea.get_bounding_box()ParkingArea.parking_obstaclesParkingArea.lines
ParkingLotParkingLot.RIGHT_SIDEParkingLot.LEFT_SIDEParkingLot.DEFAULT_LEFT_DEPTHParkingLot.DEFAULT_RIGHT_DEPTHParkingLot.startParkingLot.spotsParkingLot._sideParkingLot.opening_angleParkingLot.__transformParkingLot.depthParkingLot.set_transform()ParkingLot.lengthParkingLot.borderParkingLot.obstaclesParkingLot.lines
ParkingSpotStraightRoadZebraCrossingRoadSectionRoadSection.SOLID_LINE_MARKINGRoadSection.DASHED_LINE_MARKINGRoadSection.MISSING_LINE_MARKINGRoadSection.DOUBLE_SOLID_LINE_MARKINGRoadSection.DOUBLE_DASHED_LINE_MARKINGRoadSection.DASHED_SOLID_LINE_MARKINGRoadSection.SOLID_DASHED_LINE_MARKINGRoadSection.idRoadSection.is_startRoadSection.left_line_markingRoadSection.middle_line_markingRoadSection.right_line_markingRoadSection.obstaclesRoadSection.traffic_signsRoadSection.surface_markingsRoadSection._speed_limitsRoadSection.TYPERoadSection.__transformRoadSection.prev_lengthRoadSection.set_transform()RoadSection.middle_lineRoadSection.left_lineRoadSection.right_lineRoadSection.linesRoadSection.speed_limitsRoadSection.get_bounding_box()RoadSection.get_beginning()RoadSection.get_ending()RoadSection.add_speed_limit()RoadSection.add_obstacle()RoadSection.add_dynamic_obstacle()RoadSection.setup_dynamic_obstacles()RoadSection.fit_ending()
BlockedAreaTrafficIslandTrafficIsland.TYPETrafficIsland.LINESTrafficIsland.ZEBRATrafficIsland.island_widthTrafficIsland.zebra_lengthTrafficIsland.curve_area_lengthTrafficIsland.curvatureTrafficIsland.zebra_marking_typeTrafficIsland._sign_distanceTrafficIsland.lengthTrafficIsland.middle_startTrafficIsland.middle_r_zebra_startTrafficIsland.middle_r_zebra_endTrafficIsland.middle_endTrafficIsland.right_zebra_startTrafficIsland.right_zebra_endTrafficIsland.left_zebra_startTrafficIsland.left_zebra_endTrafficIsland.middle_l_zebra_startTrafficIsland.middle_l_zebra_endTrafficIsland.bezier_points_mid_r_startTrafficIsland.bezier_points_mid_r_endTrafficIsland.bezier_points_mid_l_startTrafficIsland.obstaclesTrafficIsland.traffic_signsTrafficIsland.surface_markingsTrafficIsland._speed_limitsTrafficIsland.__transformTrafficIsland.bezier_points_mid_l_endTrafficIsland.middle_line_rTrafficIsland.middle_line_lTrafficIsland.middle_lineTrafficIsland.right_lineTrafficIsland.left_lineTrafficIsland.lines
SpeedLimitCustomSectionStartBoxStartBox.TYPEStartBox.left_line_markingStartBox.middle_line_markingStartBox.right_line_markingStartBox.setup()StartBox.middle_lineStartBox.left_lineStartBox.right_lineStartBox.obstaclesStartBox.traffic_signsStartBox.surface_markingsStartBox._speed_limitsStartBox.__transformStartBox.frameStartBox.get_intersection()
Submodules
simulation.utils.road.config module
Classes:
|
- class Config[source]
Bases:
objectAttributes:
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: ~typing.List[~simulation.utils.road.sections.road_section.RoadSection] = <factory>, length: float = 0, start_box: bool = False)[source]
Bases:
objectContainer 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.
Start road with Start Box.
Methods:
append(section)Append a road section.
close_to_section(target_pose[, p_curvature])Append a road section that connects the last section to the given target section.
close_loop([p_curvature])Append a road section that connects the last section to the beginning.
close_intersection(intersection, ending[, ...])Append a road section that connects the last section of the road to the given ending of a intersection.
finalize()- _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[RoadSection]
All sections of the road.
- length: float = 0
Length of road.
- start_box: bool = False
Start road with Start Box.
- append(section: RoadSection)[source]
Append a road section. Determine id of the section.
- Parameters:
section – New road section.
- close_to_section(target_pose: Pose, p_curvature: float = 2)[source]
Append a road section that connects the last section to the given target section.
The road’s beginning and it’s end are connected using a cubic bezier curve.
- Parameters:
p_curvature – Scale the curvature of the resulting loop.
- close_loop(p_curvature: float = 2)[source]
Append a road section that connects the last section to the beginning.
The road’s end and it’s beginning are connected using a cubic bezier curve.
- Parameters:
p_curvature – Scale the curvature of the resulting loop.
- close_intersection(intersection: Intersection, ending: int, turn_direction: int = 0, p_curvature: float = 2)[source]
Append a road section that connects the last section of the road to the given ending of a intersection.
The road’s end and the intersection are connected using a cubic bezier curve.
- Parameters:
intersection – The intersection object to which the bezier curve connects.
ending – The side of the (initial) intersection the bezier curve connects to.
turn_direction – Direction in which the car should turn when crossing the intersection a second time.
p_curvature – Scale the curvature of the resulting loop.
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.