-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Describe the bug
When a Python script attempts to function as both a second client (ApplicationSetup) AND Application Layer controller, the dual-role architecture may cause conflicts in SUMO with EnableExternalDynamics: true.
To Reproduce
- Configure config.yaml with both ApplicationSetup.VehicleSubscription and XilSetup.VehicleSubscription for same vehicle
- Run TrafficLayer.exe with SUMO
- Start Python script connecting to both ports (e.g., port 2444 for app layer, port 420 for XIL)
- Observe potential socket synchronization issues or conflicting vehicle control commands
Expected Behavior
System should either:
- Handle dual-role clients with clear precedence, OR
- Detect and reject such configurations, OR
- Document the correct pattern
Current Architecture Issues
- Python echo clients (tests/Python/SimpleEchoClient) only act as ApplicationLayer
- Python controllers (tests/Applications/Eco_Fixed_Timming/eco_driving_mpr_SUMO.py) directly connect
- No clear example if single Python instance can do both roles
- With SUMO EnableExternalDynamics: true, control conflicts likely
Environment
- Python version: 3.8+
- SUMO version: 1.21
Additional context
Affects scenarios where researchers want to:
- Receive broader vehicle data via ApplicationSetup (radius-based)
- Send control commands to ego vehicle(s)
- Do both from single Python application
Related files:
- CommonLib/SocketHelper.py
- TrafficLayer/TrafficLayer/mainTrafficLayer.cpp
Metadata
Metadata
Labels
bugSomething isn't workingSomething isn't working