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

The map cannot be loaded using the Python API #33

Open
shicuiduo opened this issue Feb 9, 2023 · 13 comments
Open

The map cannot be loaded using the Python API #33

shicuiduo opened this issue Feb 9, 2023 · 13 comments

Comments

@shicuiduo
Copy link

Hello, after I set up all the configuration the way you did, running the Python API script failed to load the map. The percentage of maps loaded is always 0%. Do you know what caused it? Looking forward to your reply. Thank you very much.
image

@YuqiHuai
Copy link
Owner

YuqiHuai commented Feb 9, 2023

Hi, thanks for posting an issue.

Did you follow the README instructions to download the assets and place them in the appropriate folders? This looks like the server isn't able to let the client download the asset.

@shicuiduo
Copy link
Author

Yes. I put the geojson.json file into the mongo/setup folder. Unzip hdmaps, plugins, preview, and vehicles into the server/assets folder. Download the individual map files from the maps folder in google-drive separately (not all of them, only 30) and place them into the server/assets/maps folder.Is that right?
1675928160753
1675928196982
1675928218970

@shicuiduo
Copy link
Author

shicuiduo commented Feb 9, 2023

Hey, I've fixed the above problem (The reason is that the map is not downloaded to the maps folder.).
But the WideFlatMap Map cannot be loaded (WideFlatMap has been downloaded to the maps folder), other maps can be loaded.

@YuqiHuai
Copy link
Owner

YuqiHuai commented Feb 9, 2023

Hi, I haven’t used WideFlatMap before. Is there any error messages?

@shicuiduo
Copy link
Author

There is no error message. When running the python API, the program does not print anything, and svl keeps displaying the following:
image

@YuqiHuai
Copy link
Owner

It works fine for other maps but for the specific map you mentioned the client is stuck at “APIReady”, is this correct?

@shicuiduo
Copy link
Author

shicuiduo commented Feb 12, 2023

Yes. Can you load the "WideFlatMap" map using the python api?

@YuqiHuai
Copy link
Owner

Sorry for the late response. I’m gonna work on trying to resolve this issue today.

@shicuiduo
Copy link
Author

Thank you for your reply. Recently I discovered something new: by modifying the SORA-SVL-master\mongo\setup\vehicles. json file, you can change the sensors configuration parameters of the vehicles. This is exciting news.

@YuqiHuai
Copy link
Owner

YuqiHuai commented Feb 14, 2023

@shicuiduo After some investigation, the problem was caused by Google Drive adding ".zip" at the end of each asset file for maps.

image

You can run following Python code

import os
import shutil

for x in os.listdir('.'):
    if x.endswith('.zip'):
        shutil.move(
            os.path.join('.', x),
            os.path.join('.', x[:-4])
        )

at the maps dir and remove all the ".zip".

You could have loaded some other maps because those were cached, not downloaded from the local cloud. The server was basically looking for a file named "assetGuid" but under the maps directory you had "assetGuid.zip"

@max31406
Copy link

Hello,I have the same problem about load all maps.
I used the toolset/correct_maps_dir.py ,and put the geojson.json file into the mongo/setup folder.
When I run the example/01-load_map.py first time,the terminal show
MicrosoftTeams-image
MicrosoftTeams-image (1)
and I run the example/01-load_map.py again,the terminal show
MicrosoftTeams-image (2)
MicrosoftTeams-image (3)
and it stuck

I have tried to make a new file to load map, but have the same response when sim.load is executed.
Could somebody know what should I do?

@binzhao1
Copy link

binzhao1 commented Mar 8, 2024

Download fail
image

@YuqiHuai
Copy link
Owner

YuqiHuai commented Mar 8, 2024

@binzhao1 Hi, sorry due to google drive no longer being free for my academic group account, I’m exploring alternative options to host the files. For now it is still available at #80

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

No branches or pull requests

4 participants