Skip to content

Speed Limit Computation #98

Description

@Daniel-xsy

Hi, thanks for the great work on SimLingo!

I was looking into how speed limits are computed in team_code/speed_limits/compute_speed_limits.py and noticed that it uses CARLA's landmark API to find nearby MaximumSpeed traffic signs, then does a binary search up to 4km, spatial interpolation for gaps, and finally discretizes all values to {50, 80, 100, 120} km/h.

However, CARLA already provides the speed limit directly from the OpenDRIVE road definition via waypoint.get_speed_limit(), which reads from the <road><type><speed> sections of the map. This would give the exact speed limit for any road segment without needing sign lookup or interpolation.

From what I can tell, the landmark-based approach can produce different values from the actual OpenDRIVE road speed — for example, roads with no nearby speed sign default to 50 km/h, and the discretization to {50, 80, 100, 120} loses the real values (e.g. a 30 km/h road becomes 50 km/h).

I'm wondering if there is a specific reason for using the landmark-based approach over the direct OpenDRIVE speed?

Would appreciate any context on this. Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions