Author Topic: MaxTyre - A tool to visualize/edit the GPB tyre model  (Read 7852 times)

Phathry25

  • Full Member
  • ***
  • Posts: 163
    • View Profile
Re: MaxTyre - A tool to visualize/edit the GPB tyre model
« Reply #15 on: February 10, 2016, 05:49:09 PM »
Understandable. Would you be willing to offer a crash course to teach a guy the basics of the model, or just point me in the right direction?

HornetMaX

  • Hero Member
  • *****
  • Posts: 5616
    • View Profile
Re: MaxTyre - A tool to visualize/edit the GPB tyre model
« Reply #16 on: February 10, 2016, 07:45:20 PM »
Understandable. Would you be willing to offer a crash course to teach a guy the basics of the model, or just point me in the right direction?
Sure, no big secret there. As stated by Piboso (http://forum.piboso.com/index.php?topic=1179.msg16679#msg16679), GPB uses Pacejka 2002 model (Magic Formula).
You can find plenty of references on the web with enough info to get a grasp of the overall idea.
If you really want to dig into that, the reference book is: Tyre and Vehicle Dynamics - H.B. Pacejka (I have the 2nd edition but I think there's a 3rd one around, with some minor differences).

To be honest, there's not an awful lot to understand about that tyre model: it's essentially a best-fit (from experimental data) over an empirical formula with a few tricks.
Once you have the exact equations, you're essentially done (for our purposes, modding).

Warning: I reported a while ago an issue I've found in GPB tyre data or my understanding of it (see this post: http://forum.piboso.com/index.php?topic=1922.msg25788;topicseen#msg25788). Didn't get any feedback from Piboso, so all the possible explanations are on the table: I have a bug in my code (very unlikely, for that specific issue), or I'm applying some formula wrongly, or GPB tyre data is fundamentally flawed.

Let me know if you need extra help.



Hawk

  • Hero Member
  • *****
  • Posts: 5881
  • MOD Team: CAWS / GP-Team: Horizon GP #7
    • View Profile
Re: MaxTyre - A tool to visualize/edit the GPB tyre model
« Reply #17 on: August 26, 2016, 09:30:26 AM »
Hi Max.
Any chance you can update MaxTyre to beta 8 Max? It's just that we are working on tyre performance characteristics and an updated version would be a great help.  ;)

We can view current beta 8 .TYRE files, but the current saved data set from MaxTyre is different to the current GPB .TYRE file data set and causes a core.exe in GPB.

As an addition: Could you make it so that when we save a file and enter a filename for the save that we don't have to put ".TYRE" as the filename format suffix? In other words it automatically adds the ".TYRE" filename format suffix to the end of the filename entered for the file save function. It just tidy's up the save procedure, but no big deal if it requires a lot of work to fix.  ;)

Hawk.

HornetMaX

  • Hero Member
  • *****
  • Posts: 5616
    • View Profile
Re: MaxTyre - A tool to visualize/edit the GPB tyre model
« Reply #18 on: August 26, 2016, 09:57:56 AM »
Hi Max.
Any chance you can update MaxTyre to beta 8 Max? It's just that we are working on tyre performance characteristics and an updated version would be a great help.  ;)

We can view current beta 8 .TYRE files, but the current saved data set from MaxTyre is different to the current GPB .TYRE file data set and causes a core.exe in GPB.

The tool is not supposed to save the entire .tyre file. As stated in the 1st post:
The tool only works with the parameters in the first part of Piboso's files (stuff before the section named "compound0").
It ignores all the rest. When you save something, it only saves out the parameters it works with (not the ones it has ignored).
Look at the sample files that come with the tool and compare them with the original .tyre files from GPB, you'll see what I mean.

As an addition: Could you make it so that when we save a file and enter a filename for the save that we don't have to put ".TYRE" as the filename format suffix? In other words it automatically adds the ".TYRE" filename format suffix to the end of the filename entered for the file save function. It just tidy's up the save procedure, but no big deal if it requires a lot of work to fix.  ;)
I probably could, but the issue is that the tool output is an incomplete .tyre file.

Let's assume you want to modify the murasama's rear tyre (m_rr1000_03_r_qual.tyre):
  • Open the original .tyre file with MaxTyre.
  • Play around in MaxTyre.
  • Once done, save to a different file, like mytyre.params (that's *not* a .tyre file)/
  • Now make a copy of m_rr1000_03_r_qual.tyre as mytyre.tyre, edit it in a text editor replacing the header part (with all the coefficients) with the content of mytyre.params.

If I get bored one of these nights I can try to have the tool read and write .tyre files directly.

Hawk

  • Hero Member
  • *****
  • Posts: 5881
  • MOD Team: CAWS / GP-Team: Horizon GP #7
    • View Profile
Re: MaxTyre - A tool to visualize/edit the GPB tyre model
« Reply #19 on: August 26, 2016, 10:35:49 AM »
No Max, you've misunderstood.  :)
Look at the data sets below and you will see that the Beta 8 TYRE file holds less variable data compared to your MaxTyre saved Data Set.
Can you see the difference in size although they are both only using the data range you indicated?  ;)

Basically there is more data in the MaxTyre file than there is in the Current GPB Beta 8 .TYRE file.  :)

GPB Beta 8 Varase Tyre Data Set(your indicated data range):
Code: [Select]
R0 = 0.300000
Fz0 = 1000.000000
p_Cx1 = 1.600000
p_Dx1 = 1.650000
p_Dx2 = -0.100000
p_Ex1 = 0.000000
p_Ex2 = 0.000000
p_Ex3 = 0.000000
p_Ex4 = 0.000000
p_Kx1 = 30.000000
p_Kx2 = 0.000000
p_Kx3 = 0.000000
r_Bx1 = 14.000000
r_Bx2 = -10.000000
r_Bx3 = 0.000000
r_Cx1 = 1.050000
p_Cy1 = 1.200000
p_Cy2 = 0.600000
p_Dy1 = 1.650000
p_Dy2 = -0.100000
p_Dy3 = 0.000000
p_Ey1 = 0.000000
p_Ey2 = 0.000000
p_Ey3 = 0.000000
p_Ey4 = 0.000000
p_Ey5 = 0.000000
p_Ky1 = 20.000000
p_Ky2 = 1.000000
p_Ky3 = 0.010000
p_Ky4 = 0.000000
p_Ky5 = 0.000000
p_Ky6 = 3.000000
p_Ky7 = 0.000000
r_By1 = 7.000000
r_By2 = 8.000000
r_By3 = 0.000000
r_Cy1 = 1.050000
r_Hy1 = 0.000000
q_Bz1 = 9.000000
q_Cz1 = 1.100000
q_Dz1 = 0.100000
q_Dz8 = 0.100000
q_Ez1 = -10.000000
s_Sz1 = 0.000000
q_sy1 = 0.013000



MaxTYRE Saved Data set of same above file:
Code: [Select]
Fz0 = 1000.000000
R0 = 0.300000
p_Cx1 = 1.600000
p_Cy1 = 1.200000
p_Cy2 = 0.600000
p_Dx1 = 1.650000
p_Dx2 = -0.100000
p_Dy1 = 1.650000
p_Dy2 = -0.100000
p_Dy3 = 0.000000
p_Ex1 = 0.000000
p_Ex2 = 0.000000
p_Ex3 = 0.000000
p_Ex4 = 0.000000
p_Ey1 = 0.000000
p_Ey2 = 0.000000
p_Ey3 = 0.000000
p_Ey4 = 0.000000
p_Ey5 = 0.000000
p_Hx1 = 0.000000
p_Hx2 = 0.000000
p_Hy1 = 0.000000
p_Hy2 = 0.000000
p_Kx1 = 30.000000
p_Kx2 = 0.000000
p_Kx3 = 0.000000
p_Ky1 = 20.000000
p_Ky2 = 1.000000
p_Ky3 = 0.010000
p_Ky4 = 0.000000
p_Ky5 = 0.000000
p_Ky6 = 3.000000
p_Ky7 = 0.000000
p_Vx1 = 0.000000
p_Vx2 = 0.000000
p_Vy1 = 0.000000
p_Vy2 = 0.000000
p_Vy3 = 0.000000
p_Vy4 = 0.000000
q_Bz1 = 9.000000
q_Bz10 = 0.000000
q_Bz2 = 0.000000
q_Bz3 = 0.000000
q_Bz4 = 0.000000
q_Bz5 = 0.000000
q_Bz6 = 0.000000
q_Bz9 = 0.000000
q_Cz1 = 1.100000
q_Dz1 = 0.100000
q_Dz10 = 0.000000
q_Dz11 = 0.000000
q_Dz2 = 0.000000
q_Dz3 = 0.000000
q_Dz4 = 0.000000
q_Dz6 = 0.000000
q_Dz7 = 0.000000
q_Dz8 = 0.100000
q_Dz9 = 0.000000
q_Ez1 = -10.000000
q_Ez2 = 0.000000
q_Ez3 = 0.000000
q_Ez4 = 0.000000
q_Ez5 = 0.000000
q_Hz1 = 0.000000
q_Hz2 = 0.000000
q_Hz3 = 0.000000
q_Hz4 = 0.000000
q_sy1 = 0.013000
r_Bx1 = 14.000000
r_Bx2 = -10.000000
r_Bx3 = 0.000000
r_By1 = 7.000000
r_By2 = 8.000000
r_By3 = 0.000000
r_By4 = 0.000000
r_Cx1 = 1.050000
r_Cy1 = 1.050000
r_Hx1 = 0.000000
r_Hy1 = 0.000000
r_Vy1 = 0.000000
r_Vy2 = 0.000000
r_Vy3 = 0.000000
r_Vy4 = 0.000000
r_Vy5 = 0.000000
r_Vy6 = 0.000000
s_Sz1 = 0.000000
s_Sz2 = 0.000000
s_Sz3 = 0.000000
s_Sz4 = 0.000000


Looking at the variables in MaxTyre dataset compared to beta 8 dataset, has Piboso either dropped some variables or is possibly using an updated Magic Formula version with a different data set of variables? But MaxTyre definitely has more variables than Piboso is currently using in Beta 8.

Hawk.
« Last Edit: August 26, 2016, 10:41:27 AM by Hawk »

HornetMaX

  • Hero Member
  • *****
  • Posts: 5616
    • View Profile
Re: MaxTyre - A tool to visualize/edit the GPB tyre model
« Reply #20 on: August 26, 2016, 11:03:50 AM »
Just to be sure, can you confirm that what you did is this: you have opened the 1st data set in MaxTyre and you have saved it to a different file obtaining the 2nd data set ?

What I see comparing the two data sets: in the second set all the additional lines (not present in the 1st set) are with a parameter value of zero, so they shouldn't matter (as likely zero is the default value, used when the parameter is not specified). Once you get rid of these additional lines with zeros, all the rest is identical (ordering aside) between the two sets. I can eventually change the code to avoid writing out lines with a parameter set to zero, but the order will never match all the times.

You can use Notepad++ with its compare plugin to diff two text files, very useful (it highlights each line of the two flies as identical, missing from 1, missing from 2, present but in different position, etc).
 

Hawk

  • Hero Member
  • *****
  • Posts: 5881
  • MOD Team: CAWS / GP-Team: Horizon GP #7
    • View Profile
Re: MaxTyre - A tool to visualize/edit the GPB tyre model
« Reply #21 on: August 26, 2016, 11:43:25 AM »
Just to be sure, can you confirm that what you did is this: you have opened the 1st data set in MaxTyre and you have saved it to a different file obtaining the 2nd data set ?

What I see comparing the two data sets: in the second set all the additional lines (not present in the 1st set) are with a parameter value of zero, so they shouldn't matter (as likely zero is the default value, used when the parameter is not specified). Once you get rid of these additional lines with zeros, all the rest is identical (ordering aside) between the two sets. I can eventually change the code to avoid writing out lines with a parameter set to zero, but the order will never match all the times.

You can use Notepad++ with its compare plugin to diff two text files, very useful (it highlights each line of the two flies as identical, missing from 1, missing from 2, present but in different position, etc).

Yes. I confirm that I did that.

I can also confirm that when I copy pasted the saved MaxTyre data set into the GPB Bike TYRE file, that GPB core.exe crashes, so yeah it would mean having to separate the redundant variable data lines and deleting them by using the "Notepad ++" method you suggested before then copy/pasting the MaxTyre data set into the relevant bike TYRE file. That currently is a bit of a pain.

Hawk.
« Last Edit: August 26, 2016, 11:45:45 AM by Hawk »

HornetMaX

  • Hero Member
  • *****
  • Posts: 5616
    • View Profile
Re: MaxTyre - A tool to visualize/edit the GPB tyre model
« Reply #22 on: August 26, 2016, 01:02:32 PM »
I can also confirm that when I copy pasted the saved MaxTyre data set into the GPB Bike TYRE file, that GPB core.exe crashes, so yeah it would mean having to separate the redundant variable data lines and deleting them by using the "Notepad ++" method you suggested before then copy/pasting the MaxTyre data set into the relevant bike TYRE file. That currently is a bit of a pain.
I will have to test this at home: maybe (huge speculation here) I'm assuming a default value to be zero when in fact it should be 1, because even in your original file there are lines with value at zero and that doesn't seem to be a problem.

One thing you can do (if you have time, willingness etc) is to manually remove the extra lines generated by MaxTyre "one by one" (see below) to figure out which one makes GPB crash.
If you don't do it, I'll do it as soon as I have some time for that.

Here are the "extra" lines from the example below:
Code: [Select]
p_Hx1 = 0.000000
p_Hx2 = 0.000000
p_Hy1 = 0.000000
p_Hy2 = 0.000000

p_Vx1 = 0.000000
p_Vx2 = 0.000000
p_Vy1 = 0.000000
p_Vy2 = 0.000000
p_Vy3 = 0.000000
p_Vy4 = 0.000000

q_Bz10 = 0.000000
q_Bz2 = 0.000000
q_Bz3 = 0.000000
q_Bz4 = 0.000000
q_Bz5 = 0.000000
q_Bz6 = 0.000000
q_Bz9 = 0.000000

q_Dz10 = 0.000000
q_Dz11 = 0.000000
q_Dz2 = 0.000000
q_Dz3 = 0.000000
q_Dz4 = 0.000000
q_Dz6 = 0.000000
q_Dz7 = 0.000000

q_Dz9 = 0.000000

q_Ez2 = 0.000000
q_Ez3 = 0.000000
q_Ez4 = 0.000000
q_Ez5 = 0.000000
q_Hz1 = 0.000000
q_Hz2 = 0.000000
q_Hz3 = 0.000000
q_Hz4 = 0.000000

r_By4 = 0.000000

r_Hx1 = 0.000000

r_Vy1 = 0.000000
r_Vy2 = 0.000000
r_Vy3 = 0.000000
r_Vy4 = 0.000000
r_Vy5 = 0.000000
r_Vy6 = 0.000000

s_Sz2 = 0.000000
s_Sz3 = 0.000000
s_Sz4 = 0.000000

You can work by "bunch" : remove all the p_H** lines (p_Hx1, p_Hx2, p_Hy1, p_Hy2): if it doesn't crash, move to another group (e.g. all the p_V** lines).
If it crashes add those lines back and remove only 1 or 2 of them, etc.
It should be pretty quick to figure out the offending line(s).

Hawk

  • Hero Member
  • *****
  • Posts: 5881
  • MOD Team: CAWS / GP-Team: Horizon GP #7
    • View Profile
Re: MaxTyre - A tool to visualize/edit the GPB tyre model
« Reply #23 on: August 26, 2016, 06:43:26 PM »
I just went to do these tests Max, and bugger me! It seems to be working now without any crashes at all!! :o  :-[

I now have no idea now why it was crashing yesterday when I pasted the same data set range into the .TYRE file.... My 1st thought was that I possibly had MaxTyre active at the same time I ran GPB, but just tested that and GPB still doesn't crash......

I also did a fresh save from MaxTyre as a further test and pasted that fresh data set into the bike .TYRE file and still no GPB crash.  :o

So it all seems to be working again now Max.  :-[

I can only deeply apologise Max for wasting your time on this issue... This is all very annoying because I'm sure I'm pasting in the same data range as yesterday, but for some reason GPB isn't crashing now like it did yesterday.  I can only assume that I must've ran something yesterday that upset something with all this afterwards, and with a fresh system start today it has sorted it all out?? GRrrrr!  ::) :-[ :-\

Hawk.


HornetMaX

  • Hero Member
  • *****
  • Posts: 5616
    • View Profile
Re: MaxTyre - A tool to visualize/edit the GPB tyre model
« Reply #24 on: August 26, 2016, 08:17:46 PM »
Don't worry Hawk, you probably wasted more time than my 10min on that so I have no problem assuming you didn't do it on purpose :)

Also, GPB (and the other sims from Piboso) may be tricky at times.
I know that sometimes they crash systematically when starting a test/online session if I have Visual Studio open. It's random: sometimes I do have the issue, sometimes not. But when I do have the problem, it persists and I have to shut VS down. After that, GPB works fine.

Hawk

  • Hero Member
  • *****
  • Posts: 5881
  • MOD Team: CAWS / GP-Team: Horizon GP #7
    • View Profile
Re: MaxTyre - A tool to visualize/edit the GPB tyre model
« Reply #25 on: August 26, 2016, 09:14:03 PM »
Don't worry Hawk, you probably wasted more time than my 10min on that so I have no problem assuming you didn't do it on purpose :)

Also, GPB (and the other sims from Piboso) may be tricky at times.
I know that sometimes they crash systematically when starting a test/online session if I have Visual Studio open. It's random: sometimes I do have the issue, sometimes not. But when I do have the problem, it persists and I have to shut VS down. After that, GPB works fine.

Thanks for that Max.... I had visions of you working away there trying to figure out what was happening only for the problem to be all at my end, but as you said, this sort of thing happens at times, but at least I'll know in future to do a system re-boot before posting about a similar problem again in the future just to rule out this sort of thing happening again.  :)

Hawk.

HornetMaX

  • Hero Member
  • *****
  • Posts: 5616
    • View Profile
Re: MaxTyre - A tool to visualize/edit the GPB tyre model
« Reply #26 on: September 25, 2016, 08:44:44 PM »
v1.5 out (Hawk's special):
  • Added keyboard shortcuts to save the files.
  • File save dialog auto-adds the file extension (.tyre).
  • Sample files from GPB beta8.
  • The tool now reads and writes the entire .tyre file.
Concerning the last point, if you open the "m_rr1000_03_r_qual.tyre" file in MaxTyre and then saved it, you get (I've removed some lines):
[EDIT 26/09/2016: fixed the comment lines perfix to ";##" as per v1.5b]

Code: [Select]
;## Parameters generated by MaxTyre
type = bike
id = M RR 1000 03 R Qual
Fz0 = 1000.000000
R0 = 0.300000
p_Cx1 = 1.600000
p_Cy1 = 1.200000

...  ...  ...

s_Sz4 = 0.000000
;## Other parameters
compound0
{
name = Qualify
OptTemperature = 80

...  ...  ...

pressure
{
range = 100, 5, 160
setting = 6
}
tyreHeaterTemperature = 60

Notice the two comments line starting with a ";##": they separate the parameters that can be modified within MaxTyre from the rest.
Essentially, when reading a .tyre file the tool tried to see if the line is about one parameter the tool knows: if yes the line will appear in the first part of the output file. If not it will appear (unchanged) in the second part.
« Last Edit: September 26, 2016, 05:34:14 PM by HornetMaX »

Hawk

  • Hero Member
  • *****
  • Posts: 5881
  • MOD Team: CAWS / GP-Team: Horizon GP #7
    • View Profile
Re: MaxTyre - A tool to visualize/edit the GPB tyre model
« Reply #27 on: September 25, 2016, 10:19:38 PM »
Woohoo! Very nice update Max! This will make things a lot simpler.....

Thank you very much Max, appreciated!  ;D ;D 8) 8)

Hawk.

HornetMaX

  • Hero Member
  • *****
  • Posts: 5616
    • View Profile
Re: MaxTyre - A tool to visualize/edit the GPB tyre model
« Reply #28 on: September 25, 2016, 10:30:15 PM »
Did all that a bit on the rush, let me know if you see weird things when loading saving files.

Hawk

  • Hero Member
  • *****
  • Posts: 5881
  • MOD Team: CAWS / GP-Team: Horizon GP #7
    • View Profile
Re: MaxTyre - A tool to visualize/edit the GPB tyre model
« Reply #29 on: September 25, 2016, 11:17:48 PM »
Did all that a bit on the rush, let me know if you see weird things when loading saving files.

Will do mate.  ;)

Hawk.