Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added European Tracks #23

Merged
merged 2 commits into from
Jul 28, 2022

Conversation

pierre-trott
Copy link
Contributor

This PR adds six tracks.
Track limits (left and right) have been constructed with Google Earth and exported to kml files (included). Both kml are post processed using fastest-lap Python command:

fastest_lap.circuit_preprocessor(options)

to produce a single .xml file included.

Tracks:

  • Hungaroring
  • Jarama
  • Pau ville (city track)
  • Vallelunga
  • Varano
  • Zolder

This PR adds six circuits.
Track limits (left and right) have been constructed with Google Earth and exported to kml files (included). Both kml are post processed using fastest-lap Python command:

fastest_lap.circuit_preprocessor(options)

to produce a single .xml file included.

Tracks:
- Hungaroring
- Jarama
- Pau ville (city track)
- Vallelunga
- Varano
- Zolder
@juanmanzanero
Copy link
Owner

Hello!

Could you also attach this notebook applied to the tracks you sent? I want to set this as a requisite to collaborators uploading their tracks, but I have forgot to add it to Contributing.md. If it is very inconvenient given the amount of tracks you have submitted, can you at least do it for pau_ville, vallelunga, and zolder? They seem to have large errors, though I am aware that the error measure is wrong for some tracks and the issue might be on my side.

Thank you very much for your very nice contribution, Pierre

@pierre-trott
Copy link
Contributor Author

I don't have Jupyter running but I can find all the i_start and i_end for every corner and add all the plot commands in a circuit_preprocessor.ipynb. Would that be good?

You say the tracks have errors, what kind of error? What should I look for when plotting the tracks?

@juanmanzanero
Copy link
Owner

In each of the XML files produced there's a header with this information

    <header>
        <track_length units="m">3995.6606035603131</track_length>
        <L2_error_left>3.746581096896739</L2_error_left>
        <L2_error_right>1.9467386462668475</L2_error_right>
        <max_error_left>84.101605320233034</max_error_left>
        <max_error_right>61.549736514958695</max_error_right>
    </header>

This error is the distance between the approximation of the track through polynomials (what circuit_preprocessor creates) and the real KML files. I am aware that with certain geometries, the computation of the error is incorrect, which is probably the case. I will open an issue about this. This is why I want to see the jupyter notebooks. In these notebooks, I plot the KML paths against the circuit_preprocessor approximation to see if they match properly.

If you cannot install Jupyter notebook, it is good enough if you can give me the i_start and i_end in notebooks and then I can run them myself, as you mention. Please call these notebooks as the name of the track (e.g. jarama.ipynb).

Thanks a lot!

Juan.

@pierre-trott
Copy link
Contributor Author

pierre-trott commented Jun 30, 2022

Okay, understood.

Is there a way to run the plots without generating the XML everytime? It's taking ages because of it.

I tried just loading the track:
track="track"
circuit = fastest_lap.load_track("../database/tracks/zolder/zolder.xml", track)

And then calling the following line in the plotting function:
s = fastest_lap.download_vector("track/arclength")

This doesn't work (raises error) any idea why? (I checked path to track).
It would save me some time if I didn't have to wait for the entire circuit_preprocessor to run everytime I want to adjust the i_start and i_end.

Thanks

@juanmanzanero
Copy link
Owner

juanmanzanero commented Jun 30, 2022

Yes, the correct syntax is

s = fastest_lap.load_track("../database/tracks/zolder/zolder.xml", track)

(s is the return value of load_track)

@pierre-trott
Copy link
Contributor Author

I saw that load_track returns this value but in order to generate all the plots, I don't only need:
s = fastest_lap.load_track("../database/tracks/zolder/zolder.xml", track)
But also:
x = fastest_lap.download_vector("track/centerline/x")
y = fastest_lap.download_vector("track/centerline/y")
x_left = fastest_lap.download_vector("track/left/x")
y_left = fastest_lap.download_vector("track/left/y")
x_right = fastest_lap.download_vector("track/right/x")
y_right = fastest_lap.download_vector("track/right/y")
x_left_measured = fastest_lap.download_vector("track/left_measured/x")
y_left_measured = fastest_lap.download_vector("track/left_measured/y")
x_right_measured = fastest_lap.download_vector("track/right_measured/x")
y_right_measured = fastest_lap.download_vector("track/right_measured/y")
kappa = fastest_lap.download_vector("track/kappa")
nl = fastest_lap.download_vector("track/nl")
nr = fastest_lap.download_vector("track/nr")
How do I get those?

@juanmanzanero
Copy link
Owner

Ah, I understood what happens. Yep, you cannot get them when loading from XML, it is not implemented. However, you need to rerun everytime? Can't you just open an interactive console and run circuit preprocessor once to get the data, and then just play with it?

Sorry for the inconvenience. Will implement to download the rest of the variables soon.

@pierre-trott
Copy link
Contributor Author

Yeah, that's how I've been doing it. I was just wondering if it was possible.

@juanmanzanero
Copy link
Owner

Sorry again. I have opened an issue on this matter too.

@pierre-trott
Copy link
Contributor Author

No worries, I understand that everything is still under construction.
I'm happy to help improve the tool

This PR adds one circuit.
Track limits (left and right) have been constructed with Google Earth and exported to kml files (included). Both kml are post processed using fastest-lap Python command:

fastest_lap.circuit_preprocessor(options)

to produce a single .xml file included.

Track:
- Sachsenring

Added Jupyter Notebooks for the following tracks:
- Hungaroring
- Jarama
- Pau ville (city track)
- Vallelunga
- Varano
- Zolder
- Sachsenring
@pierre-trott
Copy link
Contributor Author

New commit with the Notebooks for all tracks + Sachsenring.

Let me know if it's all okay.

@juanmanzanero juanmanzanero merged commit a74cd15 into juanmanzanero:main Jul 28, 2022
@juanmanzanero
Copy link
Owner

Amazing! Thank you very much Pierre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants