Patent Description:
<CIT> relates to 'End-to-end interpretable motion planner for autonomous vehicles'. <CIT> relates to 'Motion planning for autonomous vehicles and reconfigurable motion planning processors'.

In addition, the embodiments disclosed herein are only examples, and the scope of this disclosure is not limited to them. Particular embodiments may include all, some, or none of the components, elements, features, functions, operations, or steps of the embodiments disclosed above. Embodiments according to the invention are in particular disclosed in the attached claims directed to a method, a storage medium, a system and a computer program product, wherein any feature mentioned in one claim category, e.g., method, can be claimed in another claim category, e.g., system, as well. The dependencies or references back in the attached claims are chosen for formal reasons only.

Vehicle-trajectory planning may be one basis for autonomous driving. As an example and not by way of limitation, every once a while, a computing system may need to determine the best trajectory forward for the next few seconds for an autonomous vehicle. For example, the computing system may determine if the vehicle should accelerate, go straight, or take a slight turn. <FIG> illustrate different scenarios where a planned trajectory needs to be determined for an autonomous vehicle. <FIG> illustrates an example trajectory determination for a vehicle following a cargo truck. The vehicle <NUM> may be driving on a road <NUM> with two lanes, i.e., right lane <NUM> and left lane <NUM>. The vehicle <NUM> may be following the cargo truck <NUM> on the left lane <NUM>. The computing system may need to determine if the vehicle <NUM> should keep following the cargo truck <NUM> or change to the right lane <NUM>, which is indicated by two potential trajectories, i.e., trajectory <NUM> and trajectory <NUM>, respectively. <FIG> illustrates an example trajectory determination for a vehicle driving beside a bike lane. The vehicle <NUM> may be driving in a lane <NUM> adjacent to a bike lane <NUM>. In the bike lane <NUM> there may be a cyclist <NUM>. The vehicle <NUM> may be approaching the cyclist <NUM> from behind. As such, the computing system may need to determine if the vehicle <NUM> should keep driving straight or slightly to the left and then back to the middle of the lane to avoid hitting the cyclist, which is indicated by two potential trajectories, i.e., trajectory <NUM> and trajectory <NUM>, respectively. <FIG> illustrates an example trajectory determination for a vehicle making a turn at an intersection. The vehicle <NUM> may need to make a left turn from lane <NUM> while there is another vehicle <NUM> beside the vehicle <NUM> that is also making a left turn from lane <NUM>. A potential trajectory for vehicle <NUM> may be trajectory <NUM>. The computing system may need to determine if to turn left using a trajectory <NUM> that ends in the middle of the lane <NUM> or a trajectory <NUM> that ends close to the lane divider <NUM>. <FIG> illustrates an example trajectory determination for a vehicle approaching a stop sign. The computing system may need to determine if the vehicle <NUM> should approach the stop sign <NUM> with a steady velocity, e.g., <NUM> miles/hour or with a gradually reduced velocity, e.g., <NUM> miles/hour then <NUM> miles/hour and then <NUM> miles/hour. These two options may be illustrated by trajectory <NUM> and trajectory <NUM>, respectively. For the scenarios in <FIG>, the computing system may determine the planned trajectory by optimizing a set of different costs evaluated by different factors. As an example and not by way of limitation, the cost of the vehicle <NUM> hitting other agents may be extremely high. As another example and not by way of limitation, the cost for crossing lane boundaries may be very high. As yet another example and not by way of limitation, the cost of the vehicle <NUM> driving with a high lateral acceleration or high lateral jerk may be also high because that would make it uncomfortable for passengers in the vehicle <NUM>. Therefore, it is important to accurately determine the cost for each potential trajectory and select the planned trajectory based on the cost.

Determining the cost for a potential trajectory may be based on a set of hand-engineered costs determined based on movement restrictions of the vehicle <NUM>. As an example and not by way of limitation, one of the costs may be based on a penalized jerk. A penalized jerk may be the sum of all the jerks along the trajectory being penalized with some weight. Accordingly, a trajectory that minimizes all these different costs may be determined as a planned trajectory the vehicle <NUM> should take going forward. Based on the hand-engineered costs, a cost volume may be generated. A cost volume, which may be based on space and time, may provide cost information associated with each location associated with the potential trajectory under different time. Instead of using hand-engineered costs, a cost volume may be directly learned from observed driving behavior by machine-learning models. With cost volumes, the computing system may look up the cost associated with each potential trajectory in the cost volume occasionally, e.g., after every <NUM> centimeters of driving, and then select the best trajectory based on the cost.

Using hand-engineered costs to generate cost volumes may have limitations. Firstly, the cost volumes generated from hand-engineered costs may not effectively handle how a vehicle <NUM> should interact with other agents on non-edge cases. A non-edge case may be related to elegance, e.g., how to smoothly pass an agent. For instance, should a vehicle <NUM> slow down a little bit before it passes a cyclist <NUM> or should the vehicle <NUM> go faster, and what is the exact distance should the vehicle <NUM> keep from the cyclist <NUM>? Secondly, determining hand-engineered costs may be hard to scale as there may be a vast number of driving scenarios. Thirdly, hand-engineered costs may require expert knowledge on the problem domain and may be timeconsuming. Lastly, designing hand-engineered costs may be limited by the complexity that humans can put in it. Using machine-learning models to learn cost volumes may be useful for addressing the limitations of hand-engineered costs by learning from observed driving behavior. However, relying only on observed driving behavior may also have limitations. Firstly, there may be no interpretability for the learned machine learning models. Secondly, as the cost volume is generated based on observed driving behavior only, the cost volume may be only as complete as the data provided. As an example and not by way of limitation, if the observed driving behavior lacks certain scenarios, the cost volume may not adequately reflect the cost of such scenarios. Thirdly, it may be inflexible as it is difficult to define costs since everything is learned from the observed driving behavior. As a result, if one wants to use some movement restrictions that are not necessarily reflected in the observed driving behavior when calculating costs, it may be necessary to generate data incorporating these movement restrictions via simulation or manual runs, which may be expensive and hard to scale. Lastly, sometimes one may not want to learn from bad driving practice (e.g., maybe the observed driving behavior includes too much tailgating).

To address the shortcomings of both the two aforementioned approaches for generating cost volumes, the embodiments disclosed herein generate a cost volume based on not only observed driving behavior but also hand-engineered costs and determine a cost for a trajectory accordingly. Integrating hand-engineered costs and observed driving behavior may bring in advantages from both worlds. The embodiments disclosed herein may incorporate a plurality of hand-engineered costs into the learning of a machine-learning model. In particular embodiments, the computing system may determine an initial cost volume associated with a plurality of potential trajectories of a vehicle <NUM> in an environment based on a set of movement restrictions of the vehicle <NUM>. The computing system may then generate a delta cost volume using the initial cost volume and environment data associated with the environment. In particular embodiments, the delta cost volume may be generated by determining adjustments to the initial cost volume that incorporate observed driving behavior. The computing system may further score a trajectory of the plurality of potential trajectories for the vehicle <NUM> based on the initial cost volume and the delta cost volume.

<FIG> illustrates an example cost evaluation. The cost evaluation may be for a vehicle <NUM> driving in a lane. The vehicle <NUM> may be denoted by a black dot <NUM>. The lateral direction may indicate the direction with respect to the lane boundaries. As illustrated in <FIG>, the further the vehicle <NUM> deviates from the center <NUM> of the lane, the higher the cost is. <FIG> may indicate that a preferred trajectory <NUM> for the vehicle <NUM> may be going towards the center <NUM> as the cost will gradually reduce.

<FIG> illustrates an example difference between an initial cost volume and a finalized cost volume. As indicated in <FIG>, a cost volume <NUM> may be visualized as a three-dimensional volume based on space (denoted by x- and y- axis) and time (denoted by t-axis). The cost volume <NUM> may comprise cost measurements at a plurality of locations along each potential trajectory associated with a plurality of timestamps (e.g., t<NUM> and t<NUM>). In particular embodiments, the initial cost volume may comprise initial cost measurements at a plurality of locations along each of the plurality of potential trajectories associated with a plurality of timestamps. The initial cost volume may be embodied into a three-dimensional lookup table having cells that are encoded with the initial cost measurement values. As an example and not by way of limitation, a slice <NUM> of the initial cost volume at t<NUM> may have some cost measurement values at different locations according to x-y axis. As another example and not by way of limitation, a slice <NUM> of the initial cost volume at t<NUM> may have some cost measurement values at different locations according to x-y axis.

In particular embodiments, the computing system may generate a finalized cost volume based on a summation of the initial cost volume and the delta cost volume. The finalized cost volume may comprise finalized cost measurements at the plurality of locations associated with the plurality of timestamps. Each finalized cost measurement may comprise an adjustment to an initial cost measurement. In particular embodiments, the computing system may determine that the delta cost volume ensures each finalized cost measurement of the finalized cost volume is greater than a threshold measurement. Similarly, the computing system may embody the finalized cost volume into a three-dimensional lookup table having cells that are encoded with the finalized cost measurement values. As an example and not by way of limitation, a slice <NUM> of the finalized cost volume at t<NUM> may have some cost measurement values at different locations according to x-y axis. By comparing the slice <NUM> with the slice <NUM>, one may see that these cost measurement values are adjusted from those in the initial cost volume at corresponding locations. For example, for a location <NUM> at t<NUM>, the initial cost measurement value may be <NUM> according to slice <NUM> whereas the finalized cost measurement value may be <NUM> according to slice <NUM> because of an adjustment of -<NUM>. As another example and not by way of limitation, a slice <NUM> of the finalized cost volume at t<NUM> may have some cost measurement values at different locations according to x-y axis. By comparing the slice <NUM> with the slice <NUM>, one may see that these cost measurement values are also adjusted from those in the initial cost volume at corresponding locations. For example, for a location <NUM> at t1, the initial cost measurement value may be <NUM> according to slice <NUM> whereas the finalized cost measurement value may be <NUM> according to slice <NUM> because of an adjustment of <NUM>. In particular embodiments, a cost measurement associated with the initial cost volume or finalized cost volume may be based on one or more of a positional cost, a velocity cost, a cost based on steering angle, an acceleration cost, a jerk cost, any suitable cost, or any suitable combination thereof. The velocity cost, cost based on steering angle, acceleration cost, or jerk cost are hand-engineered. As an example and not by way of limitation, for location <NUM> at t0, the positional cost may indicate the cost of a vehicle being at this position at this time whereas the velocity cost may indicate the cost of the vehicle being at this position at this time driving with a particular velocity.

<FIG> illustrates an example architecture of generating a finalized cost volume. As indicated in <FIG>, an initial cost volume <NUM> may be determined for a vehicle <NUM> in an environment based on a set of movement restrictions of the vehicle <NUM>. As an example and not by way of limitation, the set of movement restrictions may comprise a restriction that the vehicle <NUM> should keep a distance to the lane boundaries. As another example and not by way of limitation, the set of movement restrictions may comprise a restriction that the vehicle <NUM> should not get too close to other agents. As yet another example and not by way of limitation, the set of movement restrictions may comprise a restriction that there should be no high jerk or high acceleration.

In particular embodiments, the computing system may access environment data <NUM> associated with the environment. The computing system may generate the environment data <NUM> by rasterizing one or more top-down images of the vehicle <NUM> and agents around the vehicle <NUM> in the environment. Accordingly, the environment data <NUM> may comprise information comprising one or more of distances between the vehicle <NUM> and the agents, lane boundaries associated with the driving environment, velocities of the vehicle <NUM> and the agents, driving directions of the vehicle <NUM> and the agents, yield relationships between the vehicle <NUM> and the agents, locations of the vehicle <NUM> and the agents, and the like.

In particular embodiments, the computing system determines the adjustments to the initial cost volume <NUM> that incorporate observed driving behavior based on a machine-learning model. The machine-learning model is trained based on observed driving data (e.g., real-world road missions, simulation, etc.), thereby allowing it to be able to incorporate observed driving behavior when determining the adjustments. In particular embodiments, the machine-learning model may be based on convolutional neural networks (CNN) <NUM>. The CNN <NUM> may further determine the adjustments, i.e., delta cost volume <NUM> as illustrated in <FIG> based on both the initial cost volume <NUM> and the environment data <NUM>. The computing system may then integrate the delta cost volume <NUM> and the initial cost volume <NUM> to generate the finalized cost volume <NUM>.

Taking the scenario in <FIG> as an example, generating the finalized cost volume <NUM> as illustrated in <FIG> may be explained intuitively as follows. The movement restrictions may require that the vehicle <NUM> should not go over the lane boundaries. Accordingly, the initial cost volume <NUM> may have a high cost for the trajectory going over the left lane boundary of lane <NUM>. In the environment data <NUM> there may be the vehicle <NUM>, other agents (including the cyclist <NUM>), and encoded lane boundaries. The CNN <NUM> may learn all such information from the environment data <NUM>. For the scenario of passing by a cyclist <NUM>, human drivers may often drive away from the cyclist <NUM>, pass by the cyclist <NUM> which may be slightly going over the left lane boundary, and then drive back into the lane <NUM>. The CNN <NUM> may learn such behavior indicating that the vehicle <NUM> should pass the cyclist <NUM> relatively far away even if it is slightly over the left lane boundary. As a result, one may want to lower the cost from the initial cost volume <NUM> a bit for going over the left boundary because that may allow the vehicle <NUM> to efficiently pass by the cyclist <NUM> with perceived safety and elegance. For such purpose, the CNN <NUM> may determine adjustments to the initial cost volume <NUM>, i.e., a delta cost volume <NUM>. By combining the delta cost volume <NUM> with the initial cost volume <NUM>, the computing system may generate the finalized cost volume <NUM> that decreases the cost for the trajectory <NUM> going over the left boundary but increases the cost for the trajectory <NUM> close to the cyclist <NUM>. Therefore, such trajectory may get as close as possible to a human driving trajectory.

In particular embodiments, the computing system may train the machine-learning model based on a plurality of training data indicative of the observed driving behavior. The plurality of training data indicative of observed driving behavior may comprise captured sensor data comprising images, videos, LiDAR point clouds, radar signals, or any combination thereof. The training process may be illustrated by the following example. The computing system may generate a plurality of trajectories for a certain driving environment. On the other hand, there may be a predetermined trajectory, e.g., a human driving trajectory associated with the environment that is considered as the best trajectory. The machine-learning model may comprise a delta cost function. Based on the initial cost volume <NUM> and the training data, the computing system may determine a predicted delta cost volume <NUM> using the machine-learning model. The computing system may then select a trajectory from the plurality of trajectories based on the initial cost volume <NUM> and the predicted delta cost volume <NUM>. Specifically, this may comprise applying the predicted delta cost volume <NUM> to the initial cost volume <NUM> to generate a temporary finalized cost volume <NUM>. Using the temporary finalized cost volume <NUM>, the computing system may figure out which is the best trajectory, i.e., the one having the lowest cost. The computing system may then compare the selected trajectory with the predetermined trajectory to calculate a difference. The computing system may further update the machine-learning model based on the comparison. The difference may be back propagated to the machine-learning model to optimize it. As an example and not by way of limitation, the difference may be fed into the delta cost function, which may output a loss. The computing system may then determine if the loss is minimized, which may be based on several iterations. For example, in the t-th iteration, the loss may be compared with the loss in the previous (t-<NUM>)-th iteration. If the loss in the t-th iteration is greater than the loss in the (t-<NUM>)-th iteration, the computing system may update the parameters of the machine-learning model. The training may continue to the (t+<NUM>)-th iteration. In the (t+<NUM>)-th iteration, the computing system may update the predicted delta cost volume <NUM> using the updated machine-learning model, re-select a trajectory based on the initial cost volume <NUM> and the updated predicted delta cost volume <NUM>, calculate the difference between the re-selected trajectory and the predetermined trajectory, output a loss based on the difference, and compare the loss with the loss in the t-th iteration. If the loss in the (t+<NUM>)-th iteration is smaller than or equal to the loss in the t-th iteration, the computing system may end the training with the machine-learning model as optimized. If the loss in the (t+<NUM>)-th iteration is still greater than the loss in the t-th iteration, the training process may proceed with additional iterations until the loss is minimized.

<FIG> illustrate example cost comparisons between two trajectories using the initial cost volume <NUM> for the scenarios in <FIG>. x-axis indicates the lateral direction, y-axis indicates the vertical direction, and t indicates time. <FIG> illustrates an example cost comparison between two trajectories using the initial cost volume <NUM> for the scenario in <FIG>. Time t<NUM> may be the starting point where the computing system needs to determine a cost for each potential trajectory. Therefore, both trajectory <NUM> and trajectory <NUM> may be at the same location and their cost may be both <NUM>. As an example and not by way of limitation, the computing system may check a lookup table similar to the slice <NUM> in <FIG>. The computing system may identify the location for both trajectories and then get the initial cost measurement for that location. At time t<NUM>, trajectory <NUM> may keep straight whereas trajectory <NUM> may be moving towards the right to change to lane <NUM>. According to the initial cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be <NUM> (i.e., the cost is high during the process of lane changing). As an example and not by way of limitation, the computing system may check a lookup table similar to the slice <NUM> in <FIG>. The computing system may identify the locations for both trajectories and then get the initial cost measurements for the respective locations of the two trajectories. At time t<NUM>, trajectory <NUM> may still keep straight whereas trajectory <NUM> may be completing the lane change. According to the initial cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be also <NUM> (the lane change is completed and the vehicle <NUM> is again in the middle of a lane <NUM> so the cost decreases). The comparison may be a result from the initial cost volume <NUM> being generated based on movement restrictions that a vehicle <NUM> should try to stay in lane and avoid lane changing.

<FIG> illustrates an example cost comparison between two trajectories using the initial cost volume <NUM> for the scenario in <FIG>. Time t<NUM> may be the starting point where the computing system needs to determine a cost for each potential trajectory for passing by a cyclist <NUM>. Therefore, both trajectory <NUM> and trajectory <NUM> may be at the same location and their cost may be both <NUM>. At time t<NUM>, trajectory <NUM> may keep straight whereas trajectory <NUM> may be moving towards the left even a bit over the left boundary. According to the initial cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be <NUM> (i.e., the cost is high because the vehicle <NUM> passes the left lane boundary). At time t<NUM>, trajectory <NUM> may still keep straight whereas trajectory <NUM> may be moving towards the right going back to the middle of the lane <NUM>. According to the initial cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be <NUM> (the vehicle <NUM> is again within the lane boundaries so the cost decreases). Note that both costs may decrease, which may be because of the vehicle <NUM> having passed by the cyclist <NUM>. The comparison may be a result from the initial cost volume <NUM> being generated based on movement restrictions that a vehicle <NUM> should try to stay in lane and should not cross lane boundaries.

<FIG> illustrates an example cost comparison between two trajectories using the initial cost volume <NUM> for the scenario in <FIG>. Time t<NUM> may be the starting point where the computing system needs to determine a cost for each potential trajectory for making a left turn. Therefore, both trajectory <NUM> and trajectory <NUM> may be at the same location and their cost may be both <NUM>. At time t<NUM>, according to the initial cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be <NUM>. At time t<NUM>, trajectory <NUM> may end up at the middle of the lane <NUM> whereas trajectory <NUM> may end up closer to the lane divider <NUM>. According to the initial cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be <NUM>. The comparison may be a result from the initial cost volume <NUM> being generated based on movement restrictions that when making a left turn, a vehicle <NUM> should try to end up in the middle of the target lane. The movement restrictions may overlook the situation that there is another vehicle <NUM> also turning left and its potential trajectory <NUM> may pose a certain degree of risk for vehicle <NUM>.

<FIG> illustrates an example cost comparison between two trajectories using the initial cost volume <NUM> for the scenario in <FIG>. Time t<NUM> may be the starting point where the computing system needs to determine a cost for each potential trajectory for approaching a stop sign <NUM>. Therefore, both trajectory <NUM> and trajectory <NUM> may be at the same location and their cost may be both <NUM>. At time t<NUM>, trajectory <NUM> may reduce the velocity whereas trajectory <NUM> may keep the original velocity. According to the initial cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be <NUM>. At time t<NUM>, trajectory <NUM> may continue reducing the velocity whereas trajectory <NUM> may continue with the original velocity. According to the initial cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be <NUM>. The comparison may be a result from the initial cost volume <NUM> being generated based on movement restrictions that a vehicle <NUM> should start slowing down earlier in time when approaching the stop sign <NUM>. The initial cost volume <NUM> may penalize approaching the stop sign <NUM> too fast.

<FIG> illustrate example cost comparisons between two trajectories using the finalized cost volume <NUM> for the scenarios in <FIG>. x-axis indicates the lateral direction, y-axis indicates the vertical direction, and t indicates time. <FIG> illustrates an example cost comparison between two trajectories using the finalized cost volume <NUM> for the scenario in <FIG>. Time t<NUM> may be the starting point where the computing system needs to determine a cost for each potential trajectory. Therefore, both trajectory <NUM> and trajectory <NUM> may be at the same location and their cost may be both <NUM>. As an example and not by way of limitation, the computing system may check a lookup table similar to the slice <NUM> in <FIG>. The computing system may identify the location for both trajectories and then get the finalized cost measurement for that location. At time t<NUM>, trajectory <NUM> may keep straight whereas trajectory <NUM> may be moving towards the right to change to lane <NUM>. According to the differential cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be <NUM>. As an example and not by way of limitation, the computing system may check a lookup table similar to the slice <NUM> in <FIG>. The computing system may identify the locations for both trajectories and then get the finalized cost measurements for the respective locations of the two trajectories. The cost of trajectory <NUM> being lower than that of trajectory <NUM> may be due to the adjustments to the initial cost volume <NUM> encouraging changing lane when following a cargo truck <NUM>. Such adjustments may be learned from observed driving behavior which indicates that human drivers usually avoid following cargo trucks <NUM> closely and make lane changes to have a better field of view. At time t<NUM>, trajectory <NUM> may still keep straight whereas trajectory <NUM> may be moving towards the right to change to lane <NUM>. According to the finalized cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be <NUM>. This may be due to the adjustments to the initial cost volume <NUM> to reduce the cost for changing a lane when following a cargo truck <NUM>. The finalized cost volume <NUM> may be generated based on both initial cost volume <NUM> and observed driving behavior, thereby having the advantage of guaranteeing safety as well as elegance.

<FIG> illustrates an example cost comparison between two trajectories using the finalized cost volume <NUM> for the scenario in <FIG>. Time t<NUM> may be the starting point where the computing system needs to determine a cost for each potential trajectory for passing by a cyclist <NUM>. Therefore, both trajectory <NUM> and trajectory <NUM> may be at the same location and their cost may be both <NUM>. At time t<NUM>, trajectory <NUM> may keep straight whereas trajectory <NUM> may be moving towards the left even a bit over the left boundary. According to the finalized cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be <NUM>. This may be due to the adjustments to the initial cost volume <NUM> encouraging the vehicle <NUM> to get further away from a cyclist <NUM> even if crossing over a lane boundary. The adjustments to the initial cost volume <NUM> may also penalize the vehicle <NUM> being too close to the cyclist <NUM>. Such adjustments may be similarly learned from observed driving behavior. At time t<NUM>, trajectory <NUM> may still keep straight whereas trajectory <NUM> may be moving towards the right going back to the middle of the lane <NUM>. According to the finalized cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be <NUM>. The finalized cost volume <NUM> may be generated based on both initial cost volume <NUM> and observed driving behavior, thereby having the advantage of guaranteeing safety as well as elegance.

<FIG> illustrates an example cost comparison between two trajectories using the finalized cost volume <NUM> for the scenario in <FIG>. Time t<NUM> may be the starting point where the computing system needs to determine a cost for each potential trajectory for making a left turn. Therefore, both trajectory <NUM> and trajectory <NUM> may be at the same location and their cost may be both <NUM>. At time t<NUM>, according to the finalized cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be <NUM>. At time t<NUM>, trajectory <NUM> may end up at the middle of the lane <NUM> whereas trajectory <NUM> may end up closer to the lane divider <NUM>. According to the finalized cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be <NUM>. The comparison may indicate that the adjustments to the initial cost volume <NUM> encourage the vehicle <NUM> to get further away from another vehicle <NUM> that is also turning left. The adjustments to the initial cost volume <NUM> may also penalize the vehicle <NUM> being close to the other vehicle <NUM> turning left. Such adjustments may be similarly learned from observed driving behavior since humans may usually keep a considerable distance from another vehicle whenever it is possible given it is safe and does not violate traffic rules to do so. As a result, the finalized cost volume <NUM> may have the advantage of guaranteeing safety as well as elegance.

<FIG> illustrates an example cost comparison between two trajectories using the finalized cost volume <NUM> for the scenario in <FIG>. Time t<NUM> may be the starting point where the computing system needs to determine a cost for each potential trajectory for approaching a stop sign <NUM>. Therefore, both trajectory <NUM> and trajectory <NUM> may be at the same location and their cost may be both <NUM>. At time t<NUM>, trajectory <NUM> may reduce the velocity whereas trajectory <NUM> may keep the original velocity. According to the finalized cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be <NUM>. At time t<NUM>, trajectory <NUM> may continue reducing the velocity whereas trajectory <NUM> may continue with the original velocity. According to the differential cost volume <NUM>, the cost for trajectory <NUM> may be <NUM> and that for trajectory <NUM> may be <NUM>. The comparison may indicate that the adjustments to the initial cost volume <NUM> encourage the vehicle <NUM> to start slowing down earlier in time when approaching the stop sign <NUM>. The adjustments to the initial cost volume <NUM> may further penalize approaching the stop sign <NUM> too fast, which is reflected by the costs of trajectory <NUM> even higher than those from the initial cost volume <NUM>. As can be seen, the finalized cost volume <NUM> may be consistent with the initial cost volume <NUM> regarding evaluating the way of approaching the stop sign <NUM>. This may make sense since approaching the stop sign <NUM> with a gradually reduced velocity may be both specified by movement restrictions and reflected by observed driving behavior (i.e., human drivers often slow down when approaching a stop sign <NUM>).

In particular embodiments, the computing system may score the plurality of remaining potential trajectories for the vehicle <NUM> based on the initial cost volume <NUM> and the delta cost volume <NUM>. In other words, the computing system may score the potential trajectories using the finalized cost volume <NUM>. The lower the cost is, the higher the score may be. In particular embodiments, scoring the trajectory the vehicle <NUM> may comprise determining a cost for the trajectory. The determination may comprise the following steps. The computing system may first identify a plurality of candidate locations associated with a plurality of candidate timestamps for the trajectory from the plurality of locations associated with the plurality of timestamps. The computing system may then determine a plurality of finalized cost measurements corresponding to the plurality of candidate locations associated with the plurality of candidate timestamps for the trajectory. The computing system may further determine the cost for the trajectory based on the plurality of finalized cost measurements. In particular embodiments, the computing system may then rank the plurality of potential trajectories based on their respective scores. The computing system may further, using the respective score, select a top-ranked potential trajectory from the plurality of potential trajectories as a planned trajectory for the vehicle <NUM>. Taking the scenarios in <FIG> as examples, the computing system may determine a planned trajectory as follows. For the scenario in <FIG>, the computing system may use the finalized cost volume <NUM> to score trajectory <NUM> and trajectory <NUM>. The computing system may select trajectory <NUM> as a planned trajectory based on its score being higher than that of trajectory <NUM>, which indicates that the vehicle <NUM> should change the lane to avoid following the cargo truck <NUM>. For the scenario in <FIG>, the computing system may use the finalized cost volume <NUM> to score the trajectory <NUM> and trajectory <NUM>. The computing system may select trajectory <NUM> as a planned trajectory based on its score being higher than that of trajectory <NUM>, which indicates that the vehicle <NUM> should drive further away from the cyclist <NUM> even if it goes over the left boundary slightly. For the scenario in <FIG>, the computing system may use the finalized cost volume <NUM> to score trajectory <NUM> and trajectory <NUM>. The computing system may select trajectory <NUM> as a planned trajectory based on its score being higher than that of trajectory <NUM>, which indicates that the vehicle <NUM> should turn left with as much distance as possible to the other vehicle <NUM> which is also turning left. For the scenario in <FIG>, the computing system may use the finalized cost volume <NUM> to score trajectory <NUM> and trajectory <NUM>. The computing system may select trajectory <NUM> as a planned trajectory based on its score being higher than that of trajectory <NUM>, which indicates that the vehicle <NUM> should start slowing down earlier in time when approaching the stop sign <NUM>.

<FIG> illustrates an example method <NUM> for determining a planned trajectory for a vehicle. The method may begin at step <NUM>, where a computing system may determine an initial cost volume <NUM> associated with a plurality of potential trajectories of a vehicle <NUM> in an environment based on a set of movement restrictions of the vehicle <NUM>. At step <NUM>, the computing system may generate a delta cost volume 408using the initial cost volume <NUM> and environment data <NUM> associated with the environment, wherein the delta cost volume <NUM> is generated by determining adjustments to the initial cost volume <NUM> that incorporate observed driving behavior. At step <NUM>, the computing system may generate a finalized cost volume <NUM> based on a summation of the initial cost volume <NUM> and the delta cost volume <NUM>, wherein the finalized cost volume <NUM> comprises finalized cost measurements. At step <NUM>, the computing system may determine if the delta cost volume <NUM> ensures each finalized cost measurement of the finalized cost volume <NUM> is greater than a threshold measurement. If not all the finalized cost measurements are greater than the threshold measurement, the method may repeat step <NUM> to step <NUM>. If each finalized cost measurement of the finalized cost volume <NUM> is greater than the threshold measurement, the method may proceed to step <NUM>. At step <NUM>, the computing system may score a trajectory of the plurality of potential trajectories for the vehicle <NUM> based on the initial cost volume <NUM> and the delta cost volume <NUM>. At step <NUM>, the computing system may score the plurality of remaining potential trajectories for the vehicle <NUM> based on the initial cost volume <NUM> and the delta cost volume <NUM>. At step <NUM>, the computing system may rank the plurality of potential trajectories based on their respective scores. At step <NUM>, the computing system may, using the respective score, select the top-ranked potential trajectory from the plurality of potential trajectories as a planned trajectory for the vehicle <NUM>. Particular embodiments may repeat one or more steps of the method of <FIG>, where appropriate. Although this disclosure describes and illustrates particular steps of the method of <FIG> as occurring in a particular order, this disclosure contemplates any suitable steps of the method of <FIG> occurring in any suitable order. Moreover, although this disclosure describes and illustrates an example method for determining a planned trajectory for a vehicle including the particular steps of the method of <FIG>, this disclosure contemplates any suitable method for determining a planned trajectory for a vehicle including any suitable steps, which may include all, some, or none of the steps of the method of <FIG>, where appropriate. Furthermore, although this disclosure describes and illustrates particular components, devices, or systems carrying out particular steps of the method of <FIG>, this disclosure contemplates any suitable combination of any suitable components, devices, or systems carrying out any suitable steps of the method of <FIG>.

<FIG> illustrates an example block diagram of a transportation management environment for matching ride requestors with autonomous vehicles. In particular embodiments, the environment may include various computing entities, such as a user computing device <NUM> of a user <NUM> (e.g., a ride provider or requestor), a transportation management system <NUM>, an autonomous vehicle <NUM>, and one or more third-party system <NUM>. The computing entities may be communicatively connected over any suitable network <NUM>. As an example and not by way of limitation, one or more portions of network <NUM> may include an ad hoc network, an extranet, a virtual private network (VPN), a local area network (LAN), a wireless LAN (WLAN), a wide area network (WAN), a wireless WAN (WWAN), a metropolitan area network (MAN), a portion of the Internet, a portion of Public Switched Telephone Network (PSTN), a cellular network, or a combination of any of the above. In particular embodiments, any suitable network arrangement and protocol enabling the computing entities to communicate with each other may be used. Although <FIG> illustrates a single user device <NUM>, a single transportation management system <NUM>, a single vehicle <NUM>, a plurality of third-party systems <NUM>, and a single network <NUM>, this disclosure contemplates any suitable number of each of these entities. As an example and not by way of limitation, the network environment may include multiple users <NUM>, user devices <NUM>, transportation management systems <NUM>, autonomous-vehicles <NUM>, third-party systems <NUM>, and networks <NUM>.

The user device <NUM>, transportation management system <NUM>, autonomous vehicle <NUM>, and third-party system <NUM> may be communicatively connected or co-located with each other in whole or in part. These computing entities may communicate via different transmission technologies and network types. For example, the user device <NUM> and the vehicle <NUM> may communicate with each other via a cable or short-range wireless communication (e.g., Bluetooth, NFC, WI-FI, etc.), and together they may be connected to the Internet via a cellular network that is accessible to either one of the devices (e.g., the user device <NUM> may be a smartphone with LTE connection). The transportation management system <NUM> and third-party system <NUM>, on the other hand, may be connected to the Internet via their respective LAN/WLAN networks and Internet Service Providers (ISP). <FIG> illustrates transmission links <NUM> that connect user device <NUM>, autonomous vehicle <NUM>, transportation management system <NUM>, and third-party system <NUM> to communication network <NUM>. This disclosure contemplates any suitable transmission links <NUM>, including, e.g., wire connections (e.g., USB, Lightning, Digital Subscriber Line (DSL) or Data Over Cable Service Interface Specification (DOCSIS)), wireless connections (e.g., WI-FI, WiMAX, cellular, satellite, NFC, Bluetooth), optical connections (e.g., Synchronous Optical Networking (SONET), Synchronous Digital Hierarchy (SDH)), any other wireless communication technologies, and any combination thereof. In particular embodiments, one or more links <NUM> may connect to one or more networks <NUM>, which may include in part, e.g., ad-hoc network, the Intranet, extranet, VPN, LAN, WLAN, WAN, WWAN, MAN, PSTN, a cellular network, a satellite network, or any combination thereof. The computing entities need not necessarily use the same type of transmission link <NUM>. For example, the user device <NUM> may communicate with the transportation management system via a cellular network and the Internet, but communicate with the autonomous vehicle <NUM> via Bluetooth or a physical wire connection.

In particular embodiments, the transportation management system <NUM> may fulfill ride requests for one or more users <NUM> by dispatching suitable vehicles. The transportation management system <NUM> may receive any number of ride requests from any number of ride requestors <NUM>. In particular embodiments, a ride request from a ride requestor <NUM> may include an identifier that identifies the ride requestor in the system <NUM>. The transportation management system <NUM> may use the identifier to access and store the ride requestor's <NUM> information, in accordance with the requestor's <NUM> privacy settings. The ride requestor's <NUM> information may be stored in one or more data stores (e.g., a relational database system) associated with and accessible to the transportation management system <NUM>. In particular embodiments, ride requestor information may include profile information about a particular ride requestor <NUM>. In particular embodiments, the ride requestor <NUM> may be associated with one or more categories or types, through which the ride requestor <NUM> may be associated with aggregate information about certain ride requestors of those categories or types. Ride information may include, for example, preferred pick-up and drop-off locations, driving preferences (e.g., safety comfort level, preferred speed, rates of acceleration/deceleration, safety distance from other vehicles when travelling at various speeds, route, etc.), entertainment preferences and settings (e.g., preferred music genre or playlist, audio volume, display brightness, etc.), temperature settings, whether conversation with the driver is welcomed, frequent destinations, historical riding patterns (e.g., time of day of travel, starting and ending locations, etc.), preferred language, age, gender, or any other suitable information. In particular embodiments, the transportation management system <NUM> may classify a user <NUM> based on known information about the user <NUM> (e.g., using machine-learning classifiers), and use the classification to retrieve relevant aggregate information associated with that class. For example, the system <NUM> may classify a user <NUM> as a young adult and retrieve relevant aggregate information associated with young adults, such as the type of music generally preferred by young adults.

Transportation management system <NUM> may also store and access ride information. Ride information may include locations related to the ride, traffic data, route options, optimal pick-up or drop-off locations for the ride, or any other suitable information associated with a ride. As an example and not by way of limitation, when the transportation management system <NUM> receives a request to travel from San Francisco International Airport (SFO) to Palo Alto, California, the system <NUM> may access or generate any relevant ride information for this particular ride request. The ride information may include, for example, preferred pick-up locations at SFO; alternate pick-up locations in the event that a pick-up location is incompatible with the ride requestor (e.g., the ride requestor may be disabled and cannot access the pick-up location) or the pick-up location is otherwise unavailable due to construction, traffic congestion, changes in pick-up/drop-off rules, or any other reason; one or more routes to navigate from SFO to Palo Alto; preferred off-ramps for a type of user; or any other suitable information associated with the ride. In particular embodiments, portions of the ride information may be based on historical data associated with historical rides facilitated by the system <NUM>. For example, historical data may include aggregate information generated based on past ride information, which may include any ride information described herein and telemetry data collected by sensors in autonomous vehicles and/or user devices. Historical data may be associated with a particular user (e.g., that particular user's preferences, common routes, etc.), a category/class of users (e.g., based on demographics), and/or all users of the system <NUM>. For example, historical data specific to a single user may include information about past rides that particular user has taken, including the locations at which the user is picked up and dropped off, music the user likes to listen to, traffic information associated with the rides, time of the day the user most often rides, and any other suitable information specific to the user. As another example, historical data associated with a category/class of users may include, e.g., common or popular ride preferences of users in that category/class, such as teenagers preferring pop music, ride requestors who frequently commute to the financial district may prefer to listen to the news, etc. As yet another example, historical data associated with all users may include general usage trends, such as traffic and ride patterns. Using historical data, the system <NUM> in particular embodiments may predict and provide ride suggestions in response to a ride request. In particular embodiments, the system <NUM> may use machine-learning, such as neural networks, regression algorithms, instance-based algorithms (e.g., k-Nearest Neighbor), decision-tree algorithms, Bayesian algorithms, clustering algorithms, association-rule-learning algorithms, deep-learning algorithms, dimensionality-reduction algorithms, ensemble algorithms, and any other suitable machine-learning algorithms known to persons of ordinary skill in the art. The machine-learning models may be trained using any suitable training algorithm, including supervised learning based on labeled training data, unsupervised learning based on unlabeled training data, and/or semisupervised learning based on a mixture of labeled and unlabeled training data.

In particular embodiments, transportation management system <NUM> may include one or more server computers. Each server may be a unitary server or a distributed server spanning multiple computers or multiple datacenters. The servers may be of various types, such as, for example and without limitation, web server, news server, mail server, message server, advertising server, file server, application server, exchange server, database server, proxy server, another server suitable for performing functions or processes described herein, or any combination thereof. In particular embodiments, each server may include hardware, software, or embedded logic components or a combination of two or more such components for carrying out the appropriate functionalities implemented or supported by the server. In particular embodiments, transportation management system <NUM> may include one or more data stores. The data stores may be used to store various types of information, such as ride information, ride requestor information, ride provider information, historical information, third-party information, or any other suitable type of information. In particular embodiments, the information stored in the data stores may be organized according to specific data structures. In particular embodiments, each data store may be a relational, columnar, correlation, or any other suitable type of database system. Although this disclosure describes or illustrates particular types of databases, this disclosure contemplates any suitable types of databases. Particular embodiments may provide interfaces that enable a user device <NUM> (which may belong to a ride requestor or provider), a transportation management system <NUM>, vehicle system <NUM>, or a third-party system <NUM> to process, transform, manage, retrieve, modify, add, or delete the information stored in the data store.

In particular embodiments, transportation management system <NUM> may include an authorization server (or any other suitable component(s)) that allows users <NUM> to opt-in to or opt-out of having their information and actions logged, recorded, or sensed by transportation management system <NUM> or shared with other systems (e.g., third-party systems <NUM>). In particular embodiments, a user <NUM> may opt-in or opt-out by setting appropriate privacy settings. A privacy setting of a user may determine what information associated with the user may be logged, how information associated with the user may be logged, when information associated with the user may be logged, who may log information associated with the user, whom information associated with the user may be shared with, and for what purposes information associated with the user may be logged or shared. Authorization servers may be used to enforce one or more privacy settings of the users <NUM> of transportation management system <NUM> through blocking, data hashing, anonymization, or other suitable techniques as appropriate.

In particular embodiments, third-party system <NUM> may be a network-addressable computing system that may provide HD maps or host GPS maps, customer reviews, music or content, weather information, or any other suitable type of information. Third-party system <NUM> may generate, store, receive, and send relevant data, such as, for example, map data, customer review data from a customer review website, weather data, or any other suitable type of data. Third-party system <NUM> may be accessed by the other computing entities of the network environment either directly or via network <NUM>. For example, user device <NUM> may access the third-party system <NUM> via network <NUM>, or via transportation management system <NUM>. In the latter case, if credentials are required to access the third-party system <NUM>, the user <NUM> may provide such information to the transportation management system <NUM>, which may serve as a proxy for accessing content from the third-party system <NUM>.

In particular embodiments, user device <NUM> may be a mobile computing device such as a smartphone, tablet computer, or laptop computer. User device <NUM> may include one or more processors (e.g., CPU and/or GPU), memory, and storage. An operating system and applications may be installed on the user device <NUM>, such as, e.g., a transportation application associated with the transportation management system <NUM>, applications associated with third-party systems <NUM>, and applications associated with the operating system. User device <NUM> may include functionality for determining its location, direction, or orientation, based on integrated sensors such as GPS, compass, gyroscope, or accelerometer. User device <NUM> may also include wireless transceivers for wireless communication and may support wireless communication protocols such as Bluetooth, near-field communication (NFC), infrared (IR) communication, WI-FI, and/or <NUM>/<NUM>/<NUM>/LTE mobile communication standard. User device <NUM> may also include one or more cameras, scanners, touchscreens, microphones, speakers, and any other suitable input-output devices.

In particular embodiments, the vehicle <NUM> may be an autonomous vehicle and equipped with an array of sensors <NUM>, a navigation system <NUM>, and a ride-service computing device <NUM>. In particular embodiments, a fleet of autonomous vehicles <NUM> may be managed by the transportation management system <NUM>. The fleet of autonomous vehicles <NUM>, in whole or in part, may be owned by the entity associated with the transportation management system <NUM>, or they may be owned by a third-party entity relative to the transportation management system <NUM>. In either case, the transportation management system <NUM> may control the operations of the autonomous vehicles <NUM>, including, e.g., dispatching select vehicles <NUM> to fulfill ride requests, instructing the vehicles <NUM> to perform select operations (e.g., head to a service center or charging/fueling station, pull over, stop immediately, self-diagnose, lock/unlock compartments, change music station, change temperature, and any other suitable operations), and instructing the vehicles <NUM> to enter select operation modes (e.g., operate normally, drive at a reduced speed, drive under the command of human operators, and any other suitable operational modes).

In particular embodiments, the autonomous vehicles <NUM> may receive data from and transmit data to the transportation management system <NUM> and the third-party system <NUM>. Example of received data may include, e.g., instructions, new software or software updates, maps, 3D models, trained or untrained machine-learning models, location information (e.g., location of the ride requestor, the autonomous vehicle <NUM> itself, other autonomous vehicles <NUM>, and target destinations such as service centers), navigation information, traffic information, weather information, entertainment content (e.g., music, video, and news) ride requestor information, ride information, and any other suitable information. Examples of data transmitted from the autonomous vehicle <NUM> may include, e.g., telemetry and sensor data, determinations/decisions based on such data, vehicle condition or state (e.g., battery/fuel level, tire and brake conditions, sensor condition, speed, odometer, etc.), location, navigation data, passenger inputs (e.g., through a user interface in the vehicle <NUM>, passengers may send/receive data to the transportation management system <NUM> and/or third-party system <NUM>), and any other suitable data.

In particular embodiments, autonomous vehicles <NUM> may also communicate with each other as well as other traditional human-driven vehicles, including those managed and not managed by the transportation management system <NUM>. For example, one vehicle <NUM> may communicate with another vehicle data regarding their respective location, condition, status, sensor reading, and any other suitable information. In particular embodiments, vehicle-to-vehicle communication may take place over direct short-range wireless connection (e.g., WI-FI, Bluetooth, NFC) and/or over a network (e.g., the Internet or via the transportation management system <NUM> or third-party system <NUM>).

In particular embodiments, an autonomous vehicle <NUM> may obtain and process sensor/telemetry data. Such data may be captured by any suitable sensors. For example, the vehicle <NUM> may have aa Light Detection and Ranging (LiDAR) sensor array of multiple LiDAR transceivers that are configured to rotate <NUM>°, emitting pulsed laser light and measuring the reflected light from objects surrounding vehicle <NUM>. In particular embodiments, LiDAR transmitting signals may be steered by use of a gated light valve, which may be a MEMs device that directs a light beam using the principle of light diffraction. Such a device may not use a gimbaled mirror to steer light beams in <NUM>° around the autonomous vehicle. Rather, the gated light valve may direct the light beam into one of several optical fibers, which may be arranged such that the light beam may be directed to many discrete positions around the autonomous vehicle. Thus, data may be captured in <NUM>° around the autonomous vehicle, but no rotating parts may be necessary. A LiDAR is an effective sensor for measuring distances to targets, and as such may be used to generate a three-dimensional (3D) model of the external environment of the autonomous vehicle <NUM>. As an example and not by way of limitation, the 3D model may represent the external environment including objects such as other cars, curbs, debris, objects, and pedestrians up to a maximum range of the sensor arrangement (e.g., <NUM>, <NUM>, or <NUM> meters). As another example, the autonomous vehicle <NUM> may have optical cameras pointing in different directions. The cameras may be used for, e.g., recognizing roads, lane markings, street signs, traffic lights, police, other vehicles, and any other visible objects of interest. To enable the vehicle <NUM> to "see" at night, infrared cameras may be installed. In particular embodiments, the vehicle may be equipped with stereo vision for, e.g., spotting hazards such as pedestrians or tree branches on the road. As another example, the vehicle <NUM> may have radars for, e.g., detecting other vehicles and/or hazards afar. Furthermore, the vehicle <NUM> may have ultrasound equipment for, e.g., parking and obstacle detection. In addition to sensors enabling the vehicle <NUM> to detect, measure, and understand the external world around it, the vehicle <NUM> may further be equipped with sensors for detecting and self-diagnosing the vehicle's own state and condition. For example, the vehicle <NUM> may have wheel sensors for, e.g., measuring velocity; global positioning system (GPS) for, e.g., determining the vehicle's current geolocation; and/or inertial measurement units, accelerometers, gyroscopes, and/or odometer systems for movement or motion detection. While the description of these sensors provides particular examples of utility, one of ordinary skill in the art would appreciate that the utilities of the sensors are not limited to those examples. Further, while an example of a utility may be described with respect to a particular type of sensor, it should be appreciated that the utility may be achieved using any combination of sensors. For example, an autonomous vehicle <NUM> may build a 3D model of its surrounding based on data from its LiDAR, radar, sonar, and cameras, along with a pre-generated map obtained from the transportation management system <NUM> or the third-party system <NUM>. Although sensors <NUM> appear in a particular location on autonomous vehicle <NUM> in <FIG>, sensors <NUM> may be located in any suitable location in or on autonomous vehicle <NUM>. Example locations for sensors include the front and rear bumpers, the doors, the front windshield, on the side panel, or any other suitable location.

In particular embodiments, the autonomous vehicle <NUM> may be equipped with a processing unit (e.g., one or more CPUs and GPUs), memory, and storage. The vehicle <NUM> may thus be equipped to perform a variety of computational and processing tasks, including processing the sensor data, extracting useful information, and operating accordingly. For example, based on images captured by its cameras and a machine-vision model, the vehicle <NUM> may identify particular types of objects captured by the images, such as pedestrians, other vehicles, lanes, curbs, and any other objects of interest.

In particular embodiments, the autonomous vehicle <NUM> may have a navigation system <NUM> responsible for safely navigating the autonomous vehicle <NUM>. In particular embodiments, the navigation system <NUM> may take as input any type of sensor data from, e.g., a Global Positioning System (GPS) module, inertial measurement unit (IMU), LiDAR sensors, optical cameras, radio frequency (RF) transceivers, or any other suitable telemetry or sensory mechanisms. The navigation system <NUM> may also utilize, e.g., map data, traffic data, accident reports, weather reports, instructions, target destinations, and any other suitable information to determine navigation routes and particular driving operations (e.g., slowing down, speeding up, stopping, swerving, etc.). In particular embodiments, the navigation system <NUM> may use its determinations to control the vehicle <NUM> to operate in prescribed manners and to guide the autonomous vehicle <NUM> to its destinations without colliding into other objects. Although the physical embodiment of the navigation system <NUM> (e.g., the processing unit) appears in a particular location on autonomous vehicle <NUM> in <FIG>, navigation system <NUM> may be located in any suitable location in or on autonomous vehicle <NUM>. Example locations for navigation system <NUM> include inside the cabin or passenger compartment of autonomous vehicle <NUM>, near the engine/battery, near the front seats, rear seats, or in any other suitable location.

In particular embodiments, the autonomous vehicle <NUM> may be equipped with a ride-service computing device <NUM>, which may be a tablet or any other suitable device installed by transportation management system <NUM> to allow the user to interact with the autonomous vehicle <NUM>, transportation management system <NUM>, other users <NUM>, or third-party systems <NUM>. In particular embodiments, installation of ride-service computing device <NUM> may be accomplished by placing the ride-service computing device <NUM> inside autonomous vehicle <NUM>, and configuring it to communicate with the vehicle <NUM> via a wire or wireless connection (e.g., via Bluetooth). Although <FIG> illustrates a single ride-service computing device <NUM> at a particular location in autonomous vehicle <NUM>, autonomous vehicle <NUM> may include several ride-service computing devices <NUM> in several different locations within the vehicle. As an example and not by way of limitation, autonomous vehicle <NUM> may include four ride-service computing devices <NUM> located in the following places: one in front of the front-left passenger seat (e.g., driver's seat in traditional U. automobiles), one in front of the front-right passenger seat, one in front of each of the rearleft and rear-right passenger seats. In particular embodiments, ride-service computing device <NUM> may be detachable from any component of autonomous vehicle <NUM>. This may allow users to handle ride-service computing device <NUM> in a manner consistent with other tablet computing devices. As an example and not by way of limitation, a user may move ride-service computing device <NUM> to any location in the cabin or passenger compartment of autonomous vehicle <NUM>, may hold ride-service computing device <NUM>, or handle ride-service computing device <NUM> in any other suitable manner. Although this disclosure describes providing a particular computing device in a particular manner, this disclosure contemplates providing any suitable computing device in any suitable manner.

<FIG> illustrates an example block diagram of an algorithmic navigation pipeline. In particular embodiments, an algorithmic navigation pipeline <NUM> may include a number of computing modules, such as a sensor data module <NUM>, perception module <NUM>, prediction module <NUM>, planning module <NUM>, and control module <NUM>. Sensor data module <NUM> may obtain and preprocess sensor/telemetry data that is provided to perception module <NUM>. Such data may be captured by any suitable sensors of a vehicle. As an example and not by way of limitation, the vehicle may have a Light Detection and Ranging (LiDAR) sensor that is configured to transmit pulsed laser beams in multiple directions and measure the reflected signal from objects surrounding vehicle. The time of flight of the light signals may be used to measure the distance or depth of the objects from the LiDAR. As another example, the vehicle may have optical cameras pointing in different directions to capture images of the vehicle's surrounding. Radars may also be used by the vehicle for detecting other vehicles and/or hazards at a distance. As further examples, the vehicle may be equipped with ultrasound for close range object detection, e.g., parking and obstacle detection or infrared cameras for object detection in low-light situations or darkness. In particular embodiments, sensor data module <NUM> may suppress noise in the sensor data or normalize the sensor data.

Perception module <NUM> is responsible for correlating and fusing the data from the different types of sensors of the sensor module <NUM> to model the contextual environment of the vehicle. Perception module <NUM> may use information extracted by multiple independent sensors to provide information that would not be available from any single type of sensors. Combining data from multiple sensor types allows the perception module <NUM> to leverage the strengths of different sensors and more accurately and precisely perceive the environment. As an example and not by way of limitation, image-based object recognition may not work well in low-light conditions. This may be compensated by sensor data from LiDAR or radar, which are effective sensors for measuring distances to targets in low-light conditions. As another example, image-based object recognition may mistakenly determine that an object depicted in a poster is an actual three-dimensional object in the environment. However, if depth information from a LiDAR is also available, the perception module <NUM> could use that additional information to determine that the object in the poster is not, in fact, a three-dimensional object.

Perception module <NUM> may process the available data (e.g., sensor data, data from a high-definition map, etc.) to derive information about the contextual environment. For example, perception module <NUM> may include one or more agent modelers (e.g., object detectors, object classifiers, or machine-learning models trained to derive information from the sensor data) to detect and/or classify agents present in the environment of the vehicle (e.g., other vehicles, pedestrians, moving objects). Perception module <NUM> may also determine various characteristics of the agents. For example, perception module <NUM> may track the velocities, moving directions, accelerations, trajectories, relative distances, or relative positions of these agents. In particular embodiments, the perception module <NUM> may also leverage information from a high-definition map. The high-definition map may include a precise three-dimensional model of the environment, including buildings, curbs, street signs, traffic lights, and any stationary fixtures in the environment. Using the vehicle's GPS data and/or image-based localization techniques (e.g., simultaneous localization and mapping, or SLAM), the perception module <NUM> could determine the pose (e.g., position and orientation) of the vehicle or the poses of the vehicle's sensors within the high-definition map. The pose information, in turn, may be used by the perception module <NUM> to query the high-definition map and determine what objects are expected to be in the environment.

Perception module <NUM> may use the sensor data from one or more types of sensors and/or information derived therefrom to generate a representation of the contextual environment of the vehicle. As an example and not by way of limitation, the representation of the external environment may include objects such as other vehicles, curbs, debris, objects, and pedestrians. The contextual representation may be limited to a maximum range of the sensor array (e.g., <NUM>, <NUM>, or <NUM> meters). The representation of the contextual environment may include information about the agents and objects surrounding the vehicle, as well as semantic information about the traffic lanes, traffic rules, traffic signs, time of day, weather, and/or any other suitable information. The contextual environment may be represented in any suitable manner. As an example and not by way of limitation, the contextual representation may be encoded as a vector or matrix of numerical values, with each value in the vector/matrix corresponding to a predetermined category of information. For example, each agent in the environment may be represented by a sequence of values, starting with the agent's coordinate, classification (e.g., vehicle, pedestrian, etc.), orientation, velocity, trajectory, and so on. Alternatively, information about the contextual environment may be represented by a raster image that visually depicts the agent, semantic information, etc. For example, the raster image may be a birds-eye view of the vehicle and its surrounding, up to a predetermined distance. The raster image may include visual information (e.g., bounding boxes, color-coded shapes, etc.) that represent various data of interest (e.g., vehicles, pedestrians, lanes, buildings, etc.).

The representation of the present contextual environment from the perception module <NUM> may be consumed by a prediction module <NUM> to generate one or more predictions of the future environment. For example, given a representation of the contextual environment at time t<NUM>, the prediction module <NUM> may output another contextual representation for time t<NUM>. For instance, if the t<NUM> contextual environment is represented by a raster image, the output of the prediction module <NUM> may be another raster image (e.g., a snapshot of the current environment) that depicts where the agents would be at time t<NUM> (e.g., a snapshot of the future). In particular embodiments, prediction module <NUM> may include a machine-learning model (e.g., a convolutional neural network, a neural network, a decision tree, support vector machines, etc.) that may be trained based on previously recorded contextual and sensor data. For example, one training sample may be generated based on a sequence of actual sensor data captured by a vehicle at times t<NUM> and t<NUM>. The captured data at times t<NUM> and t<NUM> may be used to generate, respectively, a first contextual representation (the training data) and a second contextual representation (the associated ground-truth used for training). During training, the machine-learning model may process the first contextual representation using the model's current configuration parameters and output a predicted contextual representation. The predicted contextual representation may then be compared to the known second contextual representation (i.e., the ground-truth at time t<NUM>). The comparison may be quantified by a loss value, computed using a loss function. The loss value may be used (e.g., via back-propagation techniques) to update the configuration parameters of the machine-learning model so that the loss would be less if the prediction were to be made again. The machine-learning model may be trained iteratively using a large set of training samples until a convergence or termination condition is met. For example, training may terminate when the loss value is below a predetermined threshold. Once trained, the machine-learning model may be used to generate predictions of future contextual representations based on current contextual representations.

Planning module <NUM> may determine the navigation routes and particular driving operations (e.g., slowing down, speeding up, stopping, swerving, etc.) of the vehicle based on the predicted contextual representation generated by the prediction module <NUM>. In particular embodiments, planning module <NUM> may utilize the predicted information encoded within the predicted contextual representation (e.g., predicted location or trajectory of agents, semantic data, etc.) and any other available information (e.g., map data, traffic data, accident reports, weather reports, target destinations, and any other suitable information) to determine one or more goals or navigation instructions for the vehicle. As an example and not by way of limitation, based on the predicted behavior of the agents surrounding the vehicle and the traffic data to a particular destination, planning module <NUM> may determine a particular navigation path and associated driving operations for the vehicle to avoid possible collisions with one or more agents. In particular embodiments, planning module <NUM> may generate, based on a given predicted contextual presentation, several different plans (e.g., goals or navigation instructions) for the vehicle. For each plan, the planning module <NUM> may compute a score that represents the desirability of that plan. For example, if the plan would likely result in the vehicle colliding with an agent at a predicted location for that agent, as determined based on the predicted contextual representation, the score for the plan may be penalized accordingly. Another plan that would cause the vehicle to violate traffic rules or take a lengthy detour to avoid possible collisions may also have a score that is penalized, but the penalty may be less severe than the penalty applied for the previous plan that would result in collision. A third plan that causes the vehicle to simply stop or change lanes to avoid colliding with the agent in the predicted future may receive the highest score. Based on the assigned scores for the plans, the planning module <NUM> may select the best plan to carry out. While the example above used collision as an example, the disclosure herein contemplates the use of any suitable scoring criteria, such as travel distance or time, fuel economy, changes to the estimated time of arrival at the destination, passenger comfort, proximity to other vehicles, the confidence score associated with the predicted contextual representation, etc..

Based on the plan generated by planning module <NUM>, which may include one or more navigation path or associated driving operations, control module <NUM> may determine the specific commands to be issued to the actuators of the vehicle. The actuators of the vehicle are components that are responsible for moving and controlling the vehicle. The actuators control driving functions of the vehicle, such as for example, steering, turn signals, deceleration (braking), acceleration, gear shift, etc. As an example and not by way of limitation, control module <NUM> may transmit commands to a steering actuator to maintain a particular steering angle for a particular amount of time to move a vehicle on a particular trajectory to avoid agents predicted to encroach into the area of the vehicle. As another example, control module <NUM> may transmit commands to an accelerator actuator to have the vehicle safely avoid agents predicted to encroach into the area of the vehicle.

<FIG> illustrates an example computer system <NUM>. In particular embodiments, one or more computer systems <NUM> perform one or more steps of one or more methods described or illustrated herein. In particular embodiments, one or more computer systems <NUM> provide the functionalities described or illustrated herein. In particular embodiments, software running on one or more computer systems <NUM> performs one or more steps of one or more methods described or illustrated herein or provides the functionalities described or illustrated herein. Particular embodiments include one or more portions of one or more computer systems <NUM>. Herein, a reference to a computer system may encompass a computing device, and vice versa, where appropriate. Moreover, a reference to a computer system may encompass one or more computer systems, where appropriate.

In particular embodiments, processor <NUM> includes hardware for executing instructions, such as those making up a computer program. As an example and not by way of limitation, to execute instructions, processor <NUM> may retrieve (or fetch) the instructions from an internal register, an internal cache, memory <NUM>, or storage <NUM>; decode and execute them; and then write one or more results to an internal register, an internal cache, memory <NUM>, or storage <NUM>. In particular embodiments, processor <NUM> may include one or more internal caches for data, instructions, or addresses. This disclosure contemplates processor <NUM> including any suitable number of any suitable internal caches, where appropriate. As an example and not by way of limitation, processor <NUM> may include one or more instruction caches, one or more data caches, and one or more translation lookaside buffers (TLBs). Instructions in the instruction caches may be copies of instructions in memory <NUM> or storage <NUM>, and the instruction caches may speed up retrieval of those instructions by processor <NUM>. Data in the data caches may be copies of data in memory <NUM> or storage <NUM> that are to be operated on by computer instructions; the results of previous instructions executed by processor <NUM> that are accessible to subsequent instructions or for writing to memory <NUM> or storage <NUM>; or any other suitable data. The data caches may speed up read or write operations by processor <NUM>. The TLBs may speed up virtual-address translation for processor <NUM>. In particular embodiments, processor <NUM> may include one or more internal registers for data, instructions, or addresses. This disclosure contemplates processor <NUM> including any suitable number of any suitable internal registers, where appropriate. Where appropriate, processor <NUM> may include one or more arithmetic logic units (ALUs), be a multicore processor, or include one or more processors <NUM>. Although this disclosure describes and illustrates a particular processor, this disclosure contemplates any suitable processor.

In particular embodiments, memory <NUM> includes main memory for storing instructions for processor <NUM> to execute or data for processor <NUM> to operate on. As an example and not by way of limitation, computer system <NUM> may load instructions from storage <NUM> or another source (such as another computer system <NUM>) to memory <NUM>. Processor <NUM> may then load the instructions from memory <NUM> to an internal register or internal cache. To execute the instructions, processor <NUM> may retrieve the instructions from the internal register or internal cache and decode them. During or after execution of the instructions, processor <NUM> may write one or more results (which may be intermediate or final results) to the internal register or internal cache. Processor <NUM> may then write one or more of those results to memory <NUM>. In particular embodiments, processor <NUM> executes only instructions in one or more internal registers or internal caches or in memory <NUM> (as opposed to storage <NUM> or elsewhere) and operates only on data in one or more internal registers or internal caches or in memory <NUM> (as opposed to storage <NUM> or elsewhere). One or more memory buses (which may each include an address bus and a data bus) may couple processor <NUM> to memory <NUM>. Bus <NUM> may include one or more memory buses, as described in further detail below. In particular embodiments, one or more memory management units (MMUs) reside between processor <NUM> and memory <NUM> and facilitate accesses to memory <NUM> requested by processor <NUM>. In particular embodiments, memory <NUM> includes random access memory (RAM). This RAM may be volatile memory, where appropriate. Where appropriate, this RAM may be dynamic RAM (DRAM) or static RAM (SRAM). Moreover, where appropriate, this RAM may be single-ported or multi-ported RAM. This disclosure contemplates any suitable RAM. Memory <NUM> may include one or more memories <NUM>, where appropriate. Although this disclosure describes and illustrates particular memory, this disclosure contemplates any suitable memory.

Where appropriate, this ROM may be maskprogrammed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM), or flash memory or a combination of two or more of these.

In particular embodiments, communication interface <NUM> includes hardware, software, or both providing one or more interfaces for communication (such as, for example, packet-based communication) between computer system <NUM> and one or more other computer systems <NUM> or one or more networks. As an example and not by way of limitation, communication interface <NUM> may include a network interface controller (NIC) or network adapter for communicating with an Ethernet or any other wire-based network or a wireless NIC (WNIC) or wireless adapter for communicating with a wireless network, such as a WI-FI network. This disclosure contemplates any suitable network and any suitable communication interface <NUM> for it. As an example and not by way of limitation, computer system <NUM> may communicate with an ad hoc network, a personal area network (PAN), a local area network (LAN), a wide area network (WAN), a metropolitan area network (MAN), or one or more portions of the Internet or a combination of two or more of these. One or more portions of one or more of these networks may be wired or wireless. As an example, computer system <NUM> may communicate with a wireless PAN (WPAN) (such as, for example, a Bluetooth WPAN), a WI-FI network, a WI-MAX network, a cellular telephone network (such as, for example, a Global System for Mobile Communications (GSM) network), or any other suitable wireless network or a combination of two or more of these. Computer system <NUM> may include any suitable communication interface <NUM> for any of these networks, where appropriate. Communication interface <NUM> may include one or more communication interfaces <NUM>, where appropriate. Although this disclosure describes and illustrates a particular communication interface, this disclosure contemplates any suitable communication interface.

As an example and not by way of limitation, bus <NUM> may include an Accelerated Graphics Port (AGP) or any other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a front-side bus (FSB), a HYPERTRANSPORT (HT) interconnect, an Industry Standard Architecture (ISA) bus, an INFINIBAND interconnect, a low-pin-count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCIe) bus, a serial advanced technology attachment (SATA) bus, a Video Electronics Standards Association local (VLB) bus, or another suitable bus or a combination of two or more of these.

Herein, a computer-readable non-transitory storage medium or media may include one or more semiconductor-based or other types of integrated circuits (ICs) (such, as for example, field-programmable gate arrays (FPGAs) or application-specific ICs (ASICs)), hard disk drives (HDDs), hybrid hard drives (HHDs), optical discs, optical disc drives (ODDs), magneto-optical discs, magneto-optical drives, floppy diskettes, floppy disk drives (FDDs), magnetic tapes, solid-state drives (SSDs), RAM-drives, SECURE DIGITAL cards or drives, any other suitable computer-readable non-transitory storage media, or any suitable combination of two or more of these, where appropriate.

Claim 1:
A method comprising:
determining, by a computing system, an initial cost volume associated with potential trajectories of a vehicle in an environment based on a set of movement restrictions of the vehicle, wherein the initial cost volume is based upon hand-engineered costs;
generating, by the computing system using a machine learning model, a delta cost volume using the initial cost volume and environment data of the environment, wherein the machine learning model is trained based upon observed driving behavior of vehicle agents;
scoring, by the computing system, the potential trajectories based on the initial cost volume and the delta cost volume;
selecting, by the computing system, a trajectory of the potential trajectories according to the scoring; and
controlling the vehicle based upon the trajectory.