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

openscenario_parse.py don't supports parameter which is scientific notation (for example, 1.234+e+01) #927

Closed
fukuchi0105 opened this issue Aug 6, 2022 · 1 comment · Fixed by #1023
Assignees
Labels
bug Something isn't working

Comments

@fukuchi0105
Copy link

fukuchi0105 commented Aug 6, 2022

Describe the bug
In "openscenario_parse.py", "is_literal function" don't support scientific notation (for example, 1.234+e+01). Therefore, when parsing OpenSCENARIO file which include scientific notations parameter, it cannot parse it.

current parser of regular expression: r"(-)?\d+(.\d)?"
proposed parser of regular expression: r"(-)?\d+(.\d)?((e|E)(+|-)\d+)?"

To Reproduce
Steps to reproduce the behavior:

  1. make OpenSCENARIO file which include scientific notations
  2. run scnario_runner by using above OpenSCENARIO file

Expected behavior
Be able to run scenario by using OpenSCENARIO file including scientific notations

Desktop (please complete the following information):

  • OS: Windows 10
  • CARLA 0.9.13
  • Python version 3.9
  • Version 0.9.13
@golnazraja
Copy link
Contributor

I also faced the same issue and fixed it with adding support of parsing parameters with scientific notation.

Here is link to my pull request: #1023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants