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


Le 28/11/2013 13:11, Jakob Erdmann a écrit :
> 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
>
>
>
> 2013/11/28 Frédéric Drouhin <[email protected] 
> <mailto:[email protected]>>
>
>     Hello Jakop,
>
>     Thanks for your answer !
>
>
>     >>>>> 1) the 'pos' attribute contains the offset of a vehicle from
>     the start of the current lane
>     Ok, thanks
>
>
>     >>>>> 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
>
>     >>>>>>>>> I understand the point so I use the following command:
>     $ ./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'))'
>
>     >>>>>>>>>>> Anyway I solve my problem by using traceExport.jar:
>     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
>
>     >>>>>> 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
>
>
>>     regards,
>>     Jakob
>>
>>
>>     2013/11/18 Frédéric Drouhin <[email protected]
>>     <mailto:[email protected]>>
>>
>>         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
>>
>>
>>         
>> ------------------------------------------------------------------------------
>>         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
>>         [email protected]
>>         <mailto:[email protected]>
>>         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

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to