Rosbridge server websocket secure

asked 2021-05-12 23:19:18 -0500

rmango gravatar image

Hi, I'm trying to get my local rosbridge websocket server to run using websocket secure. This would mean accessing it with the url "wss://localhost:9090" instead of "ws://localhost:9090"

I've tried doing something similar to this project: https://github.com/UbiquityRobotics/s.... I've set up my certificates exactly like theirs, and to run my rosbridge server I use the command: roslaunch rosbridge_server rosbridge_websocket.launch ssl:=true certfile:=/etc/ssl/certs/ssl-cert-snakeoil.pem keyfile:=/etc/ssl/certs/ssl-cert-snakeoil.key authenticate:=false.

This does give me the message Rosbridge WebSocket server started at wss://0.0.0.0:9090. However, when I go to use this link in my roslibjs interface, I get the error Websocket connection to 'wss://localhost:9090' failed.

This is what my roslibjs code looks like: self.ros = new ROSLIB.Ros({ url: 'wss://localhost:9090'}); Everything works with the "ws://" version of the url.

How do I get a rosbridge websocket server to run using websocket secure? Thanks!

edit retag flag offensive close merge delete