open-rmf/rmf-web

Can not see the RMF Map and Robots from another computer through my IP, that are in http://localhost:3000 in my computer, but I can see React Web App.

Closed this issue · 2 comments

While I am trying to develop RMF Web Application, I would like to see my web project that located in http://localhost:3000 from another computer trying to see from my IP address. I can see the react app that I've developped but I can not see the Map and Robots that in the RMF. I am using docker contianer to store all the RMF and RMF Web Project. Where can be the problem. RMF or the connection between them.

Have you opened your browser console to see if you're getting connection errors?

By default, the react app points to 'http://localhost:8000' for REACT_APP_RMF_SERVER and 'ws://localhost:8006' for REACT_APP_TRAJECTORY_SERVER. 'localhost' will be different on your 'other computer'. You need to change where those are directed in the .env file (packages/dashboard/.env). You should point them to http://<host.ip.address>:8000 and ws://<host.ip.address>:8006, where <host.ip.address> is the IP address of the machine that is running rmf-web and the demo (e.g., http://10.0.2.0:8000).

This will point the react app to the right places, but the rmf api server will still not be accessible until you change its config. This can be done in a few ways, but you can simply change the 'host' param in default_config.py just to try it (packages/api-server/api_server/default_config.py). 'host' is set to 127.0.0.1 by default, which only allows connections from the machine running the api-server. You can change it to 0.0.0.0 which will allow connections from any other network connected machine.

Thanks for response I have fixed the bug and It is working now. Thanks again