ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Rosbridge server websocket secure

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

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

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-08-23 04:14:53 -0600

Den gravatar image

updated 2021-08-24 03:07:23 -0600

There is another answer that worked for me: https://answers.ros.org/question/1986...

Go to https://localhost:9090/ in the browser of your choice, you will be prompted with an error that says this is an insecure site. Keep clicking on links that says something to the effect of "go to site anyway". Finally you would see a blue screen that says: "AutoBahn Python"

Personally, this does not feel like the most secure and proper way to do things, but for the time being it works!

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-05-12 23:19:18 -0600

Seen: 2,533 times

Last updated: Aug 24 '21