Browser Streaming Robot problems


#1

I’ve encountered a number of problems trying to get the browser streaming robot example to work. I’ve followed all of the instructions given here on the site, but I think I must have an incomplete or incorrect installation of the necessary software. First, I was missing the Tornado server software. After I installed that, I found that I was missing sockjs.tornado. I tracked that down on github and installed it. From there, the web server starts, but here’s what happens when I try to connect with a browser:

Starting web server…
200 GET / (192.168.1.21) 88.45ms
200 GET /js/jquery.joystick.js (192.168.1.21) 17.51ms
200 GET /css/style.css (192.168.1.21) 20.22ms
200 GET /css/modal.css (192.168.1.21) 17.28ms
200 GET /js/sockjs-0.3.min.js (192.168.1.21) 109.98ms
200 GET /js/jquery.js (192.168.1.21) 364.17ms
200 GET /images/ajax-loader.gif (192.168.1.21) 18.23ms
200 GET /robot_control/info (192.168.1.21) 10.73ms
404 GET /favicon.ico (192.168.1.21) 11.36ms
WebSocket
Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/sockjs_tornado-1.0.1-py2.7.egg/sockjs/tornado/transports/websocket.py”, line 60, in on_message
self.session.on_messages(msg)
File “/usr/local/lib/python2.7/dist-packages/sockjs_tornado-1.0.1-py2.7.egg/sockjs/tornado/session.py”, line 423, in on_messages
self.conn.on_message(msg)
File “./robot_web_server.py”, line 114, in on_message
cameraStreamer.startStreaming()
File “/home/pi/Desktop/GoPiGo/Software/Python/Examples/Browser Streaming Robot/camera_streamer.py”, line 79, in startStreaming
[ “/usr/local/bin/raspberry_pi_camera_streamer” ] )
File “/usr/lib/python2.7/subprocess.py”, line 679, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
SockJS connection closed


I can’t get past this…I’m stumped. I’d appreciate any help or suggestions. This is the only one of the Python examples I’ve had any problems with.

Thanks!

Peter


#2

Hi Peter,
Can you try running the script directly like: ./robot_web_server.py after you make it executable.

Let us know if this works.


#3

Just to follow on Karan, make it executable with chmod command.


#4

Same problem, unfortunately.

In Terminal I typed:
sudo chmod +x robot_web_server.py
then
sudo ./robot_web_server.py

After the web server starts, I get what I included in my initial post (and after that it seems to be looping with the same error).

Peter


#5

Hi Peter,
Did you run the setup script for that example https://github.com/DexterInd/GoPiGo/blob/master/Software/Python/Examples/Browser%20Streaming%20Robot/browser_stream_setup.sh
This installs all the packages needed for the example to run properly.

-Karan


#6

Duh. I had overlooked that setup script. So now I’ve run the script, but am still having problems getting everything going. When I type "sudo ./robot_web_server.py ", the right motor starts up, but that’s about it. I’m unable to get a browser to connect to raspberrypi.local – I’ve tried Safari on my Mac and iPhone, and Chrome and Firefox on my Mac. Maybe I need to start over? I have a feeling that I’ve installed components for this example all over the place.

Thanks.

Peter


#7

Hi Peter,
Yeah, this is the most complex of the examples and it would be great if you could use a clean Image or a Dexter Industries Image, else just follow the instructions step by step and it should work out for you.

-Karan