Hello,
please send me your scenario (network and traci script) in a zip-archive so
that I can reproduce the issue.
It would be helpful if you could reduce the scenario so that there is only
a single vehicle which exhibits the faulty behavior.
regards,
Jakob

2017-01-20 10:38 GMT+01:00 KANAAD VINAYAK PARVATE <[email protected]>:

> Hi all,
>
> I'm trying to move vehicles back to a previous location (namely the initial
> location to "reset" the simulation). However, I'm running into issues
> concerning the accuracy of the MoveTo method.
>
> I noticed that in this thread
> <https://sourceforge.net/p/sumo/mailman/message/35539112/> Jakob mentioned
> that some bug was fixed in the newest version of SUMO, so I built the
> latest version; however, I'm still getting the same bug.
>
> I'm storing the position of the vehicle at the initial position. Then, I
> call MoveToXY specifying the same position; however, it seems that despite
> the original position being that of a valid car, SUMO places the car
> somewhere nearby on the road.
>
> Is this an inherent issue in SUMO? Or is there a way to more accurately
> move vehicles? Here is a short snippet of my code:
>
> storing the info:
>
> for veh_id in self.ids:
>     edge_id = traci.vehicle.getRoadID(veh_id)
>     route_id = traci.vehicle.getRouteID(veh_id)
>     lane_id = traci.vehicle.getLaneID(veh_id)
>     lane_index = traci.vehicle.getLaneIndex(veh_id)
>     lane_pos = traci.vehicle.getLanePosition(veh_id)
>     pos = traci.vehicle.getPosition(veh_id)
>     angle = traci.vehicle.getAngle(veh_id)
>     speed = traci.vehicle.getSpeed(veh_id)
>     self.initial_config[veh_id] = (edge_id, route_id, lane_id, lane_index,
> lane_pos, pos, angle, speed)
>
> moving the vehicle:
>
> x, y = pos
> traci.vehicle.moveToXY(car_id, edge_id, lane_index, x, y, angle)
> traci.vehicle.setRouteID(car_id, route_id)
>
> ​Cheers,
>
> Kanaad Parvate
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to