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

Cannot load map and other problems... #34

Open
1Jyfc opened this issue Feb 14, 2023 · 10 comments
Open

Cannot load map and other problems... #34

1Jyfc opened this issue Feb 14, 2023 · 10 comments

Comments

@1Jyfc
Copy link

1Jyfc commented Feb 14, 2023

Hi SORA-SVL team!

After setting up, I run my simulation with Apollo 6.0 and failed, with the problem like this:
Screenshot from 2023-02-14 22-16-41

After reading #3 #4 #33 , I check my config as they did, and it seems nothing is wrong. Besides, other maps, like Airport in #4 , caused the same problem. Here is my configuration:

  • Download hdmaps, maps, plugins, preview and vehicles into server/assets
    Screenshot from 2023-02-14 22-25-30

  • Download geojson.json into mongo/setup
    Screenshot from 2023-02-14 22-26-56

  • Maps are like this, without .zip
    Screenshot from 2023-02-14 22-27-43

  • Run docker compose up --build -d

  • Run SVL with API-Only mode, and start simulation by sim.load(aae03d2a-b7ca-4a88-9e41-9035287a12cc, -1)

Here aae03d2a-b7ca-4a88-9e41-9035287a12cc is the cid of BorregasAve, like #4 mentioned. After these operations it still failed. Do you know the reason that causes this problem?

Besides, I run Apollo and SVL on the same device. After running docker compose up --build -d to build SORA, I cannot start docker containers of Apollo, which currently can only be solved by reinstalling docker. Have you ever encountered this problem? Or do you think the problem about loading maps is related to this problem? Looking forward to your reply, thanks so much!

@YuqiHuai
Copy link
Owner

YuqiHuai commented Feb 14, 2023

I just tested everything last night and didn’t have issues with loading borregas. Can you take a look at #11 (comment) and see if this is the problem for you?

what is the error message when you couldn’t start Apollo container?

Here is the code I run to load Borregas Ave.

import lgsvl
from environs import Env

# connect to simulator

sim = lgsvl.Simulator(
    env.str("LGSVL__SIMULATOR_HOST", lgsvl.wise.SimulatorSettings.simulator_host),
    env.int("LGSVL__SIMULATOR_PORT", lgsvl.wise.SimulatorSettings.simulator_port)
)

# load scene and show spawns

sim.load('aae03d2a-b7ca-4a88-9e41-9035287a12cc') # Borregas

print(f'Current Scene = {sim.current_scene}')
print(f'Current Scene ID = {sim.current_scene_id}')

spawns = sim.get_spawn()
for spawn in sim.get_spawn():
    print(spawn)

@YuqiHuai
Copy link
Owner

YuqiHuai commented Feb 14, 2023

I have added a script under toolset to help verify the set up https://github.com/YuqiHuai/SORA-SVL/blob/main/toolset/verify_setup.py

You can also try accessing http://localhost/api/v1/assets/download/bundle/4552b7ac-4fba-4420-88b8-ae14289bf5ac to see if you can download the asset from the server container. The URL provided above is the asset for borregas ave.

@1Jyfc
Copy link
Author

1Jyfc commented Feb 15, 2023

Thanks for your reply! I tried all methods you said and seems everything is right, with all files in assets/, and verify_setup.py run successfully. Also I can download a map asset at http://localhost/api/v1/assets/download/bundle/4552b7ac-4fba-4420-88b8-ae14289bf5ac.

Could you tell me the version of your SVL? I use version 2021.1.1 and I wonder if this version is too old, or if this version can run normally on your device. Thanks so much!

@YuqiHuai
Copy link
Owner

If you are able to download an asset file, that means the server is correctly running. There might be some issues with different versions of SVL, but I am unsure.

I am using the latest (2021.3). Is there any specific reason you need 2021.1?

@1Jyfc
Copy link
Author

1Jyfc commented Feb 16, 2023

Hello! I use version 2021.3 and can load the map now. In fact I use version 2021.1.1 because my experiment needs to restart simulation again and again, and version 2021.3 seems to have some connection problems with Apollo 6.0, so I use version 2021.1.1 instead.

Thanks for your reply and my problem is currently solved. But if you have the will to try version 2021.1.1, I still wonder if SORA can work on other versions of SVL. Thanks so much!

@YuqiHuai
Copy link
Owner

Glad to hear maps are loading now.

Can you elaborate on what kind connection problem are you having? I have been running into Dreamview being broken after many socket communications and I haven’t able to solve this yet.

Unfortunately I don’t have much experience in Unity therefore I don’t plan to work on supporting older version of SVL. I can take a quick look but I doubt I’ll be able to figure out what is breaking the downloading mechanism.

@1Jyfc
Copy link
Author

1Jyfc commented Feb 16, 2023

After several times of restarting the simulation by sim.reset() or sim.load(), my Dreamview will also break. I don't know the reason, but actually version 2021.1.1 doesn't have this problem, so I use it instead. Besides, sometimes the ego will run like snakes from side to side. What's more, in BorregasAve sometimes the traffic light cannot be detected by ego on the left turn lane. I reported some of these problems to SVL but they did not give satisfying answers.

Besides, I just found that the 3D ground truth module may have someting wrong. I use Apollo 6.0 (modular testing) as config of Apollo ego, it will use the ground truth of obstacles and signals. But during iterations of my program it cannot provide obstacle information on Dreamview, which caused a crash:
Screenshot from 2023-02-16 20-27-07

If right, Dreamview will show the location and predicted trajectory of NPC vehlcles around Apollo ego, but here it did not. I wonder if it is a problem of SVL 2021.3 or SORA, could you have a try? Thanks sincerely.

@YuqiHuai
Copy link
Owner

Thanks for sharing these information! Listed below are my thoughts:

  1. Dreamview breaking should have nothing to do with SVL's versioning. Since we are using the same Python API to communicate with Dreamview. Further, I have developed an ADS testing approach that does not use SVL, and Dreamview still breaks if I make too many socket communications. I had to go around Dreamview by directly communicating with cyberRT using the bridge. I cannot really think of any reason why using SVL 2021.1.1 will somehow solve the issue.
  2. I have seen the "snake movement" in simulations before, I believe this has to do with control delay, etc.
  3. I use 3D ground truth plus ego vehicle configuration provided by https://github.com/MingfeiCheng/AV-Fuzzer/blob/aa0f96c35088502189f7a9343d9ec7b0cee46b55/simulation/simulator.py#L12 This has been stable so far. I think there is some underlying issue with SVL's 3D ground truth sensor, which either causes obstacle to disappear or flash in Apollo's Dreamview. I haven't used Mingfei's configuration in SORA-SVL yet, hopefully I collected it back then 🥲

Since SVL has sunsetted, I don't think you will ever get satisfying answers. It is quiet unfortunate.

@1Jyfc
Copy link
Author

1Jyfc commented Feb 21, 2023

Hello! Sorry for replying you so late. Recent days I tried the ego configuration you provided and it seems worked like the configuration I provide before. It will not crash on NPC vehicles first, but I cannot see vehicles in Dreamview, so I do not know if they are totally correct. And after reloading several times it still crashed, and I do not know the details because of the lack of NPC vehicles in Dreamview. In cyber monitor I checked the topic of obstacles and seems that it works fine, so far I have not figure out the reason of this problem.

And I am also grateful for your answers about my other problems. Unfortunately SVL has sunsetted, so I think I need to solve them by myself when necessary.

By the way, I forgot to provide you the error about apollo docker. Actually after I restart my device, I cannot get into apollo docker. When I run ./docker/script/dev_start.sh, it will cause this problem:
Screenshot from 2023-02-21 19-43-26

And after reinstalling docker this problem will be solved. But then after building SORA and restarting my device, this problem occurred again. Currently I do not consider it as a serious problem because it only takes me several minutes to reinstall docker, but I am still curious about the reason.

Finally thank you for all you did on SORA and this issue!

@YuqiHuai
Copy link
Owner

YuqiHuai commented Feb 21, 2023

I cannot see vehicles in Dreamview

Do you mean you could not see obstacles in Dreamview? If that is the case then something seems to be wrong with the 3D ground truth sensor. Maybe give this a try? #15 (comment)

The Apollo container's error message does not seem to be related to this project. Maybe you can post it on Apollo's repository.

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

2 participants