You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Scenic for Carla scenarios and i want to control a few attributes in the Autopilot vehicles. The TrafficManager in Carla allows control of vehicle attributes such as Traffic light ignorance and speed limit violations.
These are not available through the Carla Vehicle API and are instead available through the TrafficManager object, but the properties still are applied to vehicles.
for example, if I want a given vehicle(actor1) to ignore traffic lights 100% of the times, I would make this API call
# tm is the TrafficManager object
tm.ignore_lights_percentage(actor1, 100)
Currently I want to focus on ignore_lights_percentage and vehicle_percentage_speed_difference. More details on all the calls here.
I want to add these features as Actions to Scenic, so that we have control over these parameters from the Scenic descriptions.
I have 2 ideas right now,
We can have separate actions for each of the parameters(allowing users to change the parameters dynamically in their scenarios). In this case, I would write the new functions in the actions.py file.
We can also have these as optional function arguments to the existing SetAutopilotAction. In this case, I would possibly write the new functions in the utils file and make the necessary calls in the SetAutopilotAction code.
Do let me know what you'll think about this,
The text was updated successfully, but these errors were encountered:
Hello Tarang - sorry for the slow reply! Since these parameters only make sense for vehicles which are actually using the autopilot, I think your second suggested approach would be best. I think you can put the new code directly in SetAutopilotAction.applyTo, e.g. adding a line like sim.tm.ignore_lights_percentage(vehicle, self.ignore_lights_percentage). If you're able to make that work and can put together a pull request, I'd be happy to merge it in. Thanks!
I am using Scenic for Carla scenarios and i want to control a few attributes in the Autopilot vehicles. The TrafficManager in Carla allows control of vehicle attributes such as Traffic light ignorance and speed limit violations.
These are not available through the Carla
Vehicle
API and are instead available through theTrafficManager
object, but the properties still are applied to vehicles.for example, if I want a given vehicle(
actor1
) to ignore traffic lights 100% of the times, I would make this API callCurrently I want to focus on
ignore_lights_percentage
andvehicle_percentage_speed_difference
. More details on all the calls here.I want to add these features as Actions to Scenic, so that we have control over these parameters from the Scenic descriptions.
I have 2 ideas right now,
actions.py
file.SetAutopilotAction
. In this case, I would possibly write the new functions in theutils
file and make the necessary calls in theSetAutopilotAction
code.Do let me know what you'll think about this,
The text was updated successfully, but these errors were encountered: