Recovery from stopping trajectory while in motion
Techniques are described herein for safely transitioning a vehicle from a first trajectory to a second trajectory. In response to a safety event, for example, a vehicle may switch from being controlled in accordance with a nominal planner output (a planned trajectory) to a safety, or stopping, trajectory. In some examples, in response to the vehicle overcoming the safety event, a safe and smooth return to a nominal planning system output trajectory (an updated planned trajectory) may be determined and used to cause the vehicle to continue along to a previously determined destination.
1 . A method comprising:
detecting a safety event associated with a vehicle operating in an environment while traversing a first trajectory;
determining, based on the first trajectory and the safety event, a second trajectory associated with the vehicle, the second trajectory configured to bring the vehicle to a stop;
controlling the vehicle based on the second trajectory;
determining, based on a state associated with the vehicle following the second trajectory, a third trajectory associated with the vehicle, the third trajectory configured to prevent the vehicle from coming to a stop according to the second trajectory;
determining that the safety event no longer exists or is no longer relevant; and
controlling the vehicle based at least in part on the third trajectory.
2 . The method according to claim 1 , wherein the third trajectory is determined to be continuous with the second trajectory.
3 . The method according to claim 1 , wherein controlling the vehicle based at least in part on the third trajectory comprises determining a threshold amount of time has passed since controlling the vehicle in accordance with the second trajectory.
4 . The method according to claim 1 , wherein determining the third trajectory comprises projecting the state onto the second trajectory at a future time.
5 . The method according to claim 4 , wherein the future time is determined based at least in part on one or more of:
a first time interval associated with calculating trajectories, or
a second time interval associated with an actuation delay corresponding to a vehicle component associated with controlling the vehicle.
6 . The method according to claim 1 , comprising:
determining, based at least in part on the second trajectory, a fourth trajectory associated with the vehicle, the fourth trajectory configured to prevent the vehicle from coming to a stop according to the second trajectory; and
determining that at least one of:
the safety event is still present, or
that the fourth trajectory is not continuous with the second trajectory.
7 . The method according to claim 1 , wherein the first and third trajectories are generated by a first computing system and the second trajectory is generated by a second computing system.
8 . The method according to claim 1 , wherein detecting the safety event comprises a determination that the vehicle meets or exceeds a threshold probability of a collision with an object in the environment and wherein the second trajectory is configured to avoid the object.
9 . The method according to claim 1 , comprising:
determining a vehicle state associated with the second trajectory;
determining a projected speed of the vehicle by mapping the speed of the vehicle onto the second trajectory; and
determining, based on the projected speed, an estimated state of the vehicle at a future time,
wherein determining the third trajectory is further based on the estimated state of the vehicle at the future time.
10 . One or more non-transitory computer-readable media storing instructions that, when executed, cause one or more processors to perform operations comprising:
detecting a safety event associated with a vehicle operating in an environment while traversing a first trajectory;
determining, based on the first trajectory and the safety event, a second trajectory associated with the vehicle, the second trajectory configured to bring the vehicle to a stop;
controlling the vehicle based on the second trajectory;
determining, based on a speed associated with the second trajectory, a third trajectory associated with the vehicle, the third trajectory configured to prevent the vehicle from coming to a stop according to the second trajectory;
determining that the safety event no longer exists or is no longer relevant; and
controlling the vehicle based at least in part on the third trajectory.
11 . The one or more non-transitory computer-readable media according to claim 10 , storing instructions that, when executed, cause one or more processors to perform further operations comprising:
determining a state of the vehicle associated with the second trajectory;
determining a projected state of the vehicle by mapping the state of the vehicle onto the second trajectory; and
determining, based on the projected state, an estimated state of the vehicle at a future time,
wherein determining the third trajectory is further based on the estimated state of the vehicle at the future time.
12 . The one or more non-transitory computer-readable media according to claim 10 , wherein the third trajectory is determined to be continuous with the second trajectory.
13 . The one or more non-transitory computer-readable media according to claim 10 , wherein controlling the vehicle based at least in part on the third trajectory comprises determining a threshold amount of time has passed since controlling the vehicle in accordance with the second trajectory.
14 . The one or more non-transitory computer-readable media according to claim 11 , wherein a time interval between determining the state of the vehicle and the future time comprises a first amount of time based at least in part on hardware associated with controlling the vehicle and a second amount of time based at least in part on software associated with controlling the vehicle.