Dear Vaibhav Rungta

I suggest you change your code in line 40:
from:
traci.vehicleControl.stop("v1")
to:
traci.vehicle.setSpeed("v1", 0)

this stops/ your vehicle immediately - in your example right from the 
start.

To avoid misunderstandings - please note that stops are elements of a route
and cause the vehicle to stop at a certain position e.g. at a bus stop.
http://sumo.dlr.de/wiki/Definition_of_Vehicles,_Vehicle_Types,_and_Routes#Stops

A word about debugging TraCI-Applets:

You may also start sumo as sumo-gui and step through the simulation 
steps by
using crtl + d to get a insight.

Debugging python based TraCI code can be eased by stepping through the 
code by
import pdb; pdb.set_trace()
which also stops the sumo simulation, since no further TraCI messages 
are exchanged.

With Best Regards
Marek Heinrich
simoserv GmbH



On 26.10.2016 12:40, Vaibhav Rungta wrote:
> Hello,
> I am trying to stop a particular vehicle (vehicle ID v1) irrespective of
> it's position whenever the phase of the signal (signal ID B2) is red, just
> to get an understanding of commands and interfacing.
>
> The file is getting executed but I receiving the error message:
>
>
> ***Starting server on port 8813 ***
> Loading net-file from 'att2.net.xml'... done (2ms).
> Loading done.
> Simulation started with time: 0.00
> Error: tcpip::Socket::recvAndCheck @ recv: Socket reset by peer
> Quitting (on error).
>
> Kindly help me figure out the error. Are there any examples other than ones
> available in tutorial to help me understand how to control vehicles?
>
> Regards,
> Vaibhav Rungta
> Graduate Student - Industrial and Systems Engineering
> Graduate Assistant - Toyota Production Systems Lab
> Research Assistant - University Transport Research Centre
> 585-754-7133
>
>
> ------------------------------------------------------------------------------
> The Command Line: Reinvented for Modern Developers
> Did the resurgence of CLI tooling catch you by surprise?
> Reconnect with the command line and become more productive.
> Learn the new .NET and ASP.NET CLI. Get your free copy!
> http://sdm.link/telerik
>
>
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user

------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to