Skip to content
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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
39 changes: 39 additions & 0 deletions doc/research/paf24/general/carla_traffic_rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Traffic Rules in CARLA

## Introduction
CARLA (Car Learning to Act) is an open-source simulator for developing and testing autonomous driving systems. There is no strict set of traffic laws implemented, but key traffic behaviors are emphasized to create a realistic urban driving environment.

## Key Traffic Principles in CARLA
- **Traffic Signals**: Vehicles must obey traffic lights—stop at red and go at green.
- **Stop Signs**: Cars must stop at stop signs and yield to pedestrians and other vehicles.
- **Lane Management**: Vehicles should stay in their lanes.
- **Speed Limits**: There are speed limits in different areas of the simulation.
- **Pedestrian Rights**: Vehicles must yield to pedestrians at crosswalks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add country-specific traffic rules section.

To fully address issue #376, please add a new section covering:

  1. Common variations in traffic rules across different countries
  2. Regional differences in:
    • Traffic sign designs and positioning
    • Road markings and their meanings
    • Right-of-way rules
    • Speed limits and their enforcement

Example structure:

## Regional Variations in Traffic Rules

### Traffic Signs and Markings
- European standards
- American standards
- Asian standards

### Speed Limits
- Default urban/rural limits by region
- School zone variations
- Special zone regulations
🧰 Tools
🪛 Markdownlint

6-6: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


7-7: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

These principles help in developing algorithms for autonomous vehicles by simulating real-world traffic rules.

## Focus on Urban Environments
CARLA focuses on urban scenarios with interactions among vehicles, pedestrians, and cyclists. Examples include:
- **Intersections**: Handling traffic lights and stop signs.
- **Roundabouts**: Yielding to cars already in the circle.
- **Crosswalks**: Stopping for pedestrians.
- **Bike Lanes**: Watching out for cyclists.
- **Parking**: Maneuvering in tight spaces.

These scenarios are essential for training self-driving systems in complex environments.

## 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.

## Units of Measurement
In CARLA, speed is measured in meters per second (m/s), and distances are in meters, ensuring consistency in simulations.

## Flexibility and Customization
CARLA allows users to modify traffic rules and create custom maps. This flexibility enables researchers to design specific scenarios, enhancing the testing of self-driving technologies.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Enhance the flexibility section with technical details.

The current flexibility section is too brief. Consider adding:

  1. How traffic rules are implemented in CARLA's codebase
  2. Configuration options for modifying rules
  3. Code examples for common customizations
  4. Best practices for rule modifications

Would you like me to help draft technical examples for this section?

🧰 Tools
🪛 Markdownlint

34-34: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


## References
- CARLA Documentation: [CARLA](https://carla.readthedocs.io/en/latest/)
- ASAM OpenDRIVE® Standard: [ASAM OpenDRIVE](https://www.asam.net/standards/detail/opendrive/)
Loading