Hi !

I wrote a python.py script with traci commands.
And I want my python script to use Veins' sumo-launchd.py to start sumo.

Therefore I modify my script to connect to sumo-launchd.py instead of SUMO
as :

**************************************************************************************
PORT = 9999

if not traci.isEmbedded():
    sumoProcess = subprocess.Popen("%s -vv -c %s" % ('./sumo-launchd.py',
'/usr/local/bin/sumo'), shell=True, stdout=sys.stdout)
    traci.init(PORT)
step=0
while step==0 or traci.simulation.getMinExpectedNumber() > 0:
    traci.simulationStep()

.......blablabla

****************************************************************************************

But when I try : ./mypython.py, and I run omnetpp.ini on port 9999 :

It doesn't work and I have the following text on my shell :



Connection from 127.0.0.1 on port 44389
Handling connection from 127.0.0.1 on port 44389
Got TraCI message of length 2
Got TraCI command of length 1
Got TraCI command 0x0
Got CMD_GETVERSION
Got TraCI message of length 363
Got TraCI command of length 358
Got TraCI command 0x75
Got CMD_FILE_SEND for "sumo-launchd.launch.xml"
Got CMD_FILE_SEND with data "<launch>
  <copy file="RondPoint.net.xml"/>
  <copy file="RondPoint.rou.xml"/>
  <copy file="RondPointBus.rou.xml"/>
  <copy file="RondPoint.det.xml"/>
  <copy file="RondPoint.sumo.cfg" type="config"/>
  <basedir
path="/home/scampi/Téléchargements/veins-veins-3.0/examples/veins/Rond-Point/"/>
  <seed value="0"/>
</launch>
"
Creating temporary directory...
Temporary dir is /tmp/sumo-launchd-tmp-mVTGn_
Base dir is
/home/scampi/Téléchargements/veins-veins-3.0/examples/veins/Rond-Point/
Seed is 0
Finding free port number...
Claiming lock on port
...found port 9999
Starting SUMO (/usr/local/bin/sumo -c RondPoint.sumo.cfg) on port 9999,
seed 0
Connecting to SUMO (/usr/local/bin/sumo -c RondPoint.sumo.cfg) on port 9999
(try 1)
Releasing lock on port
Connection from 127.0.0.1 on port 44390
Starting proxy mode
Handling connection from 127.0.0.1 on port 44390
Cleaning up
Result: "<?xml version="1.0"?>
<status>
    <exit-code>-1</exit-code>
    <start>1417447106</start>
    <end>1417447106</end>
    <status>Could not connect to SUMO ([Errno 92] Protocol not available).
Might be protected by a personal firewall or crashed before a connection
could be established.</status>
    <stdout><![CDATA[]]></stdout>
    <stderr><![CDATA[]]></stderr>
</status>
"
Closing connection from 127.0.0.1 on port 44389

Can you help me ?

Thanks a lot !

Best Regards,

Marie-Ange Lebre
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to