Here is a version in Metapost. I've defined a draw_car routine that takes an arbitrary path, a starting point along that path, the radius of the wheels, the length of the car, and a label.

The approach is explained in the comments. If you try to draw the car past the end of the path you'll get a paths don't intersect error.
prologues := 3;
outputtemplate := "%j%c.eps";
vardef draw_car(expr p, n, r, len, name) =
% p : an arbitrary path
% n : a point on p (ie "point n of p" should exist)
% r : the radius of the car's wheels
% len : the length of the car's body
save a, b, q, t; path q; pair a, b; transform t;
% construct a path q, parallel to the given path p starting at point n of p
q = for i = n step 0.1 until length(p)+eps:
point i of p + ((0,r) rotated angle direction i of p) ..
endfor
point infinity of p + ((0,r) rotated angle direction infinity of p);
% a = center of back wheel, b = center of front wheel
a = point 0 of q;
b = q intersectionpoint fullcircle scaled 2 len shifted a;
% draw the wheels
fill fullcircle scaled 2r shifted a;
fill fullcircle scaled 2r shifted b;
% draw the body of the truck with a label, suitably transformed
t = identity rotated angle (b-a) shifted a;
draw unitsquare xscaled len yscaled 13/21 len transformed t;
picture M; M = image(label(name,(1/2len,1/3len))); draw M transformed t;
enddef;
beginfig(1);
path p;
p = origin .. (3cm,-2cm) {dir -45} .. (8cm,1cm) {up};
draw p withcolor .687 red;
draw_car(p, 0, 1mm, 1cm, "A");
draw_car(p, 0.6, 1mm, 1cm, "B");
draw_car(p, 1.2, 1mm, 1cm, "C");
draw_car(p, 1.8, 1mm, 1cm, "D");
endfig;
end.
Given this approach, we can decorate the car in whatever way we like by varying the bit that draws the body. For example, we could add these "go faster" stripes:

by adding
% draw some go faster stripes
draw ((-2,1/4 len) -- (-2,13/21 len)) transformed t;
draw ((-4,1/3 len) -- (-4,13/21 len)) transformed t;
draw ((-6,1/2 len) -- (-6,13/21 len)) transformed t;
after defining the transformation.
We can also have a go at the OP diagram:

beginfig(2);
h = 4.4cm;
r = 2cm;
path track; track = (0,h) {dir -50} .. { right } (3r, 0) --
(4.9r, 0) .. {up} (6r,r) .. {left} (5r,2r) ..
{down} (4r,r) .. {right} (5.1r, 0) -- (6.4r,0);
draw track withpen pencircle scaled .7pt withcolor .67 red;
% label the start
draw (2 left -- 2 right) shifted (-5,0);
draw (2 left -- 2 right) shifted (-5,h);
drawdblarrow ( origin -- (0,h)) shifted (-5,0);
label(btex $h$ etex, (0,1/2h));
% label the loop
drawarrow ( origin -- (0,r)) shifted (5r,r);
label(btex $r$ etex, (5r+5,3/2r));
fill fullcircle scaled 2pt shifted (5r,r);
% draw the car at the start and then near the top of the loop
draw_car(track,0,2bp,1cm,"M");
draw_car(track,3.4,2bp,1cm,"M");
endfig;