Discussion:
[sumo-user] Sumo ->traceExporter.py ->NS2
Frédéric Drouhin
2013-11-18 07:53:36 UTC
Permalink
Dear all,

I start recently use sumo (0.17.1) to produce NS2 scenario based on
OpenStreetMap. I follow tutorial (by the way very helpful) and found a
way to go until "fcd output" generated by sumo binary.

I have several (3) questions about the different files produced and the
way to use traceExporter.py.

In fcdoutput file, I found some different tag from the documentation
(http://sumo-sim.org/userdoc/Simulation/Output/FCDOutput.html):
x in place of pos_x, y in place of pos_y but I also found pos and I
wondering what does it mean ?
Do you have an explanation about this tags ?

Example of a vehicule
<timestep time="1.00">
<vehicle id="1" x="1120.17" y="675.21" angle="-113.77"
type="DEFAULT_VEHTYPE" speed="0.00" pos="0.20" lane="-139664890#1_0"
slope="0.00"/>
</timestep>

Then I try to generate my NS2 with traceExporter.py, I got a strange
behaviour since I did not get a file and my mouse pointer change to a
cross. I try several combination but did not find the way to produce my
NS2 file. I wrote my own parser but I would prefer used traceExporter.py
if possible. What did I make wrong ?

I see also that I have some negative values and I check documentation
and found : "Since ns2 allows only positive x- and y-coordinates, the
scenario is shifted accordingly if negative coordinates are used in the
Sumo scenario. " Does it mean that the min(x) and min(y) are shifted to 0 ?

Thanks for your help,

Frédéric
Jakob Erdmann
2013-11-27 15:01:40 UTC
Permalink
Hello,
1) the 'pos' attribute contains the offset of a vehicle from the start of
the current lane
2) the problem you encountered with traceExporter.py is hard to diagnose
from your description. Please report the command you used (it needs to be
run on the command line!) and report any errors that were printed
3) I cannot find the documentation about negative values to which you
refer. Please give a link.
regards,
Jakob
Post by Frédéric Drouhin
Dear all,
I start recently use sumo (0.17.1) to produce NS2 scenario based on
OpenStreetMap. I follow tutorial (by the way very helpful) and found a
way to go until "fcd output" generated by sumo binary.
I have several (3) questions about the different files produced and the
way to use traceExporter.py.
In fcdoutput file, I found some different tag from the documentation
x in place of pos_x, y in place of pos_y but I also found pos and I
wondering what does it mean ?
Do you have an explanation about this tags ?
Example of a vehicule
<timestep time="1.00">
<vehicle id="1" x="1120.17" y="675.21" angle="-113.77"
type="DEFAULT_VEHTYPE" speed="0.00" pos="0.20" lane="-139664890#1_0"
slope="0.00"/>
</timestep>
Then I try to generate my NS2 with traceExporter.py, I got a strange
behaviour since I did not get a file and my mouse pointer change to a
cross. I try several combination but did not find the way to produce my
NS2 file. I wrote my own parser but I would prefer used traceExporter.py
if possible. What did I make wrong ?
I see also that I have some negative values and I check documentation
and found : "Since ns2 allows only positive x- and y-coordinates, the
scenario is shifted accordingly if negative coordinates are used in the
Sumo scenario. " Does it mean that the min(x) and min(y) are shifted to 0 ?
Thanks for your help,
Frédéric
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
sumo-user mailing list
https://lists.sourceforge.net/lists/listinfo/sumo-user
Frédéric Drouhin
2013-11-28 11:37:13 UTC
Permalink
Hello Jakop,

Thanks for your answer !
Post by Jakob Erdmann
Post by Jakob Erdmann
1) the 'pos' attribute contains the offset of a vehicle from the
start of the current lane
Ok, thanks
Post by Jakob Erdmann
Post by Jakob Erdmann
2) the problem you encountered with traceExporter.py is hard to
diagnose from your description. Please report the command you used (it
needs to be run on the command line!) and report any errors that were
printed
$ ./traceExporter.py --fcd-input sbg.fcdoutput.xml --ns2config-output
sb.config.tcl --ns2activity-output sbg.activity.tcl --ns2mobility-output
sbg.mobility.tcl --penetration 1 --begin 0 --end 100
../sumo-0.17.1/tools/bin/traceExporter.py: line 12:
@file convert_fcd2phem.py
@author Daniel Krajzewicz
@date 2013-01-15
@version : traceExporter.py 13845 2013-05-02 13:53:19Z dkrajzew $

A script for converting SUMO's fcd-output into files readable by PHEM.

SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
Copyright (C) 2013 DLR (http://www.dlr.de/) and contributors
All rights reserved
: File name too long
import: unable to grab mouse `': Resource temporarily unavailable @
error/xwindow.c/XSelectWindow/9052.
../sumo-0.17.1/tools/bin/traceExporter.py: line 15: syntax error near
unexpected token `os.path.join'
../sumo-0.17.1/tools/bin/traceExporter.py: line 15:
`sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..',
'tools'))'
java -jar traceExporter.jar ns2 -n sbg2km.net.xml -t sbg2km.state.xml -a
sbg2km40nd.activity.tcl -m sbg2km40nd.mobility.tcl -c
sbg2km40nd.config.tcl -p 1 -b 0 -e 100
Post by Jakob Erdmann
Post by Jakob Erdmann
Post by Jakob Erdmann
3) I cannot find the documentation about negative values to
which you refer. Please give a link.I'm looking to use .poly.xml file in
my simulation and I need to match the vehicle coordinate with the
poly.xml file.
This is the link, if you have some hints, I'm really interesting (but I
will also investigate this part):
http://sourceforge.net/apps/mediawiki/sumo/index.php?title=Purgatory/TraceExporterJar
"Since ns2 allows only positive x- and y-coordinates, the scenario is
shifted accordingly if negative coordinates are used in the Sumo scenario."


Thanks again,

Frédéric
Post by Jakob Erdmann
regards,
Jakob
Dear all,
I start recently use sumo (0.17.1) to produce NS2 scenario based on
OpenStreetMap. I follow tutorial (by the way very helpful) and found a
way to go until "fcd output" generated by sumo binary.
I have several (3) questions about the different files produced and the
way to use traceExporter.py.
In fcdoutput file, I found some different tag from the documentation
x in place of pos_x, y in place of pos_y but I also found pos and I
wondering what does it mean ?
Do you have an explanation about this tags ?
Example of a vehicule
<timestep time="1.00">
<vehicle id="1" x="1120.17" y="675.21" angle="-113.77"
type="DEFAULT_VEHTYPE" speed="0.00" pos="0.20" lane="-139664890#1_0"
slope="0.00"/>
</timestep>
Then I try to generate my NS2 with traceExporter.py, I got a strange
behaviour since I did not get a file and my mouse pointer change to a
cross. I try several combination but did not find the way to produce my
NS2 file. I wrote my own parser but I would prefer used
traceExporter.py
if possible. What did I make wrong ?
I see also that I have some negative values and I check documentation
and found : "Since ns2 allows only positive x- and y-coordinates, the
scenario is shifted accordingly if negative coordinates are used in the
Sumo scenario. " Does it mean that the min(x) and min(y) are shifted to 0 ?
Thanks for your help,
Frédéric
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
sumo-user mailing list
https://lists.sourceforge.net/lists/listinfo/sumo-user
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. : +33 (0)3 89 20 23 73 Fax +33 (0)3 89 20 23 84
http://www.iutcolmar.uha.fr/rt
Jakob Erdmann
2013-11-28 12:11:32 UTC
Permalink
Hello,
for some reason the hashbang (#!/usr/bin/env python) in the script does not
work on your system.
call traceExporter like this:
$ python traceExporter.py --fcd-input sbg.fcdoutput.xml --ns2config-output
sb.config.tcl --ns2activity-output sbg.activity.tcl --ns2mobility-output
sbg.mobility.tcl --penetration 1 --begin 0 --end 100


traceExporter.jar is no longer supported and not included in the latest
sumo release. However, in regard to shifted coordinates I can tell you
this: by default, netconvert shifts all coordinates in the scenario so that
the lower left coordinate will be 0,0. Thus, the coordinates found in fcd
output will all be positive.

regards,
Jakob
Post by Frédéric Drouhin
Hello Jakop,
Thanks for your answer !
Post by Frédéric Drouhin
Post by Jakob Erdmann
1) the 'pos' attribute contains the offset of a vehicle from the
start of the current lane
Ok, thanks
Post by Frédéric Drouhin
Post by Jakob Erdmann
2) the problem you encountered with traceExporter.py is hard to
diagnose from your description. Please report the command you used (it
needs to be run on the command line!) and report any errors that were
printed
$ ./traceExporter.py --fcd-input sbg.fcdoutput.xml --ns2config-output
sb.config.tcl --ns2activity-output sbg.activity.tcl --ns2mobility-output
sbg.mobility.tcl --penetration 1 --begin 0 --end 100
@file convert_fcd2phem.py
@author Daniel Krajzewicz
@date 2013-01-15
@version : traceExporter.py 13845 2013-05-02 13:53:19Z dkrajzew $
A script for converting SUMO's fcd-output into files readable by PHEM.
SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
Copyright (C) 2013 DLR (http://www.dlr.de/) and contributors
All rights reserved
: File name too long
error/xwindow.c/XSelectWindow/9052.
../sumo-0.17.1/tools/bin/traceExporter.py: line 15: syntax error near
unexpected token `os.path.join'
`sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..',
'tools'))'
java -jar traceExporter.jar ns2 -n sbg2km.net.xml -t sbg2km.state.xml -a
sbg2km40nd.activity.tcl -m sbg2km40nd.mobility.tcl -c sbg2km40nd.config.tcl
-p 1 -b 0 -e 100
Post by Frédéric Drouhin
Post by Jakob Erdmann
Post by Jakob Erdmann
3) I cannot find the documentation about negative values to which
you refer. Please give a link.I'm looking to use .poly.xml file in my
simulation and I need to match the vehicle coordinate with the poly.xml
file.
This is the link, if you have some hints, I'm really interesting (but I
http://sourceforge.net/apps/mediawiki/sumo/index.php?title=Purgatory/TraceExporterJar
"Since ns2 allows only positive x- and y-coordinates, the scenario is
shifted accordingly if negative coordinates are used in the Sumo scenario."
Thanks again,
Frédéric
regards,
Jakob
Post by Frédéric Drouhin
Dear all,
I start recently use sumo (0.17.1) to produce NS2 scenario based on
OpenStreetMap. I follow tutorial (by the way very helpful) and found a
way to go until "fcd output" generated by sumo binary.
I have several (3) questions about the different files produced and the
way to use traceExporter.py.
In fcdoutput file, I found some different tag from the documentation
x in place of pos_x, y in place of pos_y but I also found pos and I
wondering what does it mean ?
Do you have an explanation about this tags ?
Example of a vehicule
<timestep time="1.00">
<vehicle id="1" x="1120.17" y="675.21" angle="-113.77"
type="DEFAULT_VEHTYPE" speed="0.00" pos="0.20" lane="-139664890#1_0"
slope="0.00"/>
</timestep>
Then I try to generate my NS2 with traceExporter.py, I got a strange
behaviour since I did not get a file and my mouse pointer change to a
cross. I try several combination but did not find the way to produce my
NS2 file. I wrote my own parser but I would prefer used traceExporter.py
if possible. What did I make wrong ?
I see also that I have some negative values and I check documentation
and found : "Since ns2 allows only positive x- and y-coordinates, the
scenario is shifted accordingly if negative coordinates are used in the
Sumo scenario. " Does it mean that the min(x) and min(y) are shifted to 0 ?
Thanks for your help,
Frédéric
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
sumo-user mailing list
https://lists.sourceforge.net/lists/listinfo/sumo-user
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. : +33 (0)3 89 20 23 73 Fax +33 (0)3 89 20 23 84http://www.iutcolmar.uha.fr/rt
Frédéric Drouhin
2013-11-28 12:55:09 UTC
Permalink
Dear Jakob,

That's right the shebang was not present in my case and shame on me, I
did not check which interpreter was used :(

I used your command and got this new error, I suspect my fcdoutput file
and checking what's going on.
$ ../sumo-0.17.1/tools/bin/traceExporter.py --fcd-input
sbg.fcdoutput.xml --ns2config-output sb.config.tcl --ns2activity-output
sbg.activity.tcl --ns2mobility-output sbg.mobility.tcl --penetration 1
--begin 0 --end 100
Traceback (most recent call last):
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 225, in <module>
sys.exit(main(sys.argv))
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 189, in main
vIDm, vehInfo, begin, end, area = runMethod(options.fcd,
options.ns2mobility, ns2.fcd2ns2mobility, options)
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 99, in runMethod
ret = writer(procFCDStream(fcdStream, options), o, further)
File
"../sumo-0.17.1/tools/bin/../../tools/sumolib/output/convert/ns2.py",
line 24, in fcd2ns2mobility
for timestep in inpFCD:
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 83, in
procFCDStream
if v not in chosen: chosen[v] = random()<options.penetration
TypeError: 'NoneType' object is not callable

Regards,

Frédéric
Post by Jakob Erdmann
Hello,
for some reason the hashbang (#!/usr/bin/env python) in the script
does not work on your system.
$ python traceExporter.py --fcd-input sbg.fcdoutput.xml
--ns2config-output sb.config.tcl --ns2activity-output sbg.activity.tcl
--ns2mobility-output sbg.mobility.tcl --penetration 1 --begin 0 --end 100
traceExporter.jar is no longer supported and not included in the
latest sumo release. However, in regard to shifted coordinates I can
tell you this: by default, netconvert shifts all coordinates in the
scenario so that the lower left coordinate will be 0,0. Thus, the
coordinates found in fcd output will all be positive.
regards,
Jakob
Hello Jakop,
Thanks for your answer !
Post by Jakob Erdmann
Post by Jakob Erdmann
1) the 'pos' attribute contains the offset of a vehicle from
the start of the current lane
Ok, thanks
Post by Jakob Erdmann
Post by Jakob Erdmann
2) the problem you encountered with traceExporter.py is hard
to diagnose from your description. Please report the command you
used (it needs to be run on the command line!) and report any
errors that were printed
$ ./traceExporter.py --fcd-input sbg.fcdoutput.xml
--ns2config-output sb.config.tcl --ns2activity-output
sbg.activity.tcl --ns2mobility-output sbg.mobility.tcl
--penetration 1 --begin 0 --end 100
@file convert_fcd2phem.py
@author Daniel Krajzewicz
@date 2013-01-15
@version : traceExporter.py 13845 2013-05-02 13:53:19Z dkrajzew $
A script for converting SUMO's fcd-output into files readable by PHEM.
SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
Copyright (C) 2013 DLR (http://www.dlr.de/) and contributors
All rights reserved
: File name too long
import: unable to grab mouse `': Resource temporarily unavailable
@ error/xwindow.c/XSelectWindow/9052.
../sumo-0.17.1/tools/bin/traceExporter.py: line 15: syntax error
near unexpected token `os.path.join'
`sys.path.append(os.path.join(os.path.dirname(__file__), '..',
'..', 'tools'))'
java -jar traceExporter.jar ns2 -n sbg2km.net.xml -t
sbg2km.state.xml -a sbg2km40nd.activity.tcl -m
sbg2km40nd.mobility.tcl -c sbg2km40nd.config.tcl -p 1 -b 0 -e 100
Post by Jakob Erdmann
Post by Jakob Erdmann
Post by Jakob Erdmann
3) I cannot find the documentation about negative values to
which you refer. Please give a link.I'm looking to use .poly.xml
file in my simulation and I need to match the vehicle coordinate
with the poly.xml file.
This is the link, if you have some hints, I'm really interesting
http://sourceforge.net/apps/mediawiki/sumo/index.php?title=Purgatory/TraceExporterJar
"Since ns2 allows only positive x- and y-coordinates, the scenario
is shifted accordingly if negative coordinates are used in the
Sumo scenario."
Thanks again,
Frédéric
Post by Jakob Erdmann
regards,
Jakob
Dear all,
I start recently use sumo (0.17.1) to produce NS2 scenario based on
OpenStreetMap. I follow tutorial (by the way very helpful) and found a
way to go until "fcd output" generated by sumo binary.
I have several (3) questions about the different files produced and the
way to use traceExporter.py.
In fcdoutput file, I found some different tag from the documentation
x in place of pos_x, y in place of pos_y but I also found pos and I
wondering what does it mean ?
Do you have an explanation about this tags ?
Example of a vehicule
<timestep time="1.00">
<vehicle id="1" x="1120.17" y="675.21" angle="-113.77"
type="DEFAULT_VEHTYPE" speed="0.00" pos="0.20"
lane="-139664890#1_0"
slope="0.00"/>
</timestep>
Then I try to generate my NS2 with traceExporter.py, I got a strange
behaviour since I did not get a file and my mouse pointer change to a
cross. I try several combination but did not find the way to produce my
NS2 file. I wrote my own parser but I would prefer used traceExporter.py
if possible. What did I make wrong ?
I see also that I have some negative values and I check documentation
and found : "Since ns2 allows only positive x- and
y-coordinates, the
scenario is shifted accordingly if negative coordinates are used in the
Sumo scenario. " Does it mean that the min(x) and min(y) are
shifted to 0 ?
Thanks for your help,
Frédéric
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
sumo-user mailing list
https://lists.sourceforge.net/lists/listinfo/sumo-user
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. :+33 (0)3 89 20 23 73 <tel:%2B33%20%280%293%2089%2020%2023%2073> Fax+33 (0)3 89 20 23 84 <tel:%2B33%20%280%293%2089%2020%2023%2084>
http://www.iutcolmar.uha.fr/rt
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. : +33 (0)3 89 20 23 73 Fax +33 (0)3 89 20 23 84
http://www.iutcolmar.uha.fr/rt
Jakob Erdmann
2013-11-28 13:20:58 UTC
Permalink
Hello,
I realized, the shebang was not present in version 0.17.1.
I encourage you to use the newly released version 0.19.0
However, the python error you encounter is not explained by any changes
between these revisions. What version of python are you using?
regards,
Jakob
Post by Frédéric Drouhin
Dear Jakob,
That's right the shebang was not present in my case and shame on me, I did
not check which interpreter was used :(
I used your command and got this new error, I suspect my fcdoutput file
and checking what's going on.
$ ../sumo-0.17.1/tools/bin/traceExporter.py --fcd-input sbg.fcdoutput.xml
--ns2config-output sb.config.tcl --ns2activity-output sbg.activity.tcl
--ns2mobility-output sbg.mobility.tcl --penetration 1 --begin 0 --end 100
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 225, in <module>
sys.exit(main(sys.argv))
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 189, in main
vIDm, vehInfo, begin, end, area = runMethod(options.fcd,
options.ns2mobility, ns2.fcd2ns2mobility, options)
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 99, in runMethod
ret = writer(procFCDStream(fcdStream, options), o, further)
File
"../sumo-0.17.1/tools/bin/../../tools/sumolib/output/convert/ns2.py", line
24, in fcd2ns2mobility
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 83, in
procFCDStream
if v not in chosen: chosen[v] = random()<options.penetration
TypeError: 'NoneType' object is not callable
Regards,
Frédéric
Hello,
for some reason the hashbang (#!/usr/bin/env python) in the script does
not work on your system.
$ python traceExporter.py --fcd-input sbg.fcdoutput.xml --ns2config-output
sb.config.tcl --ns2activity-output sbg.activity.tcl --ns2mobility-output
sbg.mobility.tcl --penetration 1 --begin 0 --end 100
traceExporter.jar is no longer supported and not included in the latest
sumo release. However, in regard to shifted coordinates I can tell you
this: by default, netconvert shifts all coordinates in the scenario so that
the lower left coordinate will be 0,0. Thus, the coordinates found in fcd
output will all be positive.
regards,
Jakob
Post by Frédéric Drouhin
Hello Jakop,
Thanks for your answer !
Post by Frédéric Drouhin
Post by Jakob Erdmann
1) the 'pos' attribute contains the offset of a vehicle from the
start of the current lane
Ok, thanks
Post by Frédéric Drouhin
Post by Jakob Erdmann
2) the problem you encountered with traceExporter.py is hard to
diagnose from your description. Please report the command you used (it
needs to be run on the command line!) and report any errors that were
printed
$ ./traceExporter.py --fcd-input sbg.fcdoutput.xml --ns2config-output
sb.config.tcl --ns2activity-output sbg.activity.tcl --ns2mobility-output
sbg.mobility.tcl --penetration 1 --begin 0 --end 100
@file convert_fcd2phem.py
@author Daniel Krajzewicz
@date 2013-01-15
@version : traceExporter.py 13845 2013-05-02 13:53:19Z dkrajzew $
A script for converting SUMO's fcd-output into files readable by PHEM.
SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
Copyright (C) 2013 DLR (http://www.dlr.de/) and contributors
All rights reserved
: File name too long
error/xwindow.c/XSelectWindow/9052.
../sumo-0.17.1/tools/bin/traceExporter.py: line 15: syntax error near
unexpected token `os.path.join'
`sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..',
'tools'))'
java -jar traceExporter.jar ns2 -n sbg2km.net.xml -t sbg2km.state.xml -a
sbg2km40nd.activity.tcl -m sbg2km40nd.mobility.tcl -c sbg2km40nd.config.tcl
-p 1 -b 0 -e 100
Post by Frédéric Drouhin
Post by Jakob Erdmann
Post by Jakob Erdmann
3) I cannot find the documentation about negative values to which
you refer. Please give a link.I'm looking to use .poly.xml file in my
simulation and I need to match the vehicle coordinate with the poly.xml
file.
This is the link, if you have some hints, I'm really interesting (but I
http://sourceforge.net/apps/mediawiki/sumo/index.php?title=Purgatory/TraceExporterJar
"Since ns2 allows only positive x- and y-coordinates, the scenario is
shifted accordingly if negative coordinates are used in the Sumo scenario."
Thanks again,
Frédéric
regards,
Jakob
Post by Frédéric Drouhin
Dear all,
I start recently use sumo (0.17.1) to produce NS2 scenario based on
OpenStreetMap. I follow tutorial (by the way very helpful) and found a
way to go until "fcd output" generated by sumo binary.
I have several (3) questions about the different files produced and the
way to use traceExporter.py.
In fcdoutput file, I found some different tag from the documentation
x in place of pos_x, y in place of pos_y but I also found pos and I
wondering what does it mean ?
Do you have an explanation about this tags ?
Example of a vehicule
<timestep time="1.00">
<vehicle id="1" x="1120.17" y="675.21" angle="-113.77"
type="DEFAULT_VEHTYPE" speed="0.00" pos="0.20" lane="-139664890#1_0"
slope="0.00"/>
</timestep>
Then I try to generate my NS2 with traceExporter.py, I got a strange
behaviour since I did not get a file and my mouse pointer change to a
cross. I try several combination but did not find the way to produce my
NS2 file. I wrote my own parser but I would prefer used traceExporter.py
if possible. What did I make wrong ?
I see also that I have some negative values and I check documentation
and found : "Since ns2 allows only positive x- and y-coordinates, the
scenario is shifted accordingly if negative coordinates are used in the
Sumo scenario. " Does it mean that the min(x) and min(y) are shifted to 0 ?
Thanks for your help,
Frédéric
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
sumo-user mailing list
https://lists.sourceforge.net/lists/listinfo/sumo-user
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. : +33 (0)3 89 20 23 73 Fax +33 (0)3 89 20 23 84http://www.iutcolmar.uha.fr/rt
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. : +33 (0)3 89 20 23 73 Fax +33 (0)3 89 20 23 84http://www.iutcolmar.uha.fr/rt
Frédéric Drouhin
2013-11-28 13:42:58 UTC
Permalink
Hello,

Python version:
Python 2.7.3 (default, Sep 26 2013, 20:03:06)
[GCC 4.6.3] on linux2

Just install the newest version and I got the same error.

Thank for your help,

Frédéric
Post by Jakob Erdmann
Hello,
I realized, the shebang was not present in version 0.17.1.
I encourage you to use the newly released version 0.19.0
However, the python error you encounter is not explained by any
changes between these revisions. What version of python are you using?
regards,
Jakob
Dear Jakob,
That's right the shebang was not present in my case and shame on
me, I did not check which interpreter was used :(
I used your command and got this new error, I suspect my fcdoutput
file and checking what's going on.
$ ../sumo-0.17.1/tools/bin/traceExporter.py --fcd-input
sbg.fcdoutput.xml --ns2config-output sb.config.tcl
--ns2activity-output sbg.activity.tcl --ns2mobility-output
sbg.mobility.tcl --penetration 1 --begin 0 --end 100
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 225, in <module>
sys.exit(main(sys.argv))
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 189, in main
vIDm, vehInfo, begin, end, area = runMethod(options.fcd,
options.ns2mobility, ns2.fcd2ns2mobility, options)
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 99, in runMethod
ret = writer(procFCDStream(fcdStream, options), o, further)
File
"../sumo-0.17.1/tools/bin/../../tools/sumolib/output/convert/ns2.py",
line 24, in fcd2ns2mobility
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 83, in
procFCDStream
if v not in chosen: chosen[v] = random()<options.penetration
TypeError: 'NoneType' object is not callable
Regards,
Frédéric
Post by Jakob Erdmann
Hello,
for some reason the hashbang (#!/usr/bin/env python) in the
script does not work on your system.
$ python traceExporter.py --fcd-input sbg.fcdoutput.xml
--ns2config-output sb.config.tcl --ns2activity-output
sbg.activity.tcl --ns2mobility-output sbg.mobility.tcl
--penetration 1 --begin 0 --end 100
traceExporter.jar is no longer supported and not included in the
latest sumo release. However, in regard to shifted coordinates I
can tell you this: by default, netconvert shifts all coordinates
in the scenario so that the lower left coordinate will be 0,0.
Thus, the coordinates found in fcd output will all be positive.
regards,
Jakob
Hello Jakop,
Thanks for your answer !
Post by Jakob Erdmann
Post by Jakob Erdmann
1) the 'pos' attribute contains the offset of a vehicle
from the start of the current lane
Ok, thanks
Post by Jakob Erdmann
Post by Jakob Erdmann
2) the problem you encountered with traceExporter.py is
hard to diagnose from your description. Please report the
command you used (it needs to be run on the command line!)
and report any errors that were printed
$ ./traceExporter.py --fcd-input sbg.fcdoutput.xml
--ns2config-output sb.config.tcl --ns2activity-output
sbg.activity.tcl --ns2mobility-output sbg.mobility.tcl
--penetration 1 --begin 0 --end 100
@file convert_fcd2phem.py
@author Daniel Krajzewicz
@date 2013-01-15
@version : traceExporter.py 13845 2013-05-02 13:53:19Z dkrajzew $
A script for converting SUMO's fcd-output into files readable by PHEM.
SUMO, Simulation of Urban MObility; see
http://sumo.sourceforge.net/
Copyright (C) 2013 DLR (http://www.dlr.de/) and contributors
All rights reserved
: File name too long
import: unable to grab mouse `': Resource temporarily
../sumo-0.17.1/tools/bin/traceExporter.py: line 15: syntax
error near unexpected token `os.path.join'
`sys.path.append(os.path.join(os.path.dirname(__file__),
'..', '..', 'tools'))'
java -jar traceExporter.jar ns2 -n sbg2km.net.xml -t
sbg2km.state.xml -a sbg2km40nd.activity.tcl -m
sbg2km40nd.mobility.tcl -c sbg2km40nd.config.tcl -p 1 -b 0 -e 100
Post by Jakob Erdmann
Post by Jakob Erdmann
Post by Jakob Erdmann
3) I cannot find the documentation about negative
values to which you refer. Please give a link.I'm looking to
use .poly.xml file in my simulation and I need to match the
vehicle coordinate with the poly.xml file.
This is the link, if you have some hints, I'm really
http://sourceforge.net/apps/mediawiki/sumo/index.php?title=Purgatory/TraceExporterJar
"Since ns2 allows only positive x- and y-coordinates, the
scenario is shifted accordingly if negative coordinates are
used in the Sumo scenario."
Thanks again,
Frédéric
Post by Jakob Erdmann
regards,
Jakob
Dear all,
I start recently use sumo (0.17.1) to produce NS2
scenario based on
OpenStreetMap. I follow tutorial (by the way very
helpful) and found a
way to go until "fcd output" generated by sumo binary.
I have several (3) questions about the different files
produced and the
way to use traceExporter.py.
In fcdoutput file, I found some different tag from the
documentation
x in place of pos_x, y in place of pos_y but I also
found pos and I
wondering what does it mean ?
Do you have an explanation about this tags ?
Example of a vehicule
<timestep time="1.00">
<vehicle id="1" x="1120.17" y="675.21"
angle="-113.77"
type="DEFAULT_VEHTYPE" speed="0.00" pos="0.20"
lane="-139664890#1_0"
slope="0.00"/>
</timestep>
Then I try to generate my NS2 with traceExporter.py, I
got a strange
behaviour since I did not get a file and my mouse
pointer change to a
cross. I try several combination but did not find the
way to produce my
NS2 file. I wrote my own parser but I would prefer used
traceExporter.py
if possible. What did I make wrong ?
I see also that I have some negative values and I check
documentation
and found : "Since ns2 allows only positive x- and
y-coordinates, the
scenario is shifted accordingly if negative coordinates
are used in the
Sumo scenario. " Does it mean that the min(x) and min(y)
are shifted to 0 ?
Thanks for your help,
Frédéric
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for
HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and
External API Access
Free app hosting. Or install the open source package on
any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha
Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
sumo-user mailing list
https://lists.sourceforge.net/lists/listinfo/sumo-user
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. :+33 (0)3 89 20 23 73 <tel:%2B33%20%280%293%2089%2020%2023%2073> Fax+33 (0)3 89 20 23 84 <tel:%2B33%20%280%293%2089%2020%2023%2084>
http://www.iutcolmar.uha.fr/rt
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. :+33 (0)3 89 20 23 73 <tel:%2B33%20%280%293%2089%2020%2023%2073> Fax+33 (0)3 89 20 23 84 <tel:%2B33%20%280%293%2089%2020%2023%2084>
http://www.iutcolmar.uha.fr/rt
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. : +33 (0)3 89 20 23 73 Fax +33 (0)3 89 20 23 84
http://www.iutcolmar.uha.fr/rt
Jakob Erdmann
2013-11-28 14:12:23 UTC
Permalink
The error is puzzling. If you send me your input files I would like to try
an reproduce it.
regards,
Jakob
Post by Jakob Erdmann
Hello,
Python 2.7.3 (default, Sep 26 2013, 20:03:06)
[GCC 4.6.3] on linux2
Just install the newest version and I got the same error.
Thank for your help,
Frédéric
Hello,
I realized, the shebang was not present in version 0.17.1.
I encourage you to use the newly released version 0.19.0
However, the python error you encounter is not explained by any changes
between these revisions. What version of python are you using?
regards,
Jakob
Post by Frédéric Drouhin
Dear Jakob,
That's right the shebang was not present in my case and shame on me, I
did not check which interpreter was used :(
I used your command and got this new error, I suspect my fcdoutput file
and checking what's going on.
$ ../sumo-0.17.1/tools/bin/traceExporter.py --fcd-input sbg.fcdoutput.xml
--ns2config-output sb.config.tcl --ns2activity-output sbg.activity.tcl
--ns2mobility-output sbg.mobility.tcl --penetration 1 --begin 0 --end 100
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 225, in <module>
sys.exit(main(sys.argv))
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 189, in main
vIDm, vehInfo, begin, end, area = runMethod(options.fcd,
options.ns2mobility, ns2.fcd2ns2mobility, options)
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 99, in runMethod
ret = writer(procFCDStream(fcdStream, options), o, further)
File
"../sumo-0.17.1/tools/bin/../../tools/sumolib/output/convert/ns2.py", line
24, in fcd2ns2mobility
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 83, in
procFCDStream
if v not in chosen: chosen[v] = random()<options.penetration
TypeError: 'NoneType' object is not callable
Regards,
Frédéric
Hello,
for some reason the hashbang (#!/usr/bin/env python) in the script does
not work on your system.
$ python traceExporter.py --fcd-input sbg.fcdoutput.xml
--ns2config-output sb.config.tcl --ns2activity-output sbg.activity.tcl
--ns2mobility-output sbg.mobility.tcl --penetration 1 --begin 0 --end 100
traceExporter.jar is no longer supported and not included in the latest
sumo release. However, in regard to shifted coordinates I can tell you
this: by default, netconvert shifts all coordinates in the scenario so that
the lower left coordinate will be 0,0. Thus, the coordinates found in fcd
output will all be positive.
regards,
Jakob
Post by Frédéric Drouhin
Hello Jakop,
Thanks for your answer !
Post by Frédéric Drouhin
Post by Jakob Erdmann
1) the 'pos' attribute contains the offset of a vehicle from the
start of the current lane
Ok, thanks
Post by Frédéric Drouhin
Post by Jakob Erdmann
2) the problem you encountered with traceExporter.py is hard to
diagnose from your description. Please report the command you used (it
needs to be run on the command line!) and report any errors that were
printed
$ ./traceExporter.py --fcd-input sbg.fcdoutput.xml --ns2config-output
sb.config.tcl --ns2activity-output sbg.activity.tcl --ns2mobility-output
sbg.mobility.tcl --penetration 1 --begin 0 --end 100
@file convert_fcd2phem.py
@author Daniel Krajzewicz
@date 2013-01-15
@version : traceExporter.py 13845 2013-05-02 13:53:19Z dkrajzew $
A script for converting SUMO's fcd-output into files readable by PHEM.
SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
Copyright (C) 2013 DLR (http://www.dlr.de/) and contributors
All rights reserved
: File name too long
error/xwindow.c/XSelectWindow/9052.
../sumo-0.17.1/tools/bin/traceExporter.py: line 15: syntax error near
unexpected token `os.path.join'
`sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..',
'tools'))'
java -jar traceExporter.jar ns2 -n sbg2km.net.xml -t sbg2km.state.xml -a
sbg2km40nd.activity.tcl -m sbg2km40nd.mobility.tcl -c sbg2km40nd.config.tcl
-p 1 -b 0 -e 100
Post by Frédéric Drouhin
Post by Jakob Erdmann
Post by Jakob Erdmann
3) I cannot find the documentation about negative values to which
you refer. Please give a link.I'm looking to use .poly.xml file in my
simulation and I need to match the vehicle coordinate with the poly.xml
file.
This is the link, if you have some hints, I'm really interesting (but
http://sourceforge.net/apps/mediawiki/sumo/index.php?title=Purgatory/TraceExporterJar
"Since ns2 allows only positive x- and y-coordinates, the scenario is
shifted accordingly if negative coordinates are used in the Sumo scenario."
Thanks again,
Frédéric
regards,
Jakob
Post by Frédéric Drouhin
Dear all,
I start recently use sumo (0.17.1) to produce NS2 scenario based on
OpenStreetMap. I follow tutorial (by the way very helpful) and found a
way to go until "fcd output" generated by sumo binary.
I have several (3) questions about the different files produced and the
way to use traceExporter.py.
In fcdoutput file, I found some different tag from the documentation
x in place of pos_x, y in place of pos_y but I also found pos and I
wondering what does it mean ?
Do you have an explanation about this tags ?
Example of a vehicule
<timestep time="1.00">
<vehicle id="1" x="1120.17" y="675.21" angle="-113.77"
type="DEFAULT_VEHTYPE" speed="0.00" pos="0.20" lane="-139664890#1_0"
slope="0.00"/>
</timestep>
Then I try to generate my NS2 with traceExporter.py, I got a strange
behaviour since I did not get a file and my mouse pointer change to a
cross. I try several combination but did not find the way to produce my
NS2 file. I wrote my own parser but I would prefer used traceExporter.py
if possible. What did I make wrong ?
I see also that I have some negative values and I check documentation
and found : "Since ns2 allows only positive x- and y-coordinates, the
scenario is shifted accordingly if negative coordinates are used in the
Sumo scenario. " Does it mean that the min(x) and min(y) are shifted to 0 ?
Thanks for your help,
Frédéric
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
sumo-user mailing list
https://lists.sourceforge.net/lists/listinfo/sumo-user
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. : +33 (0)3 89 20 23 73 Fax +33 (0)3 89 20 23 84http://www.iutcolmar.uha.fr/rt
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. : +33 (0)3 89 20 23 73 Fax +33 (0)3 89 20 23 84http://www.iutcolmar.uha.fr/rt
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. : +33 (0)3 89 20 23 73 Fax +33 (0)3 89 20 23 84http://www.iutcolmar.uha.fr/rt
Jakob Erdmann
2013-11-28 15:53:36 UTC
Permalink
Hello,
thanks to your input files I was able to find and fix the bug.
(see http://sumo-sim.org/trac.wsgi/ticket/1090).
You can either check out the latest svn version or simply use the
traceExporter.py file here:
http://sumo-sim.org/trac.wsgi/browser/trunk/sumo/tools/bin/traceExporter.py?rev=15228
(download button at the bottom)
regards,
Jakob
Post by Jakob Erdmann
Hello,
Python 2.7.3 (default, Sep 26 2013, 20:03:06)
[GCC 4.6.3] on linux2
Just install the newest version and I got the same error.
Thank for your help,
Frédéric
Hello,
I realized, the shebang was not present in version 0.17.1.
I encourage you to use the newly released version 0.19.0
However, the python error you encounter is not explained by any changes
between these revisions. What version of python are you using?
regards,
Jakob
Post by Frédéric Drouhin
Dear Jakob,
That's right the shebang was not present in my case and shame on me, I
did not check which interpreter was used :(
I used your command and got this new error, I suspect my fcdoutput file
and checking what's going on.
$ ../sumo-0.17.1/tools/bin/traceExporter.py --fcd-input sbg.fcdoutput.xml
--ns2config-output sb.config.tcl --ns2activity-output sbg.activity.tcl
--ns2mobility-output sbg.mobility.tcl --penetration 1 --begin 0 --end 100
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 225, in <module>
sys.exit(main(sys.argv))
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 189, in main
vIDm, vehInfo, begin, end, area = runMethod(options.fcd,
options.ns2mobility, ns2.fcd2ns2mobility, options)
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 99, in runMethod
ret = writer(procFCDStream(fcdStream, options), o, further)
File
"../sumo-0.17.1/tools/bin/../../tools/sumolib/output/convert/ns2.py", line
24, in fcd2ns2mobility
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 83, in
procFCDStream
if v not in chosen: chosen[v] = random()<options.penetration
TypeError: 'NoneType' object is not callable
Regards,
Frédéric
Hello,
for some reason the hashbang (#!/usr/bin/env python) in the script does
not work on your system.
$ python traceExporter.py --fcd-input sbg.fcdoutput.xml
--ns2config-output sb.config.tcl --ns2activity-output sbg.activity.tcl
--ns2mobility-output sbg.mobility.tcl --penetration 1 --begin 0 --end 100
traceExporter.jar is no longer supported and not included in the latest
sumo release. However, in regard to shifted coordinates I can tell you
this: by default, netconvert shifts all coordinates in the scenario so that
the lower left coordinate will be 0,0. Thus, the coordinates found in fcd
output will all be positive.
regards,
Jakob
Post by Frédéric Drouhin
Hello Jakop,
Thanks for your answer !
Post by Frédéric Drouhin
Post by Jakob Erdmann
1) the 'pos' attribute contains the offset of a vehicle from the
start of the current lane
Ok, thanks
Post by Frédéric Drouhin
Post by Jakob Erdmann
2) the problem you encountered with traceExporter.py is hard to
diagnose from your description. Please report the command you used (it
needs to be run on the command line!) and report any errors that were
printed
$ ./traceExporter.py --fcd-input sbg.fcdoutput.xml --ns2config-output
sb.config.tcl --ns2activity-output sbg.activity.tcl --ns2mobility-output
sbg.mobility.tcl --penetration 1 --begin 0 --end 100
@file convert_fcd2phem.py
@author Daniel Krajzewicz
@date 2013-01-15
@version : traceExporter.py 13845 2013-05-02 13:53:19Z dkrajzew $
A script for converting SUMO's fcd-output into files readable by PHEM.
SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
Copyright (C) 2013 DLR (http://www.dlr.de/) and contributors
All rights reserved
: File name too long
error/xwindow.c/XSelectWindow/9052.
../sumo-0.17.1/tools/bin/traceExporter.py: line 15: syntax error near
unexpected token `os.path.join'
`sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..',
'tools'))'
java -jar traceExporter.jar ns2 -n sbg2km.net.xml -t sbg2km.state.xml -a
sbg2km40nd.activity.tcl -m sbg2km40nd.mobility.tcl -c sbg2km40nd.config.tcl
-p 1 -b 0 -e 100
Post by Frédéric Drouhin
Post by Jakob Erdmann
Post by Jakob Erdmann
3) I cannot find the documentation about negative values to which
you refer. Please give a link.I'm looking to use .poly.xml file in my
simulation and I need to match the vehicle coordinate with the poly.xml
file.
This is the link, if you have some hints, I'm really interesting (but
http://sourceforge.net/apps/mediawiki/sumo/index.php?title=Purgatory/TraceExporterJar
"Since ns2 allows only positive x- and y-coordinates, the scenario is
shifted accordingly if negative coordinates are used in the Sumo scenario."
Thanks again,
Frédéric
regards,
Jakob
Post by Frédéric Drouhin
Dear all,
I start recently use sumo (0.17.1) to produce NS2 scenario based on
OpenStreetMap. I follow tutorial (by the way very helpful) and found a
way to go until "fcd output" generated by sumo binary.
I have several (3) questions about the different files produced and the
way to use traceExporter.py.
In fcdoutput file, I found some different tag from the documentation
x in place of pos_x, y in place of pos_y but I also found pos and I
wondering what does it mean ?
Do you have an explanation about this tags ?
Example of a vehicule
<timestep time="1.00">
<vehicle id="1" x="1120.17" y="675.21" angle="-113.77"
type="DEFAULT_VEHTYPE" speed="0.00" pos="0.20" lane="-139664890#1_0"
slope="0.00"/>
</timestep>
Then I try to generate my NS2 with traceExporter.py, I got a strange
behaviour since I did not get a file and my mouse pointer change to a
cross. I try several combination but did not find the way to produce my
NS2 file. I wrote my own parser but I would prefer used traceExporter.py
if possible. What did I make wrong ?
I see also that I have some negative values and I check documentation
and found : "Since ns2 allows only positive x- and y-coordinates, the
scenario is shifted accordingly if negative coordinates are used in the
Sumo scenario. " Does it mean that the min(x) and min(y) are shifted to 0 ?
Thanks for your help,
Frédéric
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
sumo-user mailing list
https://lists.sourceforge.net/lists/listinfo/sumo-user
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. : +33 (0)3 89 20 23 73 Fax +33 (0)3 89 20 23 84http://www.iutcolmar.uha.fr/rt
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. : +33 (0)3 89 20 23 73 Fax +33 (0)3 89 20 23 84http://www.iutcolmar.uha.fr/rt
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. : +33 (0)3 89 20 23 73 Fax +33 (0)3 89 20 23 84http://www.iutcolmar.uha.fr/rt
Frédéric Drouhin
2013-11-28 16:54:12 UTC
Permalink
Dear Jakob,

I really appreciate your help, I download the script and everything
works fine (even my simulation with NS3) !

Thanks,

Frédéric
Post by Jakob Erdmann
Hello,
thanks to your input files I was able to find and fix the bug.
(see http://sumo-sim.org/trac.wsgi/ticket/1090).
You can either check out the latest svn version or simply use the
http://sumo-sim.org/trac.wsgi/browser/trunk/sumo/tools/bin/traceExporter.py?rev=15228
(download button at the bottom)
regards,
Jakob
Hello,
Python 2.7.3 (default, Sep 26 2013, 20:03:06)
[GCC 4.6.3] on linux2
Just install the newest version and I got the same error.
Thank for your help,
Frédéric
Post by Jakob Erdmann
Hello,
I realized, the shebang was not present in version 0.17.1.
I encourage you to use the newly released version 0.19.0
However, the python error you encounter is not explained by any
changes between these revisions. What version of python are you using?
regards,
Jakob
Dear Jakob,
That's right the shebang was not present in my case and shame
on me, I did not check which interpreter was used :(
I used your command and got this new error, I suspect my
fcdoutput file and checking what's going on.
$ ../sumo-0.17.1/tools/bin/traceExporter.py --fcd-input
sbg.fcdoutput.xml --ns2config-output sb.config.tcl
--ns2activity-output sbg.activity.tcl --ns2mobility-output
sbg.mobility.tcl --penetration 1 --begin 0 --end 100
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 225, in <module>
sys.exit(main(sys.argv))
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 189, in main
vIDm, vehInfo, begin, end, area = runMethod(options.fcd,
options.ns2mobility, ns2.fcd2ns2mobility, options)
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 99, in runMethod
ret = writer(procFCDStream(fcdStream, options), o, further)
File
"../sumo-0.17.1/tools/bin/../../tools/sumolib/output/convert/ns2.py",
line 24, in fcd2ns2mobility
File "../sumo-0.17.1/tools/bin/traceExporter.py", line 83,
in procFCDStream
if v not in chosen: chosen[v] = random()<options.penetration
TypeError: 'NoneType' object is not callable
Regards,
Frédéric
Post by Jakob Erdmann
Hello,
for some reason the hashbang (#!/usr/bin/env python) in the
script does not work on your system.
$ python traceExporter.py --fcd-input sbg.fcdoutput.xml
--ns2config-output sb.config.tcl --ns2activity-output
sbg.activity.tcl --ns2mobility-output sbg.mobility.tcl
--penetration 1 --begin 0 --end 100
traceExporter.jar is no longer supported and not included in
the latest sumo release. However, in regard to shifted
coordinates I can tell you this: by default, netconvert
shifts all coordinates in the scenario so that the lower
left coordinate will be 0,0. Thus, the coordinates found in
fcd output will all be positive.
regards,
Jakob
Hello Jakop,
Thanks for your answer !
Post by Jakob Erdmann
Post by Jakob Erdmann
1) the 'pos' attribute contains the offset of a
vehicle from the start of the current lane
Ok, thanks
Post by Jakob Erdmann
Post by Jakob Erdmann
2) the problem you encountered with
traceExporter.py is hard to diagnose from your
description. Please report the command you used (it
needs to be run on the command line!) and report any
errors that were printed
Post by Jakob Erdmann
Post by Jakob Erdmann
Post by Jakob Erdmann
I understand the point so I use the following
$ ./traceExporter.py --fcd-input sbg.fcdoutput.xml
--ns2config-output sb.config.tcl --ns2activity-output
sbg.activity.tcl --ns2mobility-output sbg.mobility.tcl
--penetration 1 --begin 0 --end 100
@file convert_fcd2phem.py
@author Daniel Krajzewicz
@date 2013-01-15
@version : traceExporter.py 13845 2013-05-02 13:53:19Z
dkrajzew $
A script for converting SUMO's fcd-output into files
readable by PHEM.
SUMO, Simulation of Urban MObility; see
http://sumo.sourceforge.net/
Copyright (C) 2013 DLR (http://www.dlr.de/) and contributors
All rights reserved
: File name too long
import: unable to grab mouse `': Resource temporarily
syntax error near unexpected token `os.path.join'
`sys.path.append(os.path.join(os.path.dirname(__file__),
'..', '..', 'tools'))'
Post by Jakob Erdmann
Post by Jakob Erdmann
Post by Jakob Erdmann
Anyway I solve my problem by using
java -jar traceExporter.jar ns2 -n sbg2km.net.xml -t
sbg2km.state.xml -a sbg2km40nd.activity.tcl -m
sbg2km40nd.mobility.tcl -c sbg2km40nd.config.tcl -p 1 -b
0 -e 100
Post by Jakob Erdmann
Post by Jakob Erdmann
Post by Jakob Erdmann
3) I cannot find the documentation about negative
values to which you refer. Please give a link.I'm
looking to use .poly.xml file in my simulation and I
need to match the vehicle coordinate with the poly.xml
file.
This is the link, if you have some hints, I'm really
http://sourceforge.net/apps/mediawiki/sumo/index.php?title=Purgatory/TraceExporterJar
"Since ns2 allows only positive x- and y-coordinates,
the scenario is shifted accordingly if negative
coordinates are used in the Sumo scenario."
Thanks again,
Frédéric
Post by Jakob Erdmann
regards,
Jakob
Dear all,
I start recently use sumo (0.17.1) to produce NS2
scenario based on
OpenStreetMap. I follow tutorial (by the way very
helpful) and found a
way to go until "fcd output" generated by sumo binary.
I have several (3) questions about the different
files produced and the
way to use traceExporter.py.
In fcdoutput file, I found some different tag from
the documentation
x in place of pos_x, y in place of pos_y but I also
found pos and I
wondering what does it mean ?
Do you have an explanation about this tags ?
Example of a vehicule
<timestep time="1.00">
<vehicle id="1" x="1120.17" y="675.21" angle="-113.77"
type="DEFAULT_VEHTYPE" speed="0.00" pos="0.20"
lane="-139664890#1_0"
slope="0.00"/>
</timestep>
Then I try to generate my NS2 with
traceExporter.py, I got a strange
behaviour since I did not get a file and my mouse
pointer change to a
cross. I try several combination but did not find
the way to produce my
NS2 file. I wrote my own parser but I would prefer
used traceExporter.py
if possible. What did I make wrong ?
I see also that I have some negative values and I
check documentation
and found : "Since ns2 allows only positive x- and
y-coordinates, the
scenario is shifted accordingly if negative
coordinates are used in the
Sumo scenario. " Does it mean that the min(x) and
min(y) are shifted to 0 ?
Thanks for your help,
Frédéric
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for
HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and
External API Access
Free app hosting. Or install the open source
package on any LAMP server.
Sign up and see examples for AngularJS, jQuery,
Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
sumo-user mailing list
https://lists.sourceforge.net/lists/listinfo/sumo-user
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. :+33 (0)3 89 20 23 73 <tel:%2B33%20%280%293%2089%2020%2023%2073> Fax+33 (0)3 89 20 23 84 <tel:%2B33%20%280%293%2089%2020%2023%2084>
http://www.iutcolmar.uha.fr/rt
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. :+33 (0)3 89 20 23 73 <tel:%2B33%20%280%293%2089%2020%2023%2073> Fax+33 (0)3 89 20 23 84 <tel:%2B33%20%280%293%2089%2020%2023%2084>
http://www.iutcolmar.uha.fr/rt
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. :+33 (0)3 89 20 23 73 <tel:%2B33%20%280%293%2089%2020%2023%2073> Fax+33 (0)3 89 20 23 84 <tel:%2B33%20%280%293%2089%2020%2023%2084>
http://www.iutcolmar.uha.fr/rt
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. : +33 (0)3 89 20 23 73 Fax +33 (0)3 89 20 23 84
http://www.iutcolmar.uha.fr/rt
Jakob Erdmann
2013-12-03 07:55:59 UTC
Permalink
Hello Frederic,
thank you for reporting this problem.
It is fixed in revision 15251.
see http://sumo-sim.org/trac.wsgi/changeset/15251
regards,
Jakob
Post by Frédéric Drouhin
Dear Jakob,
Following your correction, I found again a strange behaviour (not related
to it).
$> /home/frederic/Sumo/sumo/tools/bin/traceExporter.py --fcd-input
test.fcdoutput.xml --ns2config-output test60.config.tcl
--ns2activity-output test60.activity.tcl --ns2mobility-output
test60.ns2mobility.xml --penetration 1 --begin 0 --end 60
Then if I make a check on NS2 node 7, I found two entries for the same
$> grep "$node_(7)" test60.ns2mobility.xml | grep "at 13.0"
$ns_ at 13.0 "$node_(7) setdest 730.18 124.29 0"
$ns_ at 13.0 "$node_(7) setdest 143.88 261.15 0"
The problem did not come from test.fcdoutput.xml but from the file
generated (here test60.ns2mobility.xml).
At 13.0 vehicle 1 added
At 13.0 vehicle 13 added
At 13.0 vehicle 2 added
At 13.0 vehicle 5 added
At 13.0 vehicle 6 added
At 13.0 vehicle 7 added
At 13.0 vehicle 8 added
At 13.0 vehicle 9 added
Output from fcd2ns2mobility (in ns2.py - just a print of time together
$ns_ at 13.0 "$node_(0) setdest 594.91 743.64 0 " # for vehicle ID 1
$ns_ at 13.0 "$node_(7) setdest 730.18 124.29 0 " # for vehicle ID 13
$ns_ at 13.0 "$node_(1) setdest 329.14 699.29 0 " # for vehicle ID 2
$ns_ at 13.0 "$node_(3) setdest 438.81 696.59 0 " # for vehicle ID 5
$ns_ at 13.0 "$node_(4) setdest 462.49 793.37 0 " # for vehicle ID 6
$ns_ at 13.0 "$node_(5) setdest 854.27 648.09 0 " # for vehicle ID 7
$ns_ at 13.0 "$node_(6) setdest 178.68 798.67 0 " # for vehicle ID 8
$ns_ at 13.0 "$node_(7) setdest 143.88 261.15 0 " # for vehicle ID 9
You see that two nodes has the same NS2 node (v.id 9 and v.id 13). We are
just coming one after the other (not in the same order than the print).
I think the v.id is converted to NS2 node, here is the problem (_Running
class).
The difference is coming that an entry in my case v.id=3 is deleted by
writeMissing (ns2.py) since the vehicule 3 is present at time 9 and
disapear at time=10.
I just move the NS2 id to a simple counter in Running class and it works
but dunno if it's the correct solution.
let me know,
Thanks, best regards
Frederic
--
Frédéric Drouhin
Maître de Conférence, Laboratoire MIPS, Equipe GRTC
Université de Haute-Alsace, IUT de COLMAR
34 rue du Grillenbreit
BP 50568
F-68008 COLMAR
Tél. : +33 (0)3 89 20 23 73 Fax +33 (0)3 89 20 23 84http://www.iutcolmar.uha.fr/rt
Loading...