wino | 5 Jun 2006 11:22

steering sensitivity and deadzone

Hi,

I have what I initially saw as a steering sensitivity problem , since fine  
corrections to the steering seemed impossible then the car would veer to  
one side.

It was basically uncontrollable above about 80km/h

On closer inspection it seems to be an issue with the deadzone.

I ran a test with jstest in a terminal next to the race and was able to  
see the following was happening.

joystick /dev/input/js0 output registers a change starting at about 5  
degrees off centre. Careful manipulation can register settings as low as a  
few hundred (fds=32000)

looking at the car's behaviour no steering movement occurs until joystick  
position regiester about 25000 !

I brought the deadzone down to 0.01 and this may have made a slight  
difference and steering seemed to start around 23000. Due to the crudeness  
of the test this difference is within experimental error and may in fact  
be just that , an error.

In any case the problem remains essencially the same: it require 3/4 full  
movement before any steering occurs.

I am running a classis two axis analogue joystick, I use only left right  
axis for steering, using torcs calibration to set it up.
(Continue reading)

Christos Dimitrakakis | 5 Jun 2006 11:57
Picon
Favicon

Re: steering sensitivity and deadzone

wino <at> piments.com wrote:

> In any case the problem remains essencially the same: it require 3/4 full  
> movement before any steering occurs.
> 
> 
> 
> I am running a classis two axis analogue joystick, I use only left right  
> axis for steering, using torcs calibration to set it up.
> 
> I have a set of analogue pedals plugged in as js1 and this seems to work  
> as expected. I get fine accel control starting at the slightest touch of  
> the pedal.
> 
> 
> 
> Why is the program not reacting to the first 3/4 of the steering control  
> movement?
> 

That's very strange.  Are you running the latest CVS?  We fixed a very
minor problem with steering in that, but that's all.

I personally use the joystick with a dead zone equal to zero, since the
wheel itself already has a dead zone.

--

-- 
Christos Dimitrakakis
Homepage: http://www.idiap.ch/~dimitrak/main.html
Music: http://olethros.dmusic.com
(Continue reading)

Christos Dimitrakakis | 6 Jun 2006 11:44
Picon
Favicon

Re: steering sensitivity and deadzone


> So it seems impossible to desensitise the steering without introducing a
> huge dead zone.
> 
> I have not dug in to see how this is coded but does that makes sense to
> you?
> 

The code uses a x^n law to make the response go from a linear to a
curved response (with almost no response around the center) - the dead
zone value in TORCS is not used with joysticks at all!

So, sensitivity in joysticks controls a 'soft' dead zone - because you
want to have maximal response when the wheel is fully locked and you
want to have zero response when the wheel is centered.  So you cannot
control the extreme values of the response curve, but its shape.
Perhaps there is a better shape than x^n, but what?  I personally find
it good enough.

Do you have the same problem when playing with the mouse?

If you don't have the same problem then perhaps you should take a look
at the calibration again.  I ran an experiment with 'jscal' and found
that it was possible to calibrate the joystick in such a way that it
exhibited an on-off response, which of course made it impossible to drive.

--

-- 
Christos Dimitrakakis
Homepage: http://www.idiap.ch/~dimitrak/main.html
Music: http://olethros.dmusic.com
(Continue reading)

wino | 6 Jun 2006 15:05

Re: steering sensitivity and deadzone


> Do you have the same problem when playing with the mouse?
>
> If you don't have the same problem then perhaps you should take a look
> at the calibration again.  I ran an experiment with 'jscal' and found
> that it was possible to calibrate the joystick in such a way that it
> exhibited an on-off response, which of course made it impossible to  
> drive.
>

Thanks for explaining a little of the how the calibration is coded. I  
think I can see how that ties into what I am seeing. Responce like a  
chopped off parabola. With the values I gave it, a broad dead zone then  
very steep rise.

Yes , the mouse is the same, so it's not an external joystick util  
interfering here.

In fact, mouse steering is a better way to see the effect because you can  
have the mouse pointer over the nose of the car and the extent of the dead  
zone is a lot more evident (although you can't put any numbers on it).
It seems the basic problem is that we need full lock to recover from a  
skid or crash but most of the time very limited steering.

Joysticks , even plastic steering wheel types , only have a very limited  
movement. Real cars probably have two full rotations of the wheel.

This probably means some trick has to be found which deviates from correct  
modelling of a car.

(Continue reading)

Christos Dimitrakakis | 6 Jun 2006 16:04
Picon
Favicon

Re: steering sensitivity and deadzone

wino <at> piments.com wrote:
> 
>> Do you have the same problem when playing with the mouse?
>>
>> If you don't have the same problem then perhaps you should take a look
>> at the calibration again.  I ran an experiment with 'jscal' and found
>> that it was possible to calibrate the joystick in such a way that it
>> exhibited an on-off response, which of course made it impossible to
>> drive.
>>
> 
> Thanks for explaining a little of the how the calibration is coded. I
> think I can see how that ties into what I am seeing. Responce like a
> chopped off parabola. With the values I gave it, a broad dead zone then
> very steep rise.
> 

Strictly speaking, there dead zone is not 0 anywhere (at least on the
side of TORCS) - changing the 'dead zone' value should make no
difference with the wheel.  If you set the sensitivity to 1 you should
see a linear response.  I usually set it between 0.5 and 0.8.

Note also that some joysticks have a 'hardware' dead zone which you can
change with joystick utilities such as jscalibrator.

Note also that the speed at which you can change the steering angle is
bounded.

--

-- 
Christos Dimitrakakis
(Continue reading)

Christos Dimitrakakis | 6 Jun 2006 16:43
Picon
Favicon

Limited slip differential

I was just looking at the code for the limited slip differential.
Why? Because I tried different values for "max slip bias", but it seemed
to have no affect at all, while it should.

The code goes like this:

                case DIFF_LIMITED_SLIP:
// When the drive torque exceeds the lockInputTq, then we just update it
// as a spool differential! Why? I think this is a mistake.
                        if (DrTq > differential->lockInputTq) {
                                updateSpool(car, differential, first);
                                return;
                        }

                        spdRatioMax = differential->dSlipMax - DrTq *
differential->dSlipMax / differential->lockInputTq;

// Try to equalise velocities velocities..
                        if (spdRatio > spdRatioMax) {
                                deltaSpd = (spdRatio - spdRatioMax) *
fabs(spinVel0 + spinVel1) / 2.0;
                                if (spinVel0 > spinVel1) {
                                        spinVel0 -= deltaSpd;
                                        spinVel1 += deltaSpd;
                                } else {
                                        spinVel0 += deltaSpd;
                                        spinVel1 -= deltaSpd;
                                }
                        }
// Why the if clause? Why should the bias change sign depending on which
(Continue reading)

wino | 6 Jun 2006 16:56

Re: steering sensitivity and deadzone

On Tue, 06 Jun 2006 16:04:10 +0200, Christos Dimitrakakis  
<dimitrak <at> idiap.ch> wrote:

>
> Strictly speaking, there dead zone is not 0 anywhere (at least on the
> side of TORCS)
well I can produce 19000 on jstest and not get a twitch out of torcs so  
maybe the extreme exponent was resulting in <1.0 from 19000. That makes  
some sense now I know it's x^n.

> - changing the 'dead zone' value should make no
> difference with the wheel.
Thanks, I noted that in your last post.

If you set the sensitivity to 1 you should
> see a linear response.  I usually set it between 0.5 and 0.8.

Thanks for the tip, maybe something in the faq would be nice since this  
bahaviour is not at all what one would guess without knowing the code.  
There's a natural assumption that it would be some scaling factor.

A value >1 renders it somewhat unstable in the sense that you can no  
longer go straight ahead.

The range of values you suggest would be a real help.

>
> Note also that some joysticks have a 'hardware' dead zone which you can
> change with joystick utilities such as jscalibrator.

(Continue reading)

Christos Dimitrakakis | 6 Jun 2006 17:12
Picon
Favicon

Re: Limited slip differential

More on the differential.  The Viscous Coupler seems to be just fine and
to correspond to the 'limited slip viscous coupling' differential.
However I am uncertain as to what type of physical differential the
'limited slip' differential in TORCS is supposed to be.  If anyone has
any info on that, I'd check it up later to make sure the simu
implementation corresponds to the actual physical device.

Cheers,
Christos
--

-- 
Christos Dimitrakakis
Homepage: http://www.idiap.ch/~dimitrak/main.html
Music: http://olethros.dmusic.com
Mart Kelder | 6 Jun 2006 19:00
Picon

Race rules

Hi all,

A couple of months ago I wrote this mailings list about blue flags which I 
implemented. It didn't fit in the coming release schedule, so the things in 
the mail obviously won't fit either. But I hope this (or a part of it) will be 
usefull some time. Also, I think it is in the idea for open source to share 
the source code, so I uploaded my changes to a website.

As earlier, blue flags are included. Currently, I disabled penalties for not 
letting an opponent overtake.

There are also yellow and green flags. If an accident occurs, these flags 
will be enabled. Overtaking is forbidden; if an opponent does overtake, a 
Stop-and-go penalty will follow.

If there are (depending on track type) many accidents, the safetycar will be 
send out. The safetycar is just a very slow bt-robot, which likes pitting in 
the last pit post. If a safetycar is send out, all over the tracks are yellow 
flags enabled, so nobody can overtake (with few exceptions, of course).

There also are white flags for cars driving slowly. It is just a warning for 
other drivers that a car is driving 20 m/s slower then the average speed in 
that segment.

As I can't make people waving flags, I hang lights every 200 meter above the 
tracks. There are also lights at the pit exit. Those lights will warn a driver 
that there are other cars near the pit exit. The pit exit will be closed if 
the safetycar drives nearby the pit lane. Leaving the pits at that point will 
disqualify a car.

(Continue reading)

wino | 7 Jun 2006 10:19

Re: Race rules

On Tue, 06 Jun 2006 19:00:29 +0200, Mart Kelder <mart <at> kelder31.nl> wrote:

>
> Because not all robots have included these features, I added a attribute
> to
> the robot xml-file which lists the implemented features. At race start,
> the
> intersect between those features are taken, so only the features all cars
> have are used (this means no safetycar if there is one car that isn't
> aware
> of it).

nice idea , you might want to add some means of checking which car is  
blocking any particular feature. It could be a drag trawling all the xml  
files by hand to find out why one of these feature is no working.

regards

Gmane