-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#376 Road Rules definitions in Carla #414
base: main
Are you sure you want to change the base?
Changes from 8 commits
e441711
9b74b1f
5b10bff
9ddb9d7
4a00b94
b442603
8fc4dab
3a09935
46d67da
b605972
0df4628
40d8096
f0c4f35
fd0f6f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# Traffic Rules and Principles in CARLA | ||
|
||
## Table of Contents | ||
|
||
- [Introduction](#introduction) | ||
- [Key Traffic Principles and Complex Interactions](#key-traffic-principles-and-complex-interactions) | ||
- [CARLA Maps and Their Traffic Scenarios](#carla-maps-and-their-traffic-scenarios) | ||
- [Overview of CARLA Maps](#overview-of-carla-maps) | ||
- [Rural and Highway Scenarios](#rural-and-highway-scenarios) | ||
- [Custom Maps with ASAM OpenDRIVE®](#custom-maps-with-asam-opendrive) | ||
- [Units of Measurement](#units-of-measurement) | ||
- [References](#references) | ||
|
||
## Introduction | ||
|
||
CARLA (Car Learning to Act) is an open-source simulator for testing and developing self-driving car systems. | ||
|
||
It includes essential traffic rules, creating a flexible environment to test driving behaviors and interactions without strictly adhering to the traffic laws of any specific country. | ||
|
||
## Key Traffic Principles and Complex Interactions | ||
|
||
- **Traffic Signals**: Vehicles must stop at red lights and go on green. | ||
|
||
- **Stop Signs**: Vehicles must stop at stop signs and yield to pedestrians | ||
and other cars. | ||
|
||
- **Lane Management**: Cars should remain in their designated lanes. | ||
|
||
- **Speed Limits**: Different speed limits in various areas of the map allow | ||
testing of speed control and adherence to traffic laws. | ||
|
||
- **Pedestrian Rights**: Vehicles must yield to pedestrians at crosswalks, | ||
which is vital for pedestrian detection and ensuring safe stops. | ||
|
||
- **Intersection Management**: Vehicles must navigate intersections | ||
effectively, managing stop lights and stop signs while yielding when | ||
necessary to keep traffic moving. | ||
|
||
- **Roundabout Navigation**: Vehicles should yield to cars already in the | ||
roundabout. This tests their ability to navigate circular roads and merge | ||
correctly. | ||
|
||
- **Crosswalk Behavior**: Vehicles need to detect and stop for pedestrians | ||
at crosswalks, highlighting the importance of pedestrian safety. | ||
|
||
- **Bicycle Lane Navigation**: Vehicles should be able to detect and safely | ||
navigate around cyclists in traffic. | ||
|
||
- **Parking Maneuvers**: Vehicles are tested on their ability to park in | ||
tight spaces, simulating real-life parking challenges. | ||
|
||
## CARLA Maps and Their Traffic Scenarios | ||
|
||
CARLA has 12 maps, each designed to test different aspects of self-driving, from basic navigation to complex urban and rural situations. Users can also create custom maps, allowing for additional testing scenarios tailored to specific needs. | ||
|
||
### Overview of CARLA Maps | ||
|
||
- **Town 1**: A small town with T-junctions and bridges, focusing on managing | ||
intersections and staying in lanes. | ||
|
||
- **Town 2**: Similar to Town 1, this town includes shops and homes, testing | ||
navigation and awareness of the surroundings. | ||
|
||
- **Town 3**: A larger city area with roundabouts and underpasses, assessing | ||
navigation in roundabouts and speed adjustments. | ||
|
||
- **Town 4**: A small town with a figure-eight road, testing navigation in | ||
multiple lanes and interactions with pedestrians. | ||
|
||
- **Town 5**: An urban area with multilane roads and a highway, focusing on | ||
highway driving and commercial strategies. | ||
|
||
- **Town 6**: A less populated town with unique junctions, testing navigation | ||
in multiple lanes and the use of slip roads. | ||
|
||
- **Town 7**: A rural community with no marked roads, which tests navigation | ||
and parking in residential areas. | ||
|
||
- **Town 8 & Town 9**: Hidden maps used for the Leaderboard challenge. | ||
|
||
- **Town 10**: An inner-city area with various junctions and pedestrian | ||
activity, testing skills in complex traffic situations. | ||
|
||
- **Town 11**: A basic map for testing navigation in open areas with fewer | ||
visual guides. | ||
|
||
- **Town 12**: A large map based on Amarillo, Texas, featuring urban, | ||
residential, and rural areas to test navigation and visual skills across | ||
diverse environments. | ||
|
||
### Rural and Highway Scenarios | ||
|
||
Maps like **Town 7** and **Town 12** focus on rural and highway driving, | ||
simulating open and high-speed areas. They test long-distance driving, | ||
speed management, and safe overtaking, requiring drivers to adapt to | ||
unmarked roads and agricultural settings. | ||
|
||
## Road Network Creation with ASAM OpenDRIVE® | ||
|
||
Road networks in CARLA are built using **ASAM OpenDRIVE®**, which standardizes | ||
road descriptions: | ||
|
||
- **Hierarchical Structure**: Roads are organized into nodes for better | ||
integration. | ||
|
||
- **Reference Line**: Each road has a reference line that defines its shape. | ||
|
||
- **Interconnectivity**: Roads can connect to each other for realistic | ||
traffic flow. | ||
|
||
## Units of Measurement | ||
|
||
To keep tests consistent, CARLA uses standardized units: | ||
|
||
- **Speed**: Measured in meters per second (m/s). | ||
|
||
- **Distance**: Measured in meters. | ||
|
||
## References | ||
|
||
- CARLA Documentation: [CARLA](https://carla.readthedocs.io/en/latest/) | ||
|
||
- ASAM OpenDRIVE® Standard: [ASAM OpenDRIVE](https://www.asam.net/standards/detail/opendrive/) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Traffic Rules and Principles in CARLA | ||
|
||
## Table of Contents | ||
|
||
- [Introduction](#introduction) | ||
- [Key Traffic Principles and Complex Interactions](#key-traffic-principles-and-complex-interactions) | ||
- [CARLA Maps and Their Traffic Scenarios](#carla-maps-and-their-traffic-scenarios) | ||
- [Overview of CARLA Maps](#overview-of-carla-maps) | ||
- [Rural and Highway Scenarios](#rural-and-highway-scenarios) | ||
- [Custom Maps with ASAM OpenDRIVE®](#custom-maps-with-asam-opendrive) | ||
- [Units of Measurement](#units-of-measurement) | ||
- [References](#references) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add regional traffic standards section to Table of Contents. To fully address issue #376, consider adding a new section for regional traffic standards that covers:
🧰 Tools🪛 LanguageTool[uncategorized] ~6-~6: Possible missing preposition found.
(AI_HYDRA_LEO_MISSING_TO) |
||
## Introduction | ||
|
||
CARLA (Car Learning to Act) is an open-source simulator specifically designed for testing and developing autonomous driving systems. It incorporates essential traffic rules to create a flexible environment. This flexibility allows users to modify traffic regulations and design custom maps, enabling the evaluation of driving behaviors and interactions without strictly adhering to the traffic laws of any specific country. | ||
|
||
## Key Traffic Principles and Complex Interactions | ||
|
||
- **Traffic Signals**: Vehicles must stop at red lights and proceed on green, facilitating the testing of traffic light detection and timing adjustments. | ||
|
||
- **Stop Signs**: Vehicles are required to halt at stop signs, yielding to pedestrians and other vehicles, which is essential for ensuring safety in traffic scenarios. | ||
|
||
- **Lane Management**: Cars are expected to stay within designated lanes, aiding the development of lane-keeping and lane-following algorithms. | ||
|
||
- **Speed Limits**: Varying speed limits across different map zones allow for the testing of speed regulation and adherence to traffic laws. | ||
|
||
- **Pedestrian Rights**: Vehicles must yield to pedestrians at crosswalks, which is crucial for pedestrian detection and ensuring safe braking. | ||
|
||
- **Intersection Management**: Vehicles must effectively navigate intersections, managing stop lights and stop signs while yielding as necessary to maintain traffic flow. | ||
|
||
- **Roundabout Navigation**: Vehicles are required to yield to cars already within the roundabout, supporting testing of circular navigation and merging strategies. | ||
|
||
- **Crosswalk Behavior**: Vehicles must detect and stop for pedestrians at crosswalks, highlighting the importance of pedestrian safety. | ||
|
||
- **Bicycle Lane Navigation**: Vehicles should be able to detect and navigate around cyclists, ensuring safe interactions in mixed traffic environments. | ||
|
||
- **Parking Maneuvers**: Vehicles are tested on their ability to maneuver in tight parking spaces, simulating real-life parking constraints. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add regional variations to traffic principles. Each principle should address common regional variations. For example:
|
||
## CARLA Maps and Their Traffic Scenarios | ||
|
||
CARLA features 12 maps, each designed to test various aspects of autonomous driving, ranging from basic navigation to complex urban and rural settings. | ||
|
||
### Overview of CARLA Maps | ||
|
||
- **Town 1**: A small town with T-junctions and bridges, focusing on intersection management and lane discipline. | ||
|
||
- **Town 2**: Similar to Town 1, it includes commercial and residential areas, testing navigation and environmental awareness. | ||
|
||
- **Town 3**: A larger urban area with roundabouts and underpasses, assessing roundabout navigation and adaptive speed control. | ||
|
||
- **Town 4**: A small town with a figure-eight ring road, testing multi-lane navigation and pedestrian interactions. | ||
|
||
- **Town 5**: An urban environment featuring multilane roads and a highway, focusing on highway navigation and commercial driving strategies. | ||
|
||
- **Town 6**: A low-density town with unique junctions, testing multi-lane navigation and slip road utilization. | ||
|
||
- **Town 7**: A rural community with unmarked roads, challenging navigation and parking in residential areas. | ||
|
||
- **Town 8 & Town 9**: Secret maps used for the Leaderboard challenge. | ||
|
||
- **Town 10**: An inner-city area with diverse junctions and pedestrian activity, testing negotiation skills in complex traffic. | ||
|
||
- **Town 11**: A minimally decorated map for testing navigation over expansive areas with fewer visual cues. | ||
|
||
- **Town 12**: A large map inspired by Amarillo, Texas, with urban, residential, and rural areas, testing navigation and visual perception across diverse environments. | ||
|
||
### Rural and Highway Scenarios | ||
|
||
Maps like **Town 7** and **Town 12** emphasize rural and highway scenarios, simulating open and high-speed environments. They test long-distance driving, speed regulation, and safe overtaking, requiring adaptability to unmarked roads and agricultural structures in rural settings. | ||
|
||
## Road Network Creation with ASAM OpenDRIVE® | ||
|
||
Road networks in CARLA are created using **ASAM OpenDRIVE®**, which standardizes road descriptions: | ||
|
||
- **Hierarchical Structure**: Roads are organized in nodes for better application integration. | ||
|
||
- **Reference Line**: Each road has a reference line to define its shape. | ||
|
||
- **Interconnectivity**: Roads can connect for realistic traffic flow. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Expand OpenDRIVE section with regional variations. The OpenDRIVE section should address how different regional standards are handled:
This would help address the country-specific requirements from issue #376. |
||
## Units of Measurement | ||
|
||
To ensure consistency across tests, CARLA employs standardized units: | ||
|
||
- **Speed**: Measured in meters per second (m/s). | ||
|
||
- **Distance**: Measured in meters. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Enhance units section with conversion information. Add details about:
|
||
## References | ||
|
||
- CARLA Documentation: [CARLA](https://carla.readthedocs.io/en/latest/) | ||
|
||
- ASAM OpenDRIVE® Standard: [ASAM OpenDRIVE](https://www.asam.net/standards/detail/opendrive/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add country-specific regulations and variations.
While the principles are well-documented, the following aspects mentioned in issue #376 are missing:
Consider adding a new subsection addressing these regional variations to help users understand how CARLA handles different traffic rule systems.
Would you like me to help draft content for the country-specific regulations section?
🧰 Tools
🪛 LanguageTool
[misspelling] ~18-~18: This word is normally spelled with a hyphen.
Context: ...les, creating a flexible environment to test driving behaviors and interactions without stri...
(EN_COMPOUNDS_TEST_DRIVING)
🪛 Markdownlint
24-24: Expected: 0 or 2; Actual: 1
Trailing spaces
(MD009, no-trailing-spaces)
29-29: Expected: 0 or 2; Actual: 1
Trailing spaces
(MD009, no-trailing-spaces)
32-32: Expected: 0 or 2; Actual: 1
Trailing spaces
(MD009, no-trailing-spaces)
35-35: Expected: 0 or 2; Actual: 1
Trailing spaces
(MD009, no-trailing-spaces)
36-36: Expected: 0 or 2; Actual: 1
Trailing spaces
(MD009, no-trailing-spaces)
39-39: Expected: 0 or 2; Actual: 1
Trailing spaces
(MD009, no-trailing-spaces)
40-40: Expected: 0 or 2; Actual: 1
Trailing spaces
(MD009, no-trailing-spaces)
43-43: Expected: 0 or 2; Actual: 1
Trailing spaces
(MD009, no-trailing-spaces)
46-46: Expected: 0 or 2; Actual: 1
Trailing spaces
(MD009, no-trailing-spaces)
49-49: Expected: 0 or 2; Actual: 1
Trailing spaces
(MD009, no-trailing-spaces)