Skip to content

Move edt as part of track asset#117

Open
hzheng40 wants to merge 10 commits intov1.0.0from
dev_edt_asset
Open

Move edt as part of track asset#117
hzheng40 wants to merge 10 commits intov1.0.0from
dev_edt_asset

Conversation

@hzheng40
Copy link
Copy Markdown
Member

@hzheng40 hzheng40 commented Feb 28, 2024

Addresses #107

  1. Added edt as part of track assets that are downloaded
  2. Fixed path where maps are saved and loaded from
  3. Load EDT if available instead of creating on the fly every time, should be quite a bit of speed up for set_map()
  4. Added example script for creating the EDT for a track

@hzheng40 hzheng40 added the enhancement New feature or request label Feb 28, 2024
Copy link
Copy Markdown
Member

@nandantumu nandantumu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good, but have a few questions

Copy link
Copy Markdown
Collaborator

@luigiberducci luigiberducci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

I would integrate the creation of EDT directly into the track loading.
We can keep this as an example anyway or get rid of it.

@luigiberducci
Copy link
Copy Markdown
Collaborator

@hzheng40 I have added a test for a kind of corner case we discussed in the last meeting. The changes proposed should address it.

Scenario:
The EDT has been created, then the user modifies the map (e.g., add obstacles manually).
Now there is a mismatch between the map image and the EDT and the simulator will load the old EDT.

Current behavior:
The simulator will load an outdated dt.

Expected behavior:
The EDT must be recomputed and override the old one.

Copy link
Copy Markdown
Collaborator

@luigiberducci luigiberducci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple of changes necessary

@@ -0,0 +1,41 @@
from f110_gym.envs.track import Track
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from f110_gym.envs.track import Track
from f1tenth_gym.envs.track import Track

if no map directory matching the track name is found
"""
map_dir = pathlib.Path(__file__).parent.parent.parent.parent / "maps"
map_dir = pathlib.Path(__file__).parent.parent.parent.parent.parent / "maps"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this? it does not point to the right "maps" directory in this way

Suggested change
map_dir = pathlib.Path(__file__).parent.parent.parent.parent.parent / "maps"
map_dir = pathlib.Path(__file__).parent.parent.parent.parent / "maps"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants