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

Problem running RoadRunner OSC2.0 file in CARLA #4

Open
SudoSnoop opened this issue May 24, 2023 · 4 comments
Open

Problem running RoadRunner OSC2.0 file in CARLA #4

SudoSnoop opened this issue May 24, 2023 · 4 comments

Comments

@SudoSnoop
Copy link

SudoSnoop commented May 24, 2023

Hi there. I have a problem importing my scene, which I had built within Roadrunner. It has a simple logic with 3 (2 active) actors in it.

image

I exported it as ASAM Open Scenario 2.0 format. I then tried to run the scenario with the scenariorunner of Carla. Since the generated .osc file relies on data which appears to be necessary as import I downloaded the official standard.osc file from Asam and altered the statement for the import accordingly to the file name.

I would expect the scenario then to run within a running simulation of the carla server. I also tried exporting the scenario to 1.0. It does run up to a certain point and then crashes. So I had an attempt with version 2.0 but to no success unfortunately.

What would be a common way to solve this issue? Is there something I miss?

The output is as follows:
(formatted, external link)
Pastebin

~/scenario_runner$ python scenario_runner.py --openscenario2 srunner/examples/Export.osc WARNING: Version mismatch detected: You are trying to connect to a simulator that might be incompatible with this API WARNING: Client API version = 0.9.13-1-g8854804f4 WARNING: Simulator API version = 0.9.13-1-g8854804f4-dirty [Error] file "/home/carlaserver2/scenario_runner/srunner/examples/standard.osc", line 764:27, no viable alternative at input 'it==actor' SyntaxError: invalid syntax [Error] file "/home/carlaserver2/scenario_runner/srunner/examples/standard.osc", line 776:27, no viable alternative at input 'it==actor' SyntaxError: invalid syntax [Error] file "/home/carlaserver2/scenario_runner/srunner/examples/standard.osc", line 809:27, no viable alternative at input 'it==actor' SyntaxError: invalid syntax [Error] file "/home/carlaserver2/scenario_runner/srunner/examples/standard.osc", line 821:27, no viable alternative at input 'it==actor' SyntaxError: invalid syntax [Error] file "/home/carlaserver2/scenario_runner/srunner/examples/standard.osc", line 850:27, no viable alternative at input 'it==actor' SyntaxError: invalid syntax [Error] file "/home/carlaserver2/scenario_runner/srunner/examples/standard.osc", line 1021:8, ' ' SyntaxError: invalid syntax [Error] file "/home/carlaserver2/scenario_runner/srunner/examples/standard.osc", line 1023:4, 'at' SyntaxError: invalid syntax [Error] file "/home/carlaserver2/scenario_runner/srunner/examples/standard.osc", line 1024:8, ' ' SyntaxError: invalid syntax [Error] file "/home/carlaserver2/scenario_runner/srunner/examples/standard.osc", line 1024:4, ' ' SyntaxError: invalid syntax [Error] file "/home/carlaserver2/scenario_runner/srunner/examples/standard.osc", line 1026:8, ' ' SyntaxError: invalid syntax [Error] file "/home/carlaserver2/scenario_runner/srunner/examples/standard.osc", line 1026:4, ' ' SyntaxError: invalid syntax [Error] file "/home/carlaserver2/scenario_runner/srunner/examples/standard.osc", line 1028:8, ' ' SyntaxError: invalid syntax [Error] file "/home/carlaserver2/scenario_runner/srunner/examples/standard.osc", line 1028:4, ' ' SyntaxError: invalid syntax Traceback (most recent call last): File "scenario_runner.py", line 648, in main result = scenario_runner.run() File "scenario_runner.py", line 547, in run result = self._run_osc2() File "scenario_runner.py", line 530, in _run_osc2 config = OSC2ScenarioConfiguration(self._args.openscenario2, self.client) File "/home/carlaserver2/scenario_runner/srunner/scenarioconfigs/osc2_scenario_configuration.py", line 52, in __init__ self.ast_tree = OSC2Helper.gen_osc2_ast(self.filename) File "/home/carlaserver2/scenario_runner/srunner/tools/osc2_helper.py", line 54, in gen_osc2_ast parse_tree = parser.osc_file() File "/home/carlaserver2/scenario_runner/srunner/osc2/osc2_parser/OpenSCENARIO2Parser.py", line 916, in osc_file self._errHandler.sync(self) File "/home/carlaserver2/.local/lib/python3.6/site-packages/antlr4/error/ErrorStrategy.py", line 234, in sync self.reportUnwantedToken(recognizer) File "/home/carlaserver2/.local/lib/python3.6/site-packages/antlr4/error/ErrorStrategy.py", line 318, in reportUnwantedToken recognizer.notifyErrorListeners(msg, t, None) File "/home/carlaserver2/.local/lib/python3.6/site-packages/antlr4/Parser.py", line 322, in notifyErrorListeners listener.syntaxError(self, offendingToken, line, column, msg, e) File "/home/carlaserver2/.local/lib/python3.6/site-packages/antlr4/error/ErrorListener.py", line 60, in syntaxError delegate.syntaxError(recognizer, offendingSymbol, line, column, msg, e) File "/home/carlaserver2/scenario_runner/srunner/osc2/error_manager/error_listener.py", line 54, in syntaxError self.reportIndentationError(line, column, None) File "/home/carlaserver2/scenario_runner/srunner/osc2/error_manager/error_listener.py", line 31, in reportIndentationError LOG_ERROR(token_name, line=line, column=column) File "/home/carlaserver2/scenario_runner/srunner/osc2/utils/log_manager.py", line 73, in LOG_ERROR run_log_msg = '[Error]' + ' line ' + str(line) + ':' + str(column) + ', ' + msg TypeError: must be str, not NoneType

Desktop (please complete the following information):

  • OS: Ubuntu 18.04.6 LTS
  • CARLA 0.9.13
  • Python 3.6.9
  • ScenarioRunner 0.9.13
  • antlr4 4.10.1-complete
@XiaoFei9704
Copy link
Collaborator

Hello!
Thank you for using this project. I tried using improt standard.osc locally and encountered the same error as you.
This is probably because our support for the OpenSCENARIO 2.0 standard is not yet complete.
I suggest that you use import basic.osc in your osc file.
import basic.osc

@SudoSnoop
Copy link
Author

SudoSnoop commented May 25, 2023

Thank you for the quick reply @SEEKERXC .

It just came to my mind that it might not yet be fully implemented.
Unfortunately the exported scenarios seems to require the standard.osc file generally. So does my.

My scenario came out like this, except that I edited from import osc.standard to standard.osc, like mentioned here:
Asam Documentation
grafik
Pastebin

I tried using basic.osc as well as I looked in your other example osc files. But it didn't work.

I'm aware of 3 ways to get it done.

  1. Write a python class for the scenario. (Time consuming as I'm not familiar with requirements [documentation is not complete])
  2. Import as OpenScenario 1.0 (Only working until some logic happens [needs probably manual rewriting of the code, but that cannot be the goal])
  3. Using your fork of the scenariorunner to import it as openscenario 2.0. (Currently not fully implemented)

So my options are limited right now. Do you know by chance if there is a reliable way from Roadrunner to Carla - scenariorunner that just works out of the box?

@XiaoFei9704
Copy link
Collaborator

I commented out the lines in standard.osc that caused the error, and it runs properly, though there are still some other errors.
2023-05-26 14-19-17 的屏幕截图
2023-05-26 14-19-32 的屏幕截图
2023-05-26 14-39-16 的屏幕截图

@SudoSnoop
Copy link
Author

Hi @SEEKERXC
I tried it your way as well. But I've got a massive error output either way.
Pastebin
Even if I'm running the standard.osc itself. I think I commented out all the lines that were noted in the output before.

grafik

grafik

grafik

grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants