I want to have my ego car to drive at speed = 20 for the first 3 seconds, brake for 6 seconds and then again drive at speed = 50 for 4 seconds (using the Metadrive simulator)
I know I can specify the ego car behavior with commands like
behavior EgoBehavior(speed=20):
do FollowLaneBehavior(speed) for 2 seconds
but I am not sure how I can make it brake when I want to (possibly do something like: doSetBrakeAction(BRAKE_ACTION) for 3 seconds).