Recommended way of getting the speed limit?

Is vehicle.get_speed_limit() considered privileged information in the SENSORS track? If so, what is the recommended method of getting the speed limit of the ego vehicle to pass to our agents?


In general, any privileged information is that kind of information that you wouldn’t have in real life, plus any of the example agents (as those use that kind of information). In other words, you cannot use any of the functions that CARLA’s PythonAPI offers, except for some utility ones such as carla.Location, carla.VehicleControl… which are just there to help you structure things, if needed.

For your particular case, you don’t have the instance of the ego vehicle, so you’d have to create a client, then the world, and finally filter all the actors for the ego vehicle. As you can see, that’s information you wouldn’t have in real life so yes, that is indeed privileged information. You should get that information from the sensors.