Closed prasuka4 closed 1 month ago
if you don't call setSpeedMode, safety features should remain in affect by default: https://sumo.dlr.de/docs/TraCI/Change_Vehicle_State.html#speed_mode_0xb3
Hi I have not used setspeedmode earlier.
I have also tested speed modes now but none of them were not giving expected output. Vehicle is getting collided with other. Below snap is configuration for your reference. Please do let me know if any other information required.
please provide all input files for reproducing your problem (attach them as a zip archive here)
Hi, Please do have a look at the sample files that are being shared for your reference DLR_Sample.zip
The problem comes from
if step > 100:
traci.vehicle.moveToXY("Car", edgeID='E0', lane=0, x=260, y=-1.6)
The vehicle 'Car' is moved (to the same spot) in every step after stop 100. While the other cars expect it to drive at a speed of 25m/s (and this is what it would naturally do), it is practically "beamed" backwards to the same spot. each step.
If you want the car to keep staying in place, then issuing a setSpeed('Car', 0) fixes the problem (calling setStop
would be even better). Otherwise reconsider the condition for calling moveToXY.
Thank you for your response, but if we have list of position that need to be updated at regular interval of time then, moveToXY need to be used. In that case the remaining vehicles will collide and pass over each other. Is it possible with any other means to avoid the collision or is there any alternate method. Please do let me know Thanks in Advance
The problem occurs only if you use setSpeed
(25m/s) with a value that doesn't match the speeds implicit in the moveToXY command (0m/s). Don't use setSpeed or use better values and you'll be fine.
Hi, I have tried to use traci to control the speed of the vehicle with traci.vehicle.setspeed. Due to this vehicle is getting collided with other vehicles. Is there any way where vehicle can avoid collision by detecting the vehicle ahead and make necessary lane changes or apply brake. please do let me know any possible solution
SUMO-version: SUMO - V 1-19 operating system: Windows 11