Presumably the change between low speed forward/back is cause some significant accelerations.... can these just be zero'ed out if the speed is less than a particular threshold?
Seems that the problem is in the differential, inTq0 and inTq1 jump about wildly when in neutral
--
Torques 202.608337 1580.898071
Torques 1495.782471 231.032471
Torques -255.815903 -1608.517212
Torques -1558.411621 -271.059723
Torques 128.005768 1457.754028
Torques 1376.248657 59.521385
Torques -225.099197 -1492.971313
Torques -1472.312500 -96.994469
Torques 110.580002 1349.337524
Torques 774.282532 -12.511423
--
When these are forced to 0 the wheels stop twitching (and obviously you can't drive).
For RWD I can actually see where these are set during simulation (they change so they must be set somewhere....)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Great... that 'circular' math was making my head spin :-(
I should also note that whilst inTq is clamped to 0 the G-graph still moves, but I think once we solve the wheel twitch it will prevent the accelerations.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think now the problem is not in the differential code, but in the tyre friction model. First, the slip variables diverge at low speed. They are cut to 0, but then at 0 there is no friction force. So the wheel start to rotate in one direction, than the friction force changes direction, the wheel goes back, and this numerical oscillation continues. So this is basically a duplicate of #177, likely the cause of #199 and the sideways sliding on banking (#620).
This can be solved if tires have some stationary friction when they are not moving, or moving very slowly. The tricky thing is that this force should be the exact opposite of the sum of other forces, while this is smaller than a limit value. I am now looking for ways how to do this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First step of the solution was added in r5326. It prevents the divergence of tangential slip at low speed, and adds a simulation of sticking force when car speed is less than 0.1 m/s, to prevent:
- sliding sideways,
- having a low amount of yaw when stationary.
The wheel can still rotate freely, next step is to stop this when stationary.
After a lot of debugging and thinking I think it is fixed now in r5330. To prevent wheel angular velocity oscillating around the wheel tangential velocity / radius value, it is artificially set to exactly that value whenever it wants to cross it, unless the car is braking. Besides, some sticking was added to help exactly zero the car speed when it is about to stop, and low speed slip variable is calculated consistently with the normal speed slip value.
All of these changes are conditional, set "fixed low speed grip" to "yes" in the "Features" section. For humans it is set this way by default in car.xml.
Please test it, although I have tried my best in testing it under some rare circumstances it might cause weird behavior of the car.
If I stop the car on the road, and I try to start again, I hardly can. I can't throttle for about 10 seconds or more and then it just come back all at once.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Presumably the change between low speed forward/back is cause some significant accelerations.... can these just be zero'ed out if the speed is less than a particular threshold?
Displayed in grboards.cpp line 299
--
--
Set in 'src/modules/simu/simuv2.1/car.cpp' line 231
--
--
Seems that the problem is in the differential, inTq0 and inTq1 jump about wildly when in neutral
--
Torques 202.608337 1580.898071
Torques 1495.782471 231.032471
Torques -255.815903 -1608.517212
Torques -1558.411621 -271.059723
Torques 128.005768 1457.754028
Torques 1376.248657 59.521385
Torques -225.099197 -1492.971313
Torques -1472.312500 -96.994469
Torques 110.580002 1349.337524
Torques 774.282532 -12.511423
--
When these are forced to 0 the wheels stop twitching (and obviously you can't drive).
For RWD I can actually see where these are set during simulation (they change so they must be set somewhere....)
Meant to say "can't see"... found where the 'link' is, differential->inAxis[0]->Tq == wheel->feedBack.Tq (via a pointer set in transmission.cpp)
There seems to be an oscillation within the differential, when the car is standing a slight feedback tq cause the wheel to twitch.
Good catch, I will look at it.
Great... that 'circular' math was making my head spin :-(
I should also note that whilst inTq is clamped to 0 the G-graph still moves, but I think once we solve the wheel twitch it will prevent the accelerations.
bump.... any progress on this?
Still thinking, I had to realise differentials can be quite tricky.
Progress report:
the torque is actually set in wheel.cpp L268.
I think now the problem is not in the differential code, but in the tyre friction model. First, the slip variables diverge at low speed. They are cut to 0, but then at 0 there is no friction force. So the wheel start to rotate in one direction, than the friction force changes direction, the wheel goes back, and this numerical oscillation continues. So this is basically a duplicate of #177, likely the cause of #199 and the sideways sliding on banking (#620).
This can be solved if tires have some stationary friction when they are not moving, or moving very slowly. The tricky thing is that this force should be the exact opposite of the sum of other forces, while this is smaller than a limit value. I am now looking for ways how to do this.
From the Boxer96
--
<section name="Front Right Wheel">
...
--
http://ffden-2.phys.uaf.edu/211_fall2002.web.dir/ben_townsend/staticandkineticfriction.htm
First step of the solution was added in r5326. It prevents the divergence of tangential slip at low speed, and adds a simulation of sticking force when car speed is less than 0.1 m/s, to prevent:
- sliding sideways,
- having a low amount of yaw when stationary.
The wheel can still rotate freely, next step is to stop this when stationary.
Related
Commit: [r5326]
After a lot of debugging and thinking I think it is fixed now in r5330. To prevent wheel angular velocity oscillating around the wheel tangential velocity / radius value, it is artificially set to exactly that value whenever it wants to cross it, unless the car is braking. Besides, some sticking was added to help exactly zero the car speed when it is about to stop, and low speed slip variable is calculated consistently with the normal speed slip value.
All of these changes are conditional, set "fixed low speed grip" to "yes" in the "Features" section. For humans it is set this way by default in car.xml.
Please test it, although I have tried my best in testing it under some rare circumstances it might cause weird behavior of the car.
Related
Commit: [r5330]
If I stop the car on the road, and I try to start again, I hardly can. I can't throttle for about 10 seconds or more and then it just come back all at once.
Nice work. Did a little testing on Windows, seems OK.
I did not have any throttle troubles. I am using mouse button for throttle (maybe a clue)
Hello rvlander, can you please specify the track and car combo you experienced this problem with?
The problem seems to happen with Archer R-9 (LS-GT1) on all tracks (ex. milky-five).
Thanks, I can see it, r5335 helps to reduce time needed for speeding up, but I still feel it starts a bit slower. I will further debug it.
Related
Commit: [r5335]
Hopefully r5391 fixes this bug, definitely helps, but needs further testing.
Related
Commit: [r5391]
I have not experienced the starting problem since r5391, so close this ticket now. Please reopen if still experience it or other problems.
Related
Commit: [r5391]
Diff: