mjxu96 / carlaviz

Visualize carla in the web browser
MIT License
259 stars 60 forks source link

Unable to see Carlaviz on the web browser #18

Closed MS012086 closed 1 year ago

MS012086 commented 3 years ago

Dear Mjxu96,

I am trying to explore the Carla On Linux platform(Ubuntu 18.04). Please find attachment, unable to see the Carla Visualizer in the web browser. I followed your steps, for your reference see below the website

Reference website: https://github.com/wx9698/carlaviz#carlaviz- https://github.com/wx9698/carlaviz/tree/master/examples https://carla.readthedocs.io/en/latest/plugins_carlaviz/#carlaviz

I don't know what I have missed, I am not able to see the carlaviz on the web.

Can you please advise me, what to do next step?

Test Platform: Carla Version: 0.9.9 Linux-Ubuntu: 18.04 Python 3.7

Steps followed:

  1. ./CarlaUE4.sh
  2. Pull and launch docker image status: docker pull mjxu96/carlaviz:0.9.9 0.9.9: Pulling from mjxu96/carlaviz Digest: sha256:d3e64f97afe0bf158f4897c262e1a271b8737ee8521fb2ae554243ada7afe5bd Status: Image is up to date for mjxu96/carlaviz:0.9.9
  3. docker on Linux and Carla server is running on localhost:2000 docker run -it --network="host" -e CARLAVIZ_HOST_IP=localhost -e CARLA_SERVER_IP=localhost -e CARLA_SERVER_PORT=2000 mjxu96/carlaviz:0.9.9
  4. Open the localhost: http://127.0.0.1:8080/
  5. python3 spawn_npc.py -n 10 -w 5 ERROR: Spawn failed because of collision at spawn position ERROR: Spawn failed because of collision at spawn position spawned 10 vehicles and 3 walkers, press Ctrl+C to exit.
  6. python3 manual_control.py

Finally, Unable to see Carlaviz on the web browser.

Thanks & Regards, Saravanan

carlaviz While_Simulation While_Simulation1

mjxu96 commented 3 years ago

Hi, when you ran only spawn_npc.py, did you see any visualization in the browser? Could you paste the backend output if you did not see it when only running spawn_npc.py?

MS012086 commented 3 years ago

Hi,

Qns: when you ran only spawn_npc.py, did you see any visualization in the browser?

Ans: NO

When i run "python3 spawn_npc.py -n 10 -w 5" following error message is received.

Saravanan@D-12680:~/Documents/Carla-Setup/CARLA_0.9.9.4/PythonAPI/examples$ python3 spawn_npc.py -n 10 -w 5 ERROR: Spawn failed because of collision at spawn position ERROR: Spawn failed because of collision at spawn position spawned 10 vehicles and 3 walkers, press Ctrl+C to exit. ^C
destroying 10 vehicles

destroying 3 walkers

done.

After that, I reduced the number vehicles and walkers."python3 spawn_npc.py -n 2 -w 1" Saravanan@D-12680:~/Documents/Carla-Setup/CARLA_0.9.9.4/PythonAPI/examples$ python3 spawn_npc.py -n 2 -w 1 spawned 2 vehicles and 1 walkers, press Ctrl+C to exit.

After that I am able to see the two vehicles and walkers in Carla Server.

And then I try to run, "python3 manual_control.py" --> pygame window is open but I am not able to see web browser any information, it is blank.

Qns:Could you paste the backend output if you did not see it when only running spawn_npc.py? Ans: Can you please advise me, where the backend output data log is storing, to share it to you.

I just tried to run in carlaviz-master-->examples, following messages are received.

Saravanan@D-12680:~/Documents/Carla-Setup/CARLA_0.9.9.4/carlaviz-master/examples$ python3 carla_painter.py Saravanan@D-12680:~/Documents/Carla-Setup/CARLA_0.9.9.4/carlaviz-master/examples$ python3 example.py [INFO] [PAINTER] [2021-02-17 21:47:52,585] : Begin to connect to drawing server at localhost:8089 [INFO] [PAINTER] [2021-02-17 21:47:52,688] : Connected to drawing server at localhost:8089

I am sharing to you some information. When docker run "docker run -it --network="host" -e CARLAVIZ_HOST_IP=localhost -e CARLA_SERVER_IP=localhost -e CARLA_SERVER_PORT=2000 mjxu96/carlaviz:0.9.9"

Saravanan@D-12680:~/Documents/Carla-Setup/CARLA_0.9.9.4$ docker run -it --network="host" -e CARLAVIZ_HOST_IP=localhost -e CARLA_SERVER_IP=localhost -e CARLA_SERVER_PORT=2000 mjxu96/carlaviz:0.9.9 Make sure you have launched the carla server. Launching backend. 2021-02-17 15:59:49 [INFO] Connecting to Carla Server on localhost:2000... 2021-02-17 15:59:49 [INFO] Connected to Carla Server, Server version is: baf43b07 WARNING: Version mismatch detected: You are trying to connect to a simulator that might be incompatible with this API WARNING: Client API version = 0.9.9 WARNING: Simulator API version = baf43b07 2021-02-17 15:59:50 [INFO] Waiting for a drawing client to connect. Listening to port 8089.... 2021-02-17 15:59:50 [INFO] Waiting for a frontend to connect. Listening to port 8081.... 2021-02-17 15:59:50 [ERROR] bind: Address already in use Backend launched. Launching frontend yarn run v1.22.4 warning package.json: No license field $ webpack-dev-server --host 0.0.0.0 --disable-host-check --env.live --progress --hot --open 10% building 1/1 modules 0 activeℹ 「wds」: Project is running at http://0.0.0.0:8082/ ℹ 「wds」: webpack output is served from / ℹ 「wds」: Content not from webpack is served from /home/carla/carlaviz/frontend 10% building 3/5 modules 2 active .../webpack/hot sync nonrecursive /^.\/log$/Browserslist: caniuse-lite is outdated. Please run the following command: yarn upgrade 67% building 1164/1222 modules 58 active ...ode_modules/ajv/lib/dotjs/custom.jsFrontend launched. Please open your browser ℹ 「wdm」: Hash: 2843381ccb5ee862e2bf Version: webpack 4.42.0 Time: 9373ms Built at: 02/17/2021 4:00:10 PM Asset Size Chunks Chunk Names 573fe91c6c748074195655e1f0159864.png 7.61 KiB [emitted]
bundle.js 9.36 MiB app [emitted] app bundle.js.map 11.5 MiB app [emitted] [dev] app Entrypoint app = bundle.js bundle.js.map [0] multi (webpack)-dev-server/client?http://0.0.0.0:8082 (webpack)/hot/dev-server.js ./src/app.js 52 bytes {app} [built] [./node_modules/@deck.gl/core/dist/esm/index.js] 2.78 KiB {app} [built] [./node_modules/@deck.gl/layers/dist/esm/index.js] 1.01 KiB {app} [built] [./node_modules/@streetscape.gl/monochrome/dist/esm/index.js] 560 bytes {app} [built] [./node_modules/react-dom/index.js] 1.33 KiB {app} [built] [./node_modules/react/index.js] 190 bytes {app} [built] [./node_modules/streetscape.gl/dist/esm/index.js] 78 bytes {app} [built] [./node_modules/strip-ansi/index.js] 161 bytes {app} [built] [./node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:8082] (webpack)-dev-server/client?http://0.0.0.0:8082 4.29 KiB {app} [built] [./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.51 KiB {app} [built] [./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.53 KiB {app} [built] [./node_modules/webpack-dev-server/client/utils/createSocketUrl.js] (webpack)-dev-server/client/utils/createSocketUrl.js 2.91 KiB {app} [built] [./node_modules/webpack-dev-server/client/utils/log.js] (webpack)-dev-server/client/utils/log.js 964 bytes {app} [built] [./node_modules/webpack/hot/dev-server.js] (webpack)/hot/dev-server.js 1.59 KiB {app} [built] [./src/app.js] 10.6 KiB {app} [built]

Thanks & Regards, Saravanan

mjxu96 commented 3 years ago

Sorry for the late reply. It seems that one of the port are being occupied in your local machine. Could you check for it?

2021-02-17 15:59:50 [INFO] Waiting for a drawing client to connect. Listening to port 8089....
2021-02-17 15:59:50 [INFO] Waiting for a frontend to connect. Listening to port 8081....
2021-02-17 15:59:50 [ERROR] bind: Address already in use

By the way, could you have a try with Chrome instead of other browsers?