Hi Michael,

form me nothing has changed, but now I know that the difference comes from
the vehicle.getPosition(vID) returns GEO-coordinates as default, while for
the other one, 
this needs to be enabled with a 'true'-parameter. 

If like in my case, the left node of the two crossing streets lies at [-50,
0]
Is it correct, that in Geo Coordinates are [1,50] ?

This means, that Geo-Coords have their [0,0] in the lower-left corner of the
networks bounding box, have they?
(At least if no Geo Coords are provided via OSM or whatever).

Regards,

Marcus

-----Original Message-----
From: Michael Behrisch [mailto:[email protected]] 
Sent: Samstag, 11. Oktober 2014 16:49
To: Marcus Müller; 'sumo-user'
Subject: Re: [sumo-user] Don't understand Traci.vehicle.getPosition

Hi Marcus,
I fixed a bug in position retrieval recently. could you retry with a fresh
nightly build?

Thanks,
Michael

Am 04.10.2014 um 11:46 schrieb Marcus Müller:
> Hi Michael,
> 
>  
> 
> thank you very much for your answer. Sorry that I did not provide the 
> network last time.
> 
> The network is a shrinked version of the traci_tls tutorial. I 
> commented out all but two cars,
> 
> One on the vertical and one on the horizontal street. 
> 
> Both cars depart at time=0 and maintain exactly the same parameters as 
> they are
> 
> supposed to crash in the middle of the junction.
> 
> But this, I guess, should not affect, how the position of the vehicles 
> is calculated.
> 
>  
> 
> If you check out the two possible functions I mentioned last time, 
> you'll see they lead to different results:
> 
> egoVehicle is the horizontal car (=”right_2”)
> 
>  
> 
> traci.vehicle.getPosition(egoVehicle);
> 
>  
> 
> 
> 
> (col 1 = x, col 2 = y, rows = timesteps of 0.01 s)
> 
>  
> 
>  
> 
> traci.simulation.convert2D(roadID,lanePos,laneIdx,'False');
> 
> 
> 
> (col 1 = x, col 2 = y, rows = timesteps of 0.01 s)
> 
>  
> 
> Here is how I calculate the parameters for the second call:
> 
>  
> 
>      laneIdx = traci.vehicle.getLaneIndex(egoVehicle);
> 
>      lanePos = traci.vehicle.getLanePosition(egoVehicle);
> 
>      roadID  = traci.vehicle.getRoadID(egoVehicle);
> 
>  
> 
> As you can see in the network, the second result is correct. The car 
> departs at
> 
> (-50, -1.6500) as the node is at (-50,0). The X-Coordinate of the
> vehicle.getPosition()
> 
> Looks more like it is somehow relative to the route the car is on, 
> showing the distance
> 
> The car has driven.
> 
> Hope this helps to find either a bug or my own stupidity ;)
> 
>  
> 
> Regards,
> 
>  
> 
> Marcus
> 
>  
> 
>  
> 
>  
> 
> -----Original Message-----
> From: Michael Behrisch [mailto:[email protected]]
> Sent: Samstag, 4. Oktober 2014 00:25
> To: Marcus Müller; 'sumo-user'
> Subject: Re: [sumo-user] Don't understand Traci.vehicle.getPosition
> 
>  
> 
> Hi Marcus,
> 
> it is hard to tell without seeing the scenario but it might be that 
> the vehicle just hasn't departed yet or is parking or on teleport and 
> thus the value are just not valid? Otherwise the complete scenario 
> would be helpful for a bug report.
> 
>  
> 
> Best regards,
> 
> Michael
> 
>  
> 
> Am 03.10.2014 um 14:13 schrieb Marcus Müller:
> 
>> Hi all,
> 
>>
> 
>>  
> 
>>
> 
>> is there a reason, why the coordinates of the following two 
>> functions,
> 
>> describing the position of the same vehicle, are different?
> 
>>
> 
>>  
> 
>>
> 
>> traci.vehicle.getPosition(egoVehicle);
> 
>>
> 
>>  
> 
>>
> 
>> %roadID, lanePos and laneIdx correspond to the same egoVehicle
> 
>>
> 
>> traci.simulation.convert2D(roadID,lanePos,laneIdx,'False');
> 
>>
> 
>>  
> 
>>
> 
>> The second function works for me, as it reults in a position (-50, 0)
> 
>> equal to the position of the starting node of the vehicle,
> 
>>
> 
>> While the first function starts with (1, 50).
> 
>>
> 
>>  
> 
>>
> 
>> Regards,
> 
>>
> 
>>  
> 
>>
> 
>> Marcus
> 
>>
> 
>> ---------------------------------------------------------------------
>> -
> 
>> -------- Meet PCI DSS 3.0 Compliance Requirements with EventLog
> 
>> Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI
> 
>> DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download
> 
>> White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with
> 
>> EventLog Analyzer
> 
>>  
>> <http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ost
>> g>
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.
> 
>> clktrk _______________________________________________
> 
>> sumo-user mailing list
> 
>>  <mailto:[email protected]> 
>> [email protected]
> 
>>  <https://lists.sourceforge.net/lists/listinfo/sumo-user>
> https://lists.sourceforge.net/lists/listinfo/sumo-user
> 
>>
> 
>  
> 
> 



------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to