Need Clarity: lateral() modifier and absence of lateral() modifier
Need Clarity: lateral() modifier and absence of lateral() modifier
Given the following example: EXAMPLE 1:
v1: vehicle
do parallel:
v1.drive() with:
along(route1)
speed(45kph, at: start)
v1_lat: serial:
wait(elapsed(20sec))
v1.drive(duration: 2sec) with:
lateral(-1.5m, at: end)
wait(elapsed(40sec))
What happens to the lateral position at the end of the 2 seconds? Does the vehicle snap back to the center?
Assumption: The lateral() modifier springs back to center after the lateral() modifier is completed; at least this is the current assumption.
EXAMPLE 2:
v1: vehicle
lateral_distance_default: length = 0m
do parallel:
v1.drive() with:
along(route1)
speed(45kph, at: start)
lateral(lateral_distance_default, at: all)
v1_lat: serial:
wait(elapsed(20sec))
v1.drive(duration: 2sec) with:
lateral(-1.5m, at: end)
wait(elapsed(40sec))
What happens to the lateral position at the end of the 2 seconds? Does the vehicle snap back to the center?
Assumption: The lateral() modifier springs back to center after the lateral() modifier is completed; at least this is the current assumption.
Is this what is required to maintain a lateral bias?:
EXAMPLE 3:
v1: vehicle
do parallel:
v1.drive() with:
along(route1)
speed(45kph, at: start)
v1_lat: serial:
wait(elapsed(20sec))
v1.drive(duration: 2sec) with: # achieve a lateral bias within 2 seconds
lateral(-1.5m, at: end)
v1.drive(duration: 40sec) with: # keep lateral bias for 40 seconds
lateral(-1.5m, at: all)