carla-simulator / scenario_runner

Traffic scenario definition and execution engine
https://scenario-runner.readthedocs.io/en/latest/
MIT License
536 stars 365 forks source link

Problem with OpenScenario world position #777

Closed Jk7913 closed 3 years ago

Jk7913 commented 3 years ago

Hi all,

I'm experiencing some problems when placing actors in OpenScenario scenarios by "World position". I have created scenarios based on a OpenDrive file (Carla Demo xodr files ass well), and in that scenario actor is positioned by World coordinates. When running that scenario with ScenarioRunner, it seems that actors are then shifted on this map. Sometimes this mean few meters down the road, sometimes they cannot be spawned. I also went the other way, if I try to run simple example scenario "PedestrianCrossingFront.xosc" in Esmini, actors are shifted on the map. Similar thing in Town04. Esmini

I have tried this on the other simulator as well and only CARLA is causing the problems for me. Placing actor by other types of position works fine. I'm only having a problem with world positioning and to me it seems like the origin of this coordinate system is somewhat shifted in ScenarioRunner. Any idea why this might be happening?

Thank you

fabianoboril commented 3 years ago

Most likely, this is a left-hand vs. right-hand coordinate system issue.

If you use the CARLA coordinates (e.g. those that you get in manual control), you have to use a "CARLA:" at the start of the description tag

If you use the OpenDRIVE coordinate frame, you have not to put the leading "CARLA:"

Does this help?

Jk7913 commented 3 years ago

Haven't done much testing, but for now it seems that that was the problem. Thank you