Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webviz won't connect to robot? #423

Closed
adimehrotra opened this issue May 9, 2020 · 27 comments
Closed

webviz won't connect to robot? #423

adimehrotra opened this issue May 9, 2020 · 27 comments

Comments

@adimehrotra
Copy link

Hello I'm, trying to use WebViz for a project and I'm not sure what is going on/why it is not working.

I have a remote websocket running for my ROS robot at ws://192.168.1.24:9090 and I changed the ports and URL and everything so I ran https://webviz.io/app/?rosbridge-websocket-url=ws://192.168.1.24:9090/ in the web browser.

And I went to google chrome settings and changed the settings to allow insecure connections. What am I doing wrong here? Why can't I get webviz to connect to a remote websocket?

@jtbandes
Copy link
Contributor

jtbandes commented May 9, 2020

What errors are you seeing?

@adimehrotra
Copy link
Author

I'm not seeing any errors which is why I'm confused. When I tried to connect to this web-socket using ROSWEB it connected fine and I was able to get data out of the system. And then if I look on my robot itself the rosbridge outputs to /rosout "one client connected." or something similar

I went to webviz and put in the same ws url, and /rosout showed no message that there was a client connected?

@adimehrotra
Copy link
Author

For reference: this works: https://github.com/EESC-LabRoM/rosweb

@adimehrotra
Copy link
Author

For a little more information: I brought up a Raw Messages panel on the webviz and typed /joy to see the raw messages for /joy that's what I started with trying (my bigger issue is that I don't see the client connected though as I described above)

@janpaul123
Copy link
Contributor

What version of rosbridge_server are you running?

@adimehrotra
Copy link
Author

I just went here: http://wiki.ros.org/rosbridge_suite/Tutorials/RunningRosbridge and did sudo apt install ros-melodic-rosbridge-suite ... does that give me the latest version? How would I check?

@janpaul123
Copy link
Contributor

You can check by running apt policy ros-melodic-rosbridge-server. Which version gets installed when you run apt install depends on a bunch of things.

@adimehrotra
Copy link
Author

Screen Shot 2020-05-11 at 7 00 32 PM

Here is the version (I think it's 0.11.5-1bionic.20200413.152945). Thanks for the info :)

@janpaul123
Copy link
Contributor

Hm, that version should be fine. 0.11.6 is the latest, but 0.11.5 should work. Could you maybe record a video of what's happening? If we can't figure it out from that, I might be able to set you up with a screenshare with someone on our team.

@adimehrotra
Copy link
Author

Hey! Here's a link to the video I recorded, I'm ssh'ed into the robot from VS Code and then the google Chrome is on my macbook.

https://www.adim.io/post/chip-updates-websocket-won-t-work-updates

@adimehrotra
Copy link
Author

let me know if you need more information?

@janpaul123
Copy link
Contributor

Hm not sure, can you email me at jp.posma@getcruise.com and we can do a screen share.

@flynneva
Copy link

flynneva commented May 12, 2020

try passing the devices IP address to the rosbridge_webserver. it looks like right now you're just passing in the default which is localhost.

I think it is working for the ROSWEB site because it is an http site, not an https.

also, look into these other topics which seem similiar:

@adimehrotra
Copy link
Author

I'll definitely try adding the IP to rosbridge_webserver, but I also enabled "use unsafe scripts" for webviz on chrome will that not fix the security issue with https?

@adimehrotra
Copy link
Author

Are you saying I need to do : https://answers.ros.org/question/198647/rosbridge-websocket-ssl-connection-aborted/ kind of stuff to setup ssl?

@flynneva
Copy link

flynneva commented May 12, 2020

my comment above was just providing some comments on where I would go if I was debugging your setup. since all we have is just a video to debug from and its not entirely clear what the issue is, I cant really say what will solve your problem.

@adimehrotra
Copy link
Author

thanks for the info :) I was just wondering if saying my robot was running a jetson tx1 does that change anything? realized I haven't mentioned that and that I know they're kinda weird.

@flynneva
Copy link

I know this kind of defeats the purpose of what you are trying to do...but a good debug step would be to test webviz locally on the jetson tx1 (if you can hook it up to a monitor & get a browser open). if that works, then it most likely is an issue with the security (https vs http) as linked above.

@adimehrotra
Copy link
Author

Ah. This was a good suggestion! I did hook it up and run a local test and it does work locally so I think you're right on the ssl permissions side. I'm speaking with JP in a few minutes and I think we'll come up with a solve - if not I'll re-post here if we do, I'll close the issue :) Thanks so much for your help.

@adimehrotra
Copy link
Author

JP called me and we fixed the problem - thank you so much t of both of you - it was lovely meeting you guys!

@janpaul123
Copy link
Contributor

For future reference, we had to do this:

A modal with this image + some instructions should have been shown though, so that's a bug that I'll have to look into. Nice meeting you too Adi!

@jaguardo
Copy link

jaguardo commented Dec 9, 2020

I'm not seeing that option on any of the browsers I've tried... is there a browser setting to change?

@jaguardo
Copy link

jaguardo commented Dec 10, 2020

So for those that are interested, for Chrome I had to do a few extra steps... I wasn't getting the "sheild" and at first I was getting the "Secure" symbol on Chrome:
image
even when I added the ip address to another computer on the network. makes it appear everything is ok... unfortunately it will not load!! with no warning on why...

https://webviz.io/app/app/?rosbridge-websocket-url=ws://xxx.xxx.x.xxx:9090

so, by clicking on the "lock"
image
and opening site settings:
image
I can set chrome for that website to allow insecure content:
image
you can now reload the page (Chrome will pimp you to do this anyways)
now, when you load the basic website:

https://webviz.io/app/

you will still see the traditional lock, but when you use the alternative address for an ip, you will not get the lock, but a nice "not secure" warning and the shield as you would in previous editions of chrome?
image
now by clicking on the shield you can load those scripts:
image
hope it helps someone!

@vidaaudrey
Copy link
Contributor

Thank you @jaguardo for documenting the details.

@marcelino-pensa
Copy link

marcelino-pensa commented Dec 29, 2020

Would it be possible to add a link to this issue in the error message that webviz.io/app displays? I spent quite a bit of time trying to figure out why my shield wasn't showing up, which could be easily solved by visiting this page (I had to google very specifically to end up in here)

@cjds
Copy link

cjds commented Apr 9, 2021

@vidaaudrey do you mind if I make a PR that updates the help?

@vidaaudrey
Copy link
Contributor

@cjds thank you! Please feel free to make a PR for this and tag me for reviewing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

8 participants