Thanks, Michael's suggestion worked like a charm On Tue, Nov 22, 2016 at 1:04 AM, Lockhart, Thomas G (398I) < [email protected]> wrote:
> Don't have my code in front of me but that call or another one will get > the vehicle to stop any time. Do not bother changing the route first. > > - Tom > > > On Nov 21, 2016, at 10:06 AM, Green Mind <[email protected]> wrote: > > > > Doesn't seem right, could be the cause for the bug? > > > >>>> traci.vehicle.getRoute('13') > > ['L16', 'L162', 'L11', 'L1', 'D1', 'L19', 'D4', 'L4', 'L14', 'L16', > 'L162', > > 'L11', 'L1', 'D1', 'L19', 'D4', 'L4', 'L14', 'L16', 'L162', 'L11', 'L1', > > 'D1', 'L19', 'D4', 'L4', 'L14', 'L16', 'L162', 'L11', 'L1', 'D1', 'L19', > > 'D4', 'L4', 'L14', 'L16', 'L162', 'L11', 'L1', 'D1', 'L19', 'D4', 'L4', > > 'L14', 'L16', 'L162', 'L11', 'L1', 'D1', 'L19', 'D4', 'L4', 'L14', 'L16', > > 'L162', 'L11', 'L1', 'D1', 'L19', 'D4', 'L4', 'L14', 'L16', 'L162', > 'L11', > > 'L1', 'D1', 'L19', 'D4', 'L4', 'L14', 'L16', 'L162', 'L11', 'L1', 'D1', > > 'L19', 'D4', 'L4', 'L14', 'L16', 'L162', 'L11', 'L1', 'D1', 'L19', 'D4', > > 'L4', 'L14'] > >>>> > >>>> traci.vehicle.setRoute('13',['L14']) > >>>> > >>>> traci.vehicle.getRoute('13') > > ['L16', 'L162', 'L11', 'L1', 'D1', 'L19', 'D4', 'L4', 'L14'] > >>>> > >>>> traci.vehicle.setStop('13',"L14") > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > File "C:\Program Files (x86)\DLR\Sumo\tools\traci\_vehicle.py", line > 594, > > in setStop > > self._connection._sendExact() > > File "C:\Program Files (x86)\DLR\Sumo\tools\traci\connection.py", line > > 109, in _sendExact > > raise TraCIException(prefix[1], _RESULTS[prefix[2]], err) > > traci.exceptions.TraCIException: Stop for vehicle '13' on lane 'L14_0' > is > > not downstream the current route. > > > > On Mon, Nov 21, 2016 at 3:43 PM, sumo.mahei <[email protected]> > > wrote: > > > >> What does : > >> > >> traci.vehicle.getRoute('13') > >> > >> return before and after setting the route? > >> > >> don't forget the speed down the vehicle - else wise it might > >> pass the stop point in the next sim step. > >> > >> Best > >> Marek Heinrich > >> simoserv GmbH > >> > >> Am 21.11.2016 um 14:39 schrieb Green Mind: > >> > >> Thanks, but that doesn't work unfortunately - still getting the same > error. > >> > >> On Mon, Nov 21, 2016 at 2:15 PM, sumo.mahei <[email protected]> > >> wrote: > >> > >>> Hi, > >>> > >>> maybe it's because of the wrong lane number. > >>> > >>> traci.vehicle.getLaneID('13') > >>> lane_index = traci.vehicle.getLaneIndex('13') > >>> traci.vehicle.setRoute('13',['L14']) > >>> traci.vehicle.setStop('13','L14', laneIndex=lane_index) > >>> > >>> Best Marek Heinrich > >>> simoserv GmbH > >>> > >>>> Am 21.11.2016 um 13:02 schrieb Green Mind: > >>>> > >>>> I'm trying to make a vehicle stop where it is. I do this by checking > the > >>>> vehicle's current edge, then modifying the route to contain only that > >>>> edge, > >>>> then add a stop in that edge. > >>>> > >>>> However, this throws an error. What am I doing wrong? > >>>> > >>>> traci.vehicle.getLaneID('13') > >>>>>>> > >>>>>> 'L14_2' > >>>> > >>>> traci.vehicle.setRoute('13',['L14']) > >>>>>>> traci.vehicle.setStop('13','L14') > >>>>>>> > >>>>>> Traceback (most recent call last): > >>>> File "<stdin>", line 1, in <module> > >>>> File "C:\Program Files (x86)\DLR\Sumo\tools\traci\_vehicle.py", > line > >>>> 594, > >>>> in setStop > >>>> self._connection._sendExact() > >>>> File "C:\Program Files (x86)\DLR\Sumo\tools\traci\connection.py", > >>>> line > >>>> 109, in _sendExact > >>>> raise TraCIException(prefix[1], _RESULTS[prefix[2]], err) > >>>> traci.exceptions.TraCIException: *Stop for vehicle '13' on lane > 'L14_0' > >>>> is > >>>> not downstream the current route.* > >>>> > >>>> TIA > >>>> ------------------------------------------------------------ > >>>> ------------------ > >>>> _______________________________________________ > >>>> sumo-user mailing list > >>>> [email protected] > >>>> https://lists.sourceforge.net/lists/listinfo/sumo-user > >>>> > >>> > >>> > >> > >> > > ------------------------------------------------------------ > ------------------ > > _______________________________________________ > > sumo-user mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/sumo-user > ------------------------------------------------------------------------------ _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
