Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Error caused by Traci.junction.subscribeContext
  • From: George Li <wzhli2020@xxxxxxxxxxx>
  • Date: Thu, 30 Jun 2022 15:01:00 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oXDoYM5HhU7ZxMv7/ByIF4u4f0eUYUmQO0KPTFusvHs=; b=Hodxg8y7rewag1qS34t0Wfu0JbfNnVZ4dK1Bd+Zm6SiRewxziK3Oky8aysDml2WmQxsIz1ZFcbLeXyEtia6ZmK3AgNqjGZvd1dAAWhkalFjuSWyoLHgWNH9N37V6C0tXDsIQpy4UaOknBI+SyjUAsZTcmU/p5ZB57HHY6ggwFsU6I7Tvp47IIYumkv2FzzqvHK+QBeW12JfYv4ZMqYzS1eCSz+9eknZ/C4srKCiOJOLQaxtAFfa46IS6NJ48jRBCcRAkZVYrKBHWPajCdCToAPNR2D+aaSEMBTG6o61bX4ghqEnmrXxji7UTLyM9U34prDcawFiH7kxHEBVV6zkxQA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gwN7EMalC901e5NGJqQHzUU0s8M1Mc33g8ArQuUBiZUymgK+LAX32ZJPAjwk873J3qbvlQM0GwKpTlhZEpLM8Qp+3XtGWFSxZReMTqF7MU900gkkgqY6+EivOMZ5EA65AtrTTWycXKPsLrPGivSeQlV2TJm0jgbuLPdV8tuWdmO4ifj6wvD9+jNNL52o2OvihIrleMsypW59otXruUdDJvD8beHXOTydML384GhT17EIL2ryJlueA21qf6mNTFUI/NzWbGqjVYKHJj1rXBkQ6ouHti7npJVfQVzNfMbZNAHzcpW3qXF/4u9VUVAWBNnrkqc0u5fq2eqNyb3kPjVPeQ==
  • Delivered-to: sumo-user@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/sumo-user/>
  • List-help: <mailto:sumo-user-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/sumo-user>, <mailto:sumo-user-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/sumo-user>, <mailto:sumo-user-request@eclipse.org?subject=unsubscribe>
  • Suggested_attachment_session_id: 8ab5424e-d0e3-6f46-ef36-9ca381d51336
  • Thread-index: AQHYjHVbk+opwZBfAk6AXKexEMAxdg==
  • Thread-topic: Error caused by Traci.junction.subscribeContext

Hello,

I am writing this email to ask about an error I encountered in using traci. I developed on Ubuntu 20.0 with SUMO 1.8.0. 

In one of my projects, I intended to develop an adaptive traffic signal controller and use traci.junction.subscribeContext as below:

traci.junction.subscribeContext(tlid, traci.constants.CMD_GET_VEHICLE_VARIABLE, self.detect_radius,
                                [traci.constants.VAR_LANEPOSITION,
                                traci.constants.VAR_SPEED,
                                traci.constants.VAR_LANE_ID,
                                traci.constants.VAR_ROAD_ID])
When I run the whole project and the program executes the traci.simulationStep() later, the sumo would encounter an error "Error: tcpip::Socket::recvAndCheck @ recv: peer shutdown". But if I comment out the traci.junction.subscribeContext, the traci.simulationStep() can be executed properly.

Also, if I run a separate python file to solely run sumo simulation with traci.junction.subcribeContext and traci.simulationStep under the same sumo configure file and the same environment, the code can be executed without any errors.

In this case, I am wondering if there were any possible causes that can influence traci.junction.subscribeConext and traci.simulationStep() under a certain condition? Or under what circumstances can traci.simulationStep() be interrupted by traci.junction.subscribeConext?

I really appreciate your help. Thank you for your time.

Best regards,
George


Back to the top