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

OpenDrive <> Metadrive Integration #741

Open
abanuelo opened this issue Jul 10, 2024 · 0 comments
Open

OpenDrive <> Metadrive Integration #741

abanuelo opened this issue Jul 10, 2024 · 0 comments

Comments

@abanuelo
Copy link

Hi team, regarding the currently supported OpenDrive <> Metadrive implementation I was going through trying to get it working with a custom MetaDriveEnv and defining a CustomMapManager off the BaseManager class that would explicitly parse an OpenDrive file and use that as a way for an agent to navigate the map. I see in your test folder you have support for CARLA's Town01.xodr file and I have confirmed that the parsing that files as explicitly seen here.

Here is the working code,
Screenshot 2024-07-10 at 11 45 07 AM

def load_map(self):
        self.global_network = OpenDriveRoadNetwork()
        self.map_data = load_opendrive_map(self.metadrive_map)
        for road in self.map_data.roads:
            for section in road.lanes.lane_sections:
                block = OpenDriveBlock(len(self.blocks), self.global_network, 0, section)
                block.construct_block(self.engine.render, self.engine.physics_world)
                self.blocks.append(block)

Now that the blocks have been read, what are the best practices to make this into a map for the MetaDriveEnv environment? I am finding the documentation quite sparse on this matter and I know that the existing interface is a WIP according to the docs so please let me know!.

Thanks!

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

No branches or pull requests

1 participant