Hello Jakob, thanks for the quick answer. I tested some additional stuff and found out, if I correctly? specify edgeID and laneID in the moveToXY function, the placement works nearly every time and only sometimes fail, if a vehicle is driving outside of the road network (especially in corners):
> traciclnt.vehicle.moveToXY("veh0", "", 0, pos.x, pos.y, angle, 2);
vs.
> std::tuple<std::string, SUMOReal, int> tmp =
traciclnt.simulation.convertRoad(pos.x, pos.y);
> traciclnt.vehicle.moveToXY("veh0", std::get<0>(tmp), std::get<2>(tmp),
pos.x, pos.y, angle, 2);
(pos.x and pos.y are my "external" coordinates).
Why is it important for the mapping to know the edge and lane id?
Shouldn't x and y coordinates be enough?
Is it possible to solve this without two message exchanges?
Regards,
Alexander
On 03/09/2017 03:13 PM, Jakob Erdmann wrote:
> Hello,
> these coordinates are used to encode an invalid position. This most
> likely happens due to a bug in the moveToXY mapping code.
> Please use the latest release 0.29.0 as it contains multiple fixes to
> moveToXY. If the problem appears with that version as well, send me the
> network and the coordinates that result in the unsuccessful positioning.
> regards,
> Jakob
>
> 2017-03-09 14:43 GMT+01:00 Alexander Weidinger
> <[email protected] <mailto:[email protected]>>:
>
> Hello,
>
> I program an external application,
> which controls SUMO via a TraCI connection.
> Since in my scenario cars may leave the network,
> I use keepRoute=2 in the moveToXY function.
> Unfortunately, sometimes cars visually "disappear"
> and when I try to center them via the GUI,
> they are at crazy coordinates (see attached *.png)
> but still not visible.
>
> Any ideas how that can happen?
> The coordinates I am providing for the moveToXY function
> are "correct" and don't go that far off.
>
> Regards,
> Alexander
>
>
> ------------------------------------------------------------------------------
> Announcing the Oxford Dictionaries API! The API offers world-renowned
> dictionary content that is easy and intuitive to access. Sign up for an
> account today to start using our lexical data to power your apps and
> projects. Get started today and enter our developer competition.
> http://sdm.link/oxford
> _______________________________________________
> sumo-user mailing list
> [email protected] <mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/sumo-user
> <https://lists.sourceforge.net/lists/listinfo/sumo-user>
>
>
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Announcing the Oxford Dictionaries API! The API offers world-renowned dictionary content that is easy and intuitive to access. Sign up for an account today to start using our lexical data to power your apps and projects. Get started today and enter our developer competition. http://sdm.link/oxford
_______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
