Closed gc-robotics closed 3 years ago
Hi Brett,
Not sure if I am on the right track, but it looks like the code hangs pending here:
self.conn = await websockets.connect(self.server, ssl=sslctx)
(webrtc_transport_ws.py)
Any idea why?
Thanks.
The WebRTC example is probably the least polished thing in this repo.
You need to start Nirbheek's browser example first, then feed the ID from the browser into the ROS config, then launch the node.
At that websockets line it's waiting for python to connect to Nirbheek's websocket demo server. Probably check out Nirbheek's websocket demos and have a go without ROS first, their efforts are amazing.
Ideally, I'd like a demo that isn't relying on someone else's demo servers
Hi @BrettRD , thanks for the reply.
Yep, I have understood how the handshake workflow works. I tried it manually on Nirbheek.in.
Unfortunately, as mentioned, my problem is that websockets.connect hangs. No timeout. No failure. No success. Just hangs. And the handshake is not completed.
I am trying to figure out why, but I have no idea for the moment.
If you have any suggestion, please let me know.
Thanks for your patience on this one, the bug was in the async behaviour of the pipeline.py While it was busy spin()ning for the ROS node, it locked the websocket out of completing a connection Fixed in commit 7ea98dcebd67dd7438b8f536665406f3982715e7
Hi Brett,
I am now trying the WebRTC bin. Havent made many changes to your config file - it's basically the same:
No errors in the logs, even with GST_DEBUG = 4 or 5. I have just this bin running, nothing else that could interfere.
I tried webrtc.nirbheek.in to connect to the peer that should have been created by webrtc_bin but it says "Peer not found".
I am not completely sure if I did the right thing to set peer and node ID to the same value. Not 100% sure what node ID refers to (ros? gst?)
However, I believe the problem is somewhere else. It looks like it is not making an out call at all. Netstat shows that only the webpage/firefox webrtc client (nirbheek) is running:
alpha@regulus:~$ netstat -nputw | grep 8443 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 192.168.8.100:58476 176.58.110.251:8443 ESTABLISHED 400734/firefox
I see from the source that once a connection is established with STUN, then we should get a callback:
but I can see from the log that I never get that message.
The only logs that are webrtc_bin related to init are:
Any suggestion this time?
Thanks in advance! Cheers, G.