Error in Browser Streaming Robot

Hi,

I have a fully assembled GoPiGo with a Picamera and a ultrasonic sensor, mounted on a servo. I tried to follow the instructions in
http://www.dexterindustries.com/GoPiGo/projects/python-examples-for-the-raspberry-pi/raspberry-pi-browser-streaming-robot/
but get an error in step 3:

Step 1: cd Desktop/GoPiGo/Software/Python/Examples/Browser Streaming Robot/
-> this works fine

Step 2: sudo chmod +x robot_web_server.py
-> this works fine

Step 3: sudo ./robot_web_server.py
Traceback (most recent call last):
File “./robot_web_server.py”, line 75, in <module>
import tornado.httpserver
ImportError: No module named tornado httpserver

Does anyone know what the problem is?

Thanks, Tom

You may not have the “tornado” python module installed.

Try the command “pip install tornado”. If that doesn’t fix it, take a look at http://www.tornadoweb.org/en/stable/

thank you very much, now I could run step 3 successfully, it says “Starting web server…” in the terminal.

However, when I type “raspberry.local” in the browser (Safari or Chrome), I can’t connect, nothing happens.

Any idea what the problem is?

Thanks!

That tutorial needs updating.
Take a look at this post:http://www.dexterindustries.com/topic/tornado-errors-in-browser-streaming-robot/#post-91950

Are you using Raspbian for Robots? Regular Raspbian from the Raspberry Pi will not have all the tools on it for this project to work. With Raspbian for Robots, the default hostname is now dex, so you would have to go to http://dex.local

Thank you for your reply. Yes I have Raspbian for Robots, downloaded from the Dexter webpage. I installed sudo pip install sockjs.tornado and I can see joystick on the right side of the screen when typing “http://dex.local:98/” in Chrome, however, I can’t see any video stream from the camera. In Safari and Firefox, I can’t see anything, even not the joystick on the right hand side.

How can I see the video stream?

Thanks!

Hello
I don’t have it up and running right now, but I seem to remember the camera feed is on
http://dex.local:8080/

Hey Tom,
I think we moved the browser streaming example to port 98 after there were conflicts with the normal screen that with the shellinabox and noVNC we have running on dex.local.

Can you post the output that you get on the terminal when you run the python code.

-Karan

If you are following the tutorial on the website, a key step seems to be missing

cd Desktop/GoPiGo/Software/Python/Examples/Browser_Streaming_Robot
sudo bash browser_stream_setup.sh

It’s a fairly long install, time enough for a cup of coffee. But it installed everything I needed to run the project

Also note that if you’re using Raspbian for Robots, the hostname will be dex, and not raspberrypi like the tutorial mentions

Hi,

After following steps in this thread, and I am using the Dexter raspberry image. However I still run into the following error

"mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera (1:EN OMEM) Failed to create camera component"

Here is my journey: I first run into the missing tornado issue. Then I followed the suggestion and installed ‘sudo bash browser_stream_setup.sh’. The installation was successful and I restarted the pi. Then I run the ‘sudo ./robot_web_server.py’ command. Everything seems fine and it says ‘…starting web server’. Then I opened the browser and went to ‘http://dex.local:98/’. However, the terminal starts to show the above error.

See attachment for detailed error message.

I had that error once before. And it’s bad news.
The issue is a defective camera. Hopefully in your case, the camera simply isn’t securely plugged in. In my case it was a dead cable (I had a severe kink in it)

How comfortable are you with Python?
If you’re at ease, let’s try this:
Open a terminal window, and type in
python
You will get a different prompt like >>
Type in

import picamera
p = picamera.PiCamera()

if you get an error here, then your camera is defective (or not plugged in properly), unfortunately.

Cleo

Hi Cleo,

Thank you for the pointers. I tried the python method and it seems like I still get an error. Meanwhile, a red light on the camera turns on. Can you please have a look at the attachment? Does this mean that the camera is defective? I have checked that the connection between camera and Raspberry is good.

Thanks!

Agreeing with CleoCQ here it looks like the camera is damaged. How and where did you purchase it?

That is bad news :frowning: I bought it from Amazon. I have now requested a return. Thank you all for your help.

Best, NK

Oh I just thought of another possibility! Is the camera enabled on your SD card? If you’re running Raspbian for Robots, it will be. But if you’re running pure Raspbian or NOOBS, then it is not.

Start a terminal window and type in
sudo raspi-config

Now you can change a lot of things in here and many will render your GoPiGo half-functioning, so it’s best not to start playing around

Option 6 is Enable Camera. Use your down arrow key to reach it, then press Enter
Using your left/right arrows, make sure that Yes is selected and press Enter. You’ll have a confirmation that the camera is now emabled. Press Enter to go back to the main menu. Using your right arrow key, select Finish, and press Enter. Now we know for sure that the camera is enabled.