Skip to content

Commit b04b23a

Browse files
committed
added test refs #21, #15282
1 parent 4ef260c commit b04b23a

File tree

6 files changed

+54
-3
lines changed

6 files changed

+54
-3
lines changed

tests/complex/traci/vehicle/moveToXY/testsuite.complex

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,14 @@ guess_next_edge_keepRoute2
5959
# move vehicle against eddge direction
6060
guess_next_edge_keepRoute2_reverse
6161

62-
# moveToXY and opposite direction driving
63-
ticket5029
64-
6562
# test collision directly after moveToXY (#10952)
6663
collision
6764

6865
# use vClass when looking up candidate internal edges along the route (#10952)
6966
parallel_internal_edges
67+
68+
# moveToXY and opposite direction driving
69+
ticket5029
70+
71+
# distance from lane center should be less relevant than angle if the vehicle is fully on the lane
72+
ticket15282

tests/complex/traci/vehicle/moveToXY/ticket15282/errors.complex

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<routes>
2+
<route id="r0" edges="SC CN"/>
3+
</routes>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tests/complex/traci/vehicle/moveToXY/ticket15282/runner.py
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Retrying in 1 seconds
2+
:C_6_0
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
4+
# Copyright (C) 2008-2025 German Aerospace Center (DLR) and others.
5+
# This program and the accompanying materials are made available under the
6+
# terms of the Eclipse Public License 2.0 which is available at
7+
# https://www.eclipse.org/legal/epl-2.0/
8+
# This Source Code may also be made available under the following Secondary
9+
# Licenses when the conditions for such availability set forth in the Eclipse
10+
# Public License 2.0 are satisfied: GNU General Public License, version 2
11+
# or later which is available at
12+
# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
13+
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
14+
15+
# @file runner.py
16+
# @author Jakob Erdmann
17+
# @date 2018-09-27
18+
19+
import os
20+
import sys
21+
22+
if "SUMO_HOME" in os.environ:
23+
sys.path.append(os.path.join(os.environ["SUMO_HOME"], "tools"))
24+
25+
import traci # noqa
26+
import sumolib # noqa
27+
28+
sumoBinary = sumolib.checkBinary('sumo')
29+
traci.start([sumoBinary,
30+
"-n", "input_net2.net.xml",
31+
"-r", "input_routes.rou.xml",
32+
"--step-length", "0.1",
33+
"--no-step-log",
34+
])
35+
vehID = "v0"
36+
traci.vehicle.add(vehID, "r0")
37+
traci.simulationStep()
38+
39+
traci.vehicle.moveToXY(vehID, ":C_11", 0, 103.51, 104.93, traci.vehicle.getAngle(vehID), keepRoute=2)
40+
traci.simulationStep()
41+
print(traci.vehicle.getLaneID(vehID))
42+
traci.close()

0 commit comments

Comments
 (0)