TraCI error (but only in docker)

Hello,

We get the following error when calling sumo_sim.simulate_step():

File “/app/drivinglicense101/io/sumo_scenario_io.py”, line 257, in write
self._sumo_simulation.simulate_step()
File “/usr/local/lib/python3.7/site-packages/sumocr/interface/sumo_simulation.py”, line 406, in simulate_step
self._send_ego_vehicles(self.ego_vehicles, i)
File “/usr/local/lib/python3.7/site-packages/sumocr/interface/sumo_simulation.py”, line 815, in _send_ego_vehicles
self._forward_info2sumo(planned_state, “SYNC_MOVE_XY”, 0, id_cr)
File “/usr/local/lib/python3.7/site-packages/sumocr/interface/sumo_simulation.py”, line 1046, in _forward_info2sumo
keepRoute=2)
File “/usr/local/lib/python3.7/site-packages/traci/_vehicle.py”, line 1609, in moveToXY
self._setCmd(tc.MOVE_TO_XY, vehID, “tsidddbd”, 7, edgeID, lane, x, y, angle, keepRoute, matchThreshold)
File “/usr/local/lib/python3.7/site-packages/traci/domain.py”, line 189, in _setCmd
self._connection._sendCmd(self._cmdSetID, varID, objectID, format, *values)
File “/usr/local/lib/python3.7/site-packages/traci/connection.py”, line 181, in _sendCmd
return self._sendExact()
File “/usr/local/lib/python3.7/site-packages/traci/connection.py”, line 98, in _sendExact
raise TraCIException(err, prefix[1], _RESULTS[prefix[2]])
traci.exceptions.TraCIException: MoveToXY vehicle should obtain: edgeID, lane, x, y, angle and optionally keepRouteFlag.

The weird thing is that it only happens when our code is run in docker, but it works fine if we run it directly (python -m ...).

Did anyone encounter this?

Best,

C

Which Sumo version are you using in your Dockerfile? Is it the version v1_9_2 like provided in the template Dockerfile or maybe a different one? https://gitlab.lrz.de/tum-cps/commonroad-docker-submission/-/blob/main/base/Dockerfile#L39

There was a new version of Sumo released a few days ago, maybe you’re using that one?

It seems you’re using the latest version, since the matchThreshold option mentioned in the error message is new. So you need to downgrade the version in your Dockerfile using the line I linked above.

Hi,

We are using your image as a base: the first line of our Dockerfile is

FROM gitlab.lrz.de:5005/tum-cps/commonroad-docker-submission/base:1.0.0

so the sumo version is 1.9.2. I’ve confirmed this by looking inside the container:

sudo docker run --rm -it --entrypoint bash altaris/drivinglicense101
root@cf3ebf7b2cfb:/app# sumo --version
Eclipse SUMO sumo Version 1.9.2
 Build features: Linux-5.8.0-59-generic x86_64 GNU 8.3.0 Release Proj GUI GDAL GL2PS Eigen
 Copyright (C) 2001-2021 German Aerospace Center (DLR) and others; https://sumo.dlr.de

Eclipse SUMO sumo Version 1.9.2 is part of SUMO.
This program and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0

Removing traci from our requirements.txt seems to have resolved the issue. I’ll confirm as we get results from the competition website.

Yes, traci does not need to be installed separately, it is already part of Sumo. Thus, installing it via pip resulted in a mismatch of traci and Sumo.