Can't establish connection to Web Server using rosbridge
I have created a simple HTML page to control the movement of a simulated Gazebo Turtlebot using roslaunch rosbridge_server rosbridge_websocket.launch
following this tutorial.
However, in the Web Console of the HTML page (F12) it shows the error "Firefox cant establish a connection to the server at ws://localhost:9090/." I am using the default rosbridge for the websocket(9090). In the Terminal I am also receiving the errors:
[-] failing WebSocket opening handshake ('WebSocket connection denied: origin 'null' not allowed')
[-] dropping connection to peer tcp4:127.0.0.1:41290 with abort=False: WebSocket connection denied: origin 'null' not allowed.
Running ROS Melodic on Ubuntu 18.04
I have the same problem¡¡¡, and i don't know hoy to solve it :(
Same error on other browser?
I have the same error on chromium, but in this case, is:
I just tested exactly how it is outlined in the tutorial you used and it worked for me except that I needed to change URL of roslibjs and EventEmitter2 scripts as specified in official ROS tutorial.
As far as localhost connection everything worked. There must be something on your PC preventing local connection. Are you following exactly tutorial exactly and running ROS on the host and not inside of Docker container for example ?
I just realized that I am running with Chrome browser on Ubuntu 16.04 though so maybe Chrome browser is stricter with more web security features running on newer Ubuntu OS... or ROS Melodic web socket server has stricter web security features...
In my code I have exactly the URL that specified in ROS tutorial, and don't work :(
On Chrome I receive this error in the Web Console :
WebSocket connection to 'ws://0.0.0.0:9090/' failed: Establishing a tunnel via proxy server failed. d.connect @ roslib.min.js:1
but no error in Terminal.try install rosbridge 0.11.1
https://github.com/RobotWebTools/rosb...
It makes me an error when I execute the launch file rosbridge_websocket.launch