In your code you are giving the command changeSublane repeatedly and each call causes the vehicle to move further to the left. Eventually it ends up on the left side of the left lane. Instead, you could just call changeSublane(vehh_id, 1.6) once. To make the vehicle stay in the center you should follow up with setLateralAlignment(veh_id, "arbitrary"). Otherwise it will try to return to the default alignment in the middle of the lane.
regards, Jakob Am Di., 26. Mai 2020 um 18:45 Uhr schrieb Reza <haghani....@gmail.com>: > Thanks. I gave the "changeSublane" command different values to make > vehicles > change their lane and move from right lane to drive between two lanes. > However, all of them made vehicles move laterally from right lane to the > left side of left lane. Just, when I put the value of 0.03 in > "changeSublane" command, it worked according to my intention. I was > wondering to know how it works and why the value of 0.03 makes vehicles to > drive between two lanes. Please find attached the codes. > > 4-Sublane_model.rar > < > http://sumo-user-mailing-list.90755.n8.nabble.com/file/t374/4-Sublane_model.rar> > > > Kind regards, > Reza. > > > > -- > Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/ > _______________________________________________ > sumo-user mailing list > sumo-user@eclipse.org > To unsubscribe from this list, visit > https://www.eclipse.org/mailman/listinfo/sumo-user >
_______________________________________________ sumo-user mailing list sumo-user@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user