Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] vehicle set speed issue

Thanks for your reply.
No, even setPreviousSpeed is not updating the speed. I think this is because myState.mySpeed is getting updated only in executeMove() and there is no other API which updates myState.mySpeed including step().


On Mon, May 15, 2023 at 5:21 PM Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
To set the speed after calling executeMove, use the function vehicle.setPreviousSpeed

Am Mo., 15. Mai 2023 um 13:39 Uhr schrieb Mahima <mahima13@xxxxxxxxx>:
Hi Jakob,

I guess this is the issue related to excuteMove(). If we call executeMove(), then we move the vehicle and update the speed of the vehicle after this using setSpeedMode(veh, 32) and slowDown() and we finally call step().
Here, the speedTimeline is not getting updated to myState.mySpeed for the current step. This is the reason that getSpeed() is giving old speed before calling slowDown.

On the older branch when executeMove() was not there...I was able to change speed in the current step.


Thanks,
Mahima

On Fri, May 12, 2023 at 1:56 PM Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
In my test, the vehicle changes speed instantly (i.e. also in the departure step). The speed limit isn't even relevant since the speedMode makes the vehicle ignore limits).
Feel free to provide a minimal failure example, preferably as a python script or python traci command log.

Am Fr., 12. Mai 2023 um 09:44 Uhr schrieb Mahima <mahima13@xxxxxxxxx>:
Hi Sumo team,

Any inputs from your side?

Thanks

On Thu, 11 May 2023, 13:50 Mahima, <mahima13@xxxxxxxxx> wrote:
Hi,

I am adding a vehicle on a lane with max depart speed (max speed of this lane is 16.67).

Now, in the same timestep I am moving this vehicle to the next lane (max speed of this lane is 27.78). I want to change the speed of this vehicle to 22.27.
But, when I check the fcd file, the position and lane changes as per the moveTo but speed remains 16.67 only. Please suggest why the speed is not going beyond the depart speed in this timestep and how I can achieve this. Thanks

I am using the following steps:

libsumo::Vehicle::setSpeedMode(2, 32);
libsumo::Vehicle::slowDown(2, 22.27, 0);
libsumo::Vehicle::moveTo(2, lane_id, lane_pos);


_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top