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

Adding additional Traffic Manager features to Carla Vehicles #27

Open
t27 opened this issue Mar 4, 2021 · 3 comments · May be fixed by #30
Open

Adding additional Traffic Manager features to Carla Vehicles #27

t27 opened this issue Mar 4, 2021 · 3 comments · May be fixed by #30
Labels
enhancement New feature or request

Comments

@t27
Copy link

t27 commented Mar 4, 2021

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,

  1. 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.
  2. 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,

@dfremont
Copy link
Collaborator

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!

@dfremont dfremont added the enhancement New feature or request label Mar 31, 2021
@t27
Copy link
Author

t27 commented Apr 2, 2021

Thanks @dfremont for the feedback, I just raised the above pull request for this enhancement, do let me know of any feedback on the code there

@t27
Copy link
Author

t27 commented Apr 16, 2021

Hey @dfremont, would it be possible to review the linked PR and see if its ok?

shumbo pushed a commit to shumbo/Scenic that referenced this issue Mar 23, 2023
…ositional_monitors

Compositional monitors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants