carla-simulator / scenario_runner

Traffic scenario definition and execution engine
https://carla-scenariorunner.readthedocs.io/en/latest/
MIT License
534 stars 363 forks source link

OpenScenario RelativeLanePosition and Waypoint Following #809

Open repa1030 opened 3 years ago

repa1030 commented 3 years ago

Describe our question or idea I have some trouble with OpenScenario with teleporting an adversary vehicle. The teleport by RelativeLanePosition works just fine and the vehicle will spawn on the correct lane but the waypoint follower will not follow this lane but the oncoming lane doing a U-turn ("actual drive path" in picture).

Expected behavior Driving on the current lane where the vehicle was spawned, as shown in the picture below as "expected drive path".

Screenshots Screenshot from 2021-09-24 13-39-46-1

Desktop (please complete the following information):

fabianoboril commented 3 years ago

Can you share the scenario?

repa1030 commented 3 years ago

I just removed the initial position (that was a LanePosition) and now the adversary vehicle starts with the correct drive path but after a while it does a U-turn again. Here is the scenario file (changed it to txt cause github did not let me upload a xosc file): A1_OvertakeOncoming.txt

fabianoboril commented 3 years ago

Can you update to the 0.9.11 branch (not tag)? We made a couple of improvements over the time, which might have addressed this issue. The XOSC file looks fine on first glance.

repa1030 commented 3 years ago

I just updated my local repo to the 0.9.11 branch about 1-2 hrs ago as I thought this might fix the problem 😄 I corrected the orientation of the RelativeLanePosition, as it was relative before but the problem stays the same: A1_OvertakeOncoming.txt

The vehicle starts driving correct (when no initial pos provided and only the teleport action during the maneuver is given) and and after some short time, it does an U-Turn.

WindTi commented 2 years ago

Did you solve this problem? I had a similar problem when I was writing a scene where the initially generated vehicle was teleport to the new location instead of going along the road but going toward the initial point, as if a new route had been formed between the two points.

WindTi commented 2 years ago

I'm now on the 0.9.12 branch. I think you have the same problem as I have, I have tried to adjust the adversaries in different positions multiple times, and each time the regenerated vehicle races toward the corresponding initialization build point. Apparently your initialization build point is behind, so you're creating a u-turn.

yiyizi112 commented 2 years ago

I'm now on the 0.9.12 branch. I think you have the same problem as I have, I have tried to adjust the adversaries in different positions multiple times, and each time the regenerated vehicle races toward the corresponding initialization build point. Apparently your initialization build point is behind, so you're creating a u-turn. I have encountered the same problem. Have you solved it?