[Thrun] And here is my solution. We have 4 cases.
On the left side, if I'm on the left side of the racecourse,
as defined that x is smaller to radius,
then my crosstrack_error is defined by the distance to the circle,
centered at radius comma radius minus the radius itself.
So this is going to be 0 if I'm exactly on the circle.
If I'm more than 3 times over to the right side, I get a circle again.
It looks like the one before, but now the center of the circle is a little bit further to the right
by 3 times radius as opposed to 1 radius.
The rest is identical to the line over here,
so I'm subtracting the same radius on the right side.
You can't quite see it but it's there.
Interesting are the straightaways.
So if my y value is large on the upper part of the diagram--
in fact, it's larger than radius--then my crosstrack_error is the y coordinate
times 2 times the radius, which is the height of the racetrack.
If I'm down at the bottom, it's just the y axis,
but really important is the minus sign because I'm moving in the opposite direction.
So for your code, to run this correctly you would have gotten everything in this routine right.
So that finishes my homework assignment.
Congratulations. You were able to make a car drive on a racetrack.
That is actually quite a significant component of making cars drive.
The PID control methodology that you learned today
and the smoothing methodology are really, really essential
not just in controlling self-driving cars but in a great number of other control setups.
Thank you for taking the class so far. You learned a lot already.
You learned about localization, about planning and control,
and we almost learned talking about how to build a self-driving car.
これが私の答えです 4つのケースがあります
左側はレースコースの左側にいるなら
xがradiusより小さいという定義のため
クロストラックエラーcteは
円との距離により定義されます
円の中心からの距離-radius自身です
円上にいるなら これはゼロになります
右側方向にradiusの3倍以上の距離にいれば
再び円上にいます
先ほどと同じようですが円の中心は
右方向へ少し離れたところにあります
1radiusに対し3倍のradiusの位置ですが
他は先ほどの行と同じです
また同じradiusを引きます
見にくいですがここにあります
面白いのは直線コースです
yの値が図の上辺で大きいなら
実際にradiusより大きいですが
クロストラックエラーcteはy座標
つまり2×radiusです
これはレーストラックの高さです
底辺に下りているならy軸そのものですが
反対方向に動いているため負の符号が重要です
皆さんのコードで正しく実行するために
このルーチンをすべて正確に書いてください
これで課題は終わりです
これで車にレースコースを
運転させることができました
これは車の自律運転において欠かせない要素です
今回学んだPID制御や平滑化の方法は
とても重要です
自動運転車の制御だけではなく
他の制御問題においても大切です
ここまで講義を受けてくれてありがとうございます
位置推定、計画、制御について学んできました
自動運転車の作り方について
ほとんどを学んだことになります