Vehicle Orientation Issue - Vehicle slides sideways instead of facing travel direction
I'm experiencing a vehicle orientation issue in OpenPASS where a vehicle travels in the correct trajectory but has incorrect visual orientation. The vehicle appears to "slide sideways" along its path instead of facing the direction of travel.
Environment:
- OpenPASS version: 1.2.0
- Platform: Windows
- Scenario: Straight Crossing Path (SCP) intersection scenario
Problem Details: I have implemented a 4-way intersection scenario with two vehicles:
- Agent0 (Ego): Positioned on R1, traveling east toward R3 - orientation correct
- Agent1 (Target): Positioned on R2, traveling north toward R4 - orientation incorrect
Agent1 follows the correct path and reaches the proper destination, but visually appears to face the same direction as Agent0 (east) instead of facing north toward its travel direction. This creates a "sliding sideways" effect where the vehicle moves perpendicular to its visual orientation.
What I've tried:
- Using type="absolute" with various heading values (0, 1.57, 3.14, 4.71 radians)
- Using type="relative" orientation
- Switching between lane +1 and lane -1 on R2
- Using WorldPosition instead of LanePosition with explicit heading
- Different vehicle models (car_bmw_7_1, car_bmw_i3)
- Different s-coordinates on the road
Current Configuration:
- Agent1 uses LanePosition roadId="R2" laneId="-1" s="100" with type="relative" orientation
- Vehicle has explicit turning rates configured to favor straight-through path (R2 to R2_4 weight=10.0)
- Both travel direction and collision detection work correctly
Expected Behavior: Agent1 should visually face north (perpendicular to Agent0) while traveling from R2 toward R4.
Actual Behavior: Agent1 faces the same direction as Agent0 (east) while traveling north, creating a sliding effect.
Additional Notes: This could potentially be an issue with either the OpenPASS simulation core or the OpVisualizer rendering. The vehicle dynamics and trajectory calculations appear correct based on the simulation behavior, but the visual representation shows incorrect orientation.
Files: I'm attaching the XODR (road network), XOSC (scenario), and output.xml files that reproduce this issue.
Questions:
- Is there a specific way to control vehicle visual orientation independently from travel direction?
- Are there known limitations with vehicle orientation in intersection scenarios?
- Could this be related to the 3D vehicle model orientation or lane geometry?
- Is this a simulation core issue or a visualization rendering issue?
- Is there an easy way of modifying the heading of a road in the .xodr file while keeping the junction angles consistent, or are geometric calculations necessary?
Any guidance on resolving this issue would be greatly appreciated.