algorithm should move dynamic obstacles after each
sampling step. Fig. 2 shows the comparison of several
MPPI trajectory sampling steps in the case of static
and dynamic cost map usage.
On the presented figure in the case when the sta-
tic cost map is used the red car plans an overcoming
maneuver at the end of the trajectory because it assu-
mes blue car to be there. But in a real situation at the
moment of time when the red car reaches the point
the blue car will be gone ahead. In addition, there
may be cases when MPPI may fail to find the solution
using static cost map. For example, while moving al-
ong the tight road, where overcoming is not possible
the MPPI will not find a solution if there will be a car
moving ahead of the object car.
The main difficulty of the algorithm implementa-
tion is a constraint of keeping relatively good time
performance. A sampling of each particular trajec-
tory is done on a separate CUDA core, which allows
to provide pretty good amount of concurrently sam-
pled trajectories. In addition, all operations referred
to trajectory’s cost estimation are done in GPU me-
mory. So cost map update related to dynamic ob-
stacles should be done in between sampling steps in
GPU memory too. Also, it is needed to be considered
that the size of cost map may be pretty big so upda-
ting it with one GPU core may be slow. This creates
a bottle neck where estimated by separate cores tra-
jectories will have to wait for one GPU core to update
the map. For that reason, we have implemented con-
current map update. That was done via binding of
each particular dynamic object with a separate GPU
core. So each thread should update only cost map’s
part related to the bound object. If dynamic objects
are absent in the current moment of time than no re-
sources are spent on updating the map.
5 SIMULATION EXPERIMENTS
To proof the workability of the described approach
we used the simulator based on Unity engine. It al-
lows us to model the car dynamics with a high preci-
sion including such components as transmission, bra-
king system and tires. In addition, simulator gives the
opportunity to model a variety of sensors: lidars, ra-
dars, GPS and IMU. The algorithm was implemented
in ROS framework. Utilizing ROS allowed us to make
debugging and logging easier. All simulation results
were obtained on a PC with the following specs: Intel
i7-7700 CPU at 2.8GHz with NVIDIA GeForce GTX
1050 Ti 4GB under Ubuntu 16.0 and ROS Kinetic.
All experiments were done using a car with follo-
wing parameters: m = 1000kg, I
z
= 600kgm
2
, a =
1.68m, b = 1.35m, c = 0.7m. Length of planning ho-
rizon is equal to 50 steps and control rate is 20 Hz for
all cases.
We have conducted 3 experiments to demonstrate
the efficiency of presented method: (I) bypass of a sta-
tic obstacle with lane changing (considering the dy-
namics of other cars) (II) overcoming of a bus with
driving in the oncoming lane considering oncoming
cars (III) intersection crossing with giving a way to
vehicles moving along main road.
In the first experiment, the controlled car is loca-
ted in a right lane of the road in an initial moment of
time. On the left lane, there are 3 buses moving in
the same direction with a speed of 10 m/s. Approxi-
mately, after 150 meters on right lane roadworks are
taking place. For this reason, the algorithm should
plan to get around this obstacle with consideration of
buses on the neighbor lane. The trajectory obtained
during this experiment is presented in Fig. 3
In the second experiment, the object car was mo-
ving along the right lane behind the bus that was mo-
ving at a constant speed of 10 m/s. On the oncoming
lane in opposite direction, 2 buses are moving with
the same constant speed. Trajectory obtained in this
experiment is represented in Fig. 4
In the third experiment the car was moving to-
wards the crossing where it had to give the road to 3
buses moving from left direction along the main road.
On all three figures the trajectory of the car con-
trolled by MPPI is shown as a gradient line with co-
lor denoting the current speed. Sampled positions of
buses are represented with triangles of different co-
lors. Numbers along the trajectory represent same
moments of time. Fig. 6 represents the example of
road conditions modeled in Unity simulation environ-
ment.
To estimate the efficiency of the algorithm while
estimating different numbers of trajectories we used
a basic scenario of overcoming the bus moving for-
ward with a speed of 10 m/s. While experimenting
the time required to travel 250 meters and overcome
the bus was estimated. in addition, the quality of con-
trol was visually judged. Table 1 represents the re-
sults of execution of this experiment with a different
number of generated trajectories. We can see from
the table 1 that the execution of one iteration almost
not increasing with the growth of the number of the
trajectories. That is definitely a merit of concurrent
estimation run on separate NVidia GPU cores. The
total time of an overcoming maneuver on 250 meter
distance also does not change significantly. However,
with a decrease of the generated trajectories the qua-
lity of the control was getting worse. In general, that
could be observed as a presence of steering control
Model Predictive Path Integral Control for Car Driving with Dynamic Cost Map
251