Hello Frederik,
it looks like you stumbled upon a bug in TraaS.
@Mario:
in Simulation.java, line 83 should be:
return new SumoCommand(Constants.CMD_GET_SIM_VARIABLE,
Constants.VAR_POSITION_CONVERSION, x, array,
Constants.RESPONSE_GET_SIM_VARIABLE, Constants.POSITION_ROADMAP);
Also, I think all the position conversion commands need a special treatment
in SumoCommand.java:
Positions are an integral type in TracI (acting somewhat like a compound
specifier). For convert2D instead of sending a compound with 4 elements
(edge, pos, lane, returnType) you need to send a compound with 2 elements
(inputPos, returnType)
regards,
Jakob
an
2016-06-01 20:37 GMT+02:00 Frederik Preuß <[email protected]>
:
> Hi,
>
> when i use the method convertRoad like this:
> System.out.println(conn.do_job_get(Simulation.convertRoad(53.148287,
> 8.182685, "true")));
> I get the exception: SUMO error for command 171: Get Simulation Variable:
> unsupported variable 0x42 specified
> Why?
>
> Also i have problems to use the method convert2D. I get this exception:
> SUMO error for command 171: Position conversion requires a source position
> and a position type as parameter.
> edge = (String) conn.do_job_get(Vehicle.getRoadID(vehID)); // is 24803606#0
> pos = (SumoPosition2D) conn.do_job_get(Vehicle.getPosition(vehID)); //
> getX() is 3423.240664911126
> laneindex = (Integer) conn.do_job_get(Vehicle.getLaneIndex(vehID)); // is
> always 0?
> System.out.println(conn.do_job_get(Simulation.convert2D(edge, pos.getX(),
> laneindex.byteValue(), "true")));
>
> Thank you.
>
> ________________________________
> Von: Jakob Erdmann [[email protected]]
> Gesendet: Dienstag, 31. Mai 2016 15:26
> An: Frederik Preuß
> Cc: [email protected]
> Betreff: Re: [sumo-user] Conversions of positions
>
> conn.do_job_get() see
> http://traas.sourceforge.net/cms/index.php?id=get-cos-emissions
> <UrlBlockedError.aspx>
>
> 2016-05-31 15:01 GMT+02:00 Frederik Preuß <
> [email protected]<UrlBlockedError.aspx>>:
> Hi,
>
> i figured out i have to use convertRoad to convert a geo-coordinate
> position to a lane of sumo and i have to use convert2D to convert a
> position of a vehicle to geo-coordinates. Am i right?
>
> I use the commands like this:
> Simulation.convertRoad(53.136163, 8.178308, "true");
> Simulation.convert2D(veh.getCurrentEdge().getID(), veh.getLanePosition(),
> veh.getLaneIndex().byteValue(), "true");
>
> The output of this methods are a SumoCommand. How can i get the
> information i want?
>
> Thank you.
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> <UrlBlockedError.aspx>
> _______________________________________________
> sumo-user mailing list
> [email protected]<UrlBlockedError.aspx>
> https://lists.sourceforge.net/lists/listinfo/sumo-user
> <UrlBlockedError.aspx>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user