speed-dreams/doc/tutorials/robot/torcs/robot/ch5/carsetup.html

256 lines
9.2 KiB
HTML

<!DOCTYPE public "-//w3c//dtd html 4.01 transitional//en"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!--
copyright : (C) 2003-2004 Bernhard Wymann
email : berniw@bluewin.ch
version : $Id$
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled "GNU
Free Documentation License".
-->
<head>
<title>setup the car</title>
<link rel="stylesheet" type="text/css" href="../../../css/format.css"/>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
<meta name="description" content="straight class"/>
<meta name="author" content="Bernhard Wymann"/>
<meta name="keywords" content="torcs, berniw, bernhard wymann, car, setup, example"/>
<script src="../../../js/utilities.js" type="text/javascript"></script>
</head>
<body bgcolor="#ffffff">
<table class="maincontent">
<tr>
<td class="maincontent">
<h1>5.6 Setup the Car</h1>
<h3>Introduction</h3>
<p>
In this section we will set up the car <span style="color:red;">bt 1</span> for the
qualifying on g-track-3. The goal is that you get a feeling for the parameters you can
change.
I don't recommend you to put too much effort in car setups yet, because if you
modify the driver or write one from scratch it will not need the same setups. We do
the test runs in the practice mode, set laps to 2 and display to normal so that you
can analyse the behaviour. You will need to edit the file "0/practice/g-track-3.xml"
(relative to the <span style="color:red;">bt</span> directory). To deploy the changed
setup you have to run "make install" from the directory "0/practice".
</p>
<h3>Test Drive 1</h3>
<p>
First we run a test without any changes. The lap time is 1:08:86.
</p>
<table class="thumbnail">
<tr>
<td class="thumbnail">
<a href="javascript:changetwoframes('images/shot1.html','content','navigation/backcarsetup.html','navigation')">
<img src="images/tn/torcs-20030326115625.jpg"
border="0" width="150" height="112"/>
</a>
</td>
<td class="thumbnail">
<a href="javascript:changetwoframes('images/shot2.html','content','navigation/backcarsetup.html','navigation')">
<img src="images/tn/torcs-20030326115631.jpg"
border="0" width="150" height="112"/>
</a>
</td>
<td class="thumbnail">
<a href="javascript:changetwoframes('images/shot3.html','content','navigation/backcarsetup.html','navigation')">
<img src="images/tn/torcs-20030326115642.jpg"
border="0" width="150" height="112"/>
</a>
</td>
<td class="thumbnail">
<a href="javascript:changetwoframes('images/shot4.html','content','navigation/backcarsetup.html','navigation')">
<img src="images/tn/torcs-20030326115748.jpg"
border="0" width="150" height="112"/>
</a>
</td>
</tr>
<tr>
<td class="footer">
Picture 1
</td>
<td class="footer">
Picture 2
</td>
<td class="footer">
Picture 3
</td>
<td class="footer">
Picture 4
</td>
</tr>
</table>
<p>
You can see on picture 1 the heavy understeering of the car in this narrow turn. It
happens in
the acceleration part of it, so we can conclude that the "Limited Slip"
differential on the
driven rear wheels disallows us to pass the turn. So we will set the differential to
type "Free".
On picture 2 you can see the result of the understeering. The car leaves the track
and starts skidding.<br/>
On picture 3 you can see the skidmarks form the braking before the turn. You can
conclude that the braking balance or pressure is not set up correct. Perhaps
we have to move the braking balance towards the rear wheels or to reduce the
pressure.<br/>
Finally on picture 4 you can see "classic" understeering. It's a quite wide turn, so
the main cause is probably not enough grip on the front wheels. We can fix that with
setting the camber to the minimum value and with proper suspension setup. Perhaps
we have to reduce the angle of attack of the rear wing (rebember our speed limit
computation). Now make the following changes in the setup file (0/practice/g-track-3.xml)
and deploy it (make install).
</p>
<p>
<ul>
<li>Set the differential to type "FREE".</li>
<li>Set camber of the left and right front wheel to -5.</li>
</ul>
</p>
<h3>Test Drive 2</h3>
<p>
The resulting lap time is 1:07:85, that's 1.01 seconds faster than the previous result.
</p>
<table class="thumbnail">
<tr>
<td class="thumbnail">
<a href="javascript:changetwoframes('images/shot5.html','content','navigation/backcarsetup.html','navigation')">
<img src="images/tn/torcs-20030326161354.jpg"
border="0" width="150" height="112"/>
</a>
</td>
<td class="thumbnail">
<a href="javascript:changetwoframes('images/shot6.html','content','navigation/backcarsetup.html','navigation')">
<img src="images/tn/torcs-20030326161422.jpg"
border="0" width="150" height="112"/>
</a>
</td>
<td class="thumbnail">
<a href="javascript:changetwoframes('images/shot7.html','content','navigation/backcarsetup.html','navigation')">
<img src="images/tn/torcs-20030326161428.jpg"
border="0" width="150" height="112"/>
</a>
</td>
<td class="thumbnail">
<a href="javascript:changetwoframes('images/shot8.html','content','navigation/backcarsetup.html','navigation')">
<img src="images/tn/torcs-20030326161440.jpg"
border="0" width="150" height="112"/>
</a>
</td>
</tr>
<tr>
<td class="footer">
Picture 5
</td>
<td class="footer">
Picture 6
</td>
<td class="footer">
Picture 7
</td>
<td class="footer">
Picture 8
</td>
</tr>
</table>
<p>
Like you can see on picture 5 we pass this turn now fine without any skidmarks or other
trouble. But we face a new problem on the next turn like you can see on the pictures
6, 7 and 8. If you watch the practice session carefully you can observe that the
reason for this are locking front wheels. We can conclude that we have to move
the braking balance toward the rear wheels and to reduce the pressure.
</p>
<p>
<ul>
<li>Set the brakes "front-rear brake repartition" to 0.47.</li>
<li>Set the "max pressure" to 9000.</li>
</ul>
</p>
<h3>Test Drive 3</h3>
<p>
The resulting lap time is 1:07:03, that's 1.83 seconds faster than the first result.
The car stays now quite good on the track so you can start the refinement of the setup.
After I changed the gearbox, suspension, brake and rear wing settings I got finally a
1:05:95, that's
2.88 seconds faster than the default setup. Play now with different values to get a
feeling for the settings. An approach to find the optimal values is:
</p>
<p>
<ol>
<li>Pick a parameter to optimize.</li>
<li>Choose a value for the parameter, e. g. the default value.</li>
<li>Measure the lap time.</li>
<li>Choose a smaller value for the parameter and measure the lap time.</li>
<li>Choose a larger value for the parameter and measure the lap time.</li>
<li>Explore new values in the direction of the minimal lap time found.</li>
<li>If the left and right values produce worse lap times you have found the best
local value, choose now another parameter for optimization.</li>
<li>Repeat the above till the setup is good enough.</li>
<li>Finally copy the setup to the right directory.</li>
</ol>
</p>
<p>
You have also to keep an eye on the damage you get per lap. Because you drive just a few
laps in the qualifying it doesn't matter if you get some damage. But for long races it
can be a problem. Damage causes additional drag and if it reaches a certain limit your
car is not able to drive further.
</p>
<h3>Downloads</h3>
<p>
In case you got lost, you can <a href="../download/bt56.tar.gz">download</a> my robot for TORCS 1.2.0 or later.
</p>
<h3>Feedback</h3>
<p>
<a href="mailto:berni4you@gmx.ch">Let me know</a>
if you read this chapter and your thoughts about it. Please
<a href="mailto:berni4you@gmx.ch">send me</a>
also spelling, grammar, math and code corrections. Thank you for the feedback.
</p>
<h3>Summary</h3>
<ul style="list-style-type:disk; color:black;">
<li>You know how to setup the car.</li>
<li>You have got a feeling for the different settings.</li>
</ul>
<br/>
</td>
</tr>
</table>
<table class="navigation_foot">
<tr>
<td class="navigation_foot">
<a href="./customprop.html">
<p style="text-align:left;">Back</p>
</a>
</td>
<td class="navigation_foot">
<a href="javascript:changetwoframes('../navigation/navigation.html','navigation','../robot.html','content')">
<p style="text-align:right;">Up</p>
</a>
</td>
</tr>
</table>
</body>
</html>