Pi3B Video Surveillance Performance On GoPiGo3

TL:DR Summary: Reduce FRAMERATE to 10fps to keep CPU temperature down

This was a test of Web Streaming OpenCV Motion Detection Video on a Raspberry Pi 3B GoPiGo3.

Stream PiCam video to web browser using Flask - applying OpenCV motion detection.

Carl Video Surveillance

CODE:

The code is [u]here[/u]

(Requires Python3, OpenCV 3.4 or greater)

USAGE:

./webstreaming.py -i ip.ip.ip.ip -o port [-f NN] (background frames set 32 default) (Python3, OpenCV 3.4)

PERFORMANCE

On Raspberry Pi 3B GoPiGo3 Robot: (PiCamera v1.3 10fps 320x240)

RPI-Monitor Status

  • CPU Temperature on GoPiGo3 RPi3B was 59degC when home air cooling active
    and rose to 72degC when cooling not active (Home at 77degF)
  • CPU Load steady state at 1.7
  • Ran for 2h10m took battery from 9.5v to 8.4v
  • Reduced FRAMERATE to 10 fps to limit load and temp stays between 59-71 degC
  • Full speed 32 fps will climb to throttling point (80degC)

CPU Temperature Profile

CPU Load Profile

2 Likes

@cyclicalobsessive,

Thanks for sharing your code project as examples are a great way to learn python once you get the basics of python down!

Regards,
Tom C

2 Likes

Since you are parenting a “ROS Bot” - this guy has great examples in Python: https://github.com/linorobot/linorobot

2 Likes

@cyclicalobsessive,

Thanks for the link, much appreciated.

Basically I am a System Engineer and I hate to reinvent the wheel if I can leverage off of other individual’s projects and tailor them to my own needs and maybe give back to the robot community.

The author has some great hardware/software examples that are just what I need to get my robot “rolling” so to speak.

The only problem I see here is that the author has his own particular electrical hardware configuration which unfortunately rules out the GoPiGo3. However I feel that the GoPiGo3 will be great for developing Python robot control programs. The author’s hardware and electrical configurations are perfect for integrating RPLidar for SLAM where as the GoPiGo3 is just about at the limit of its physical configuration with the addition of the RPLidar and I want to build a robot vacuum bigger than a roomba.

Regards,
Tom C

2 Likes

@cyclicalobsessive,

I gave the author’s automated installation of ROS on my Ubuntu Mate OS a try and believe it or not it failed at the end because of irreparable “broken packages”.

Have you looked at his wiring diagrams for the 2WD robot? He is using a Teensy in place of the Arduino Uno R3 in the GoPiGo3 and includes an IMU in the system. However he does not show how the Rpi3B+ communicates with the Teensy. I suspect it is done over a serial line as he mentions ros_serial in the assembly instructions. Though am I missing something in the assembly instructions?

I like the way that he has setup the robot configuration in ROS by letting you enter the initial chassis configuration, wheel diameter, encoder pulses per wheel revolution, etc.

Update: After rereading the author’s 1. Getting Started section, it looks like he is communicating with the Teensy over a USB connection and does the same with the RPLidar.

Regards,
Tom C

2 Likes

Have you tried actively cooling the Raspberry Pi itself?

No, simplicity preferred, and 50mA for a fan would reduce his playtime by by 17%. Carl’s (current) motto is “long and slow!” Rather than processing video and throwing away 90% of the frames, Carl is going to have to learn when to focus on recognizing from the camera, or from the microphone, and even from the IMU (although the IMU doesn’t take much juice).

1 Like

Sounds like a lot of processing power/heat (which = increased power draw), just to save processing power/heat - which = increased power draw. :wink:

Right now I’m in “can I do that?” mode. Once I’ve figured how to get a payload to the Moon, I can begin working on how to do it with a couple of button-cells for power. (i.e. Power constraints are not an active constraint unless batteries/components overheat.)

1 Like

One option may be to enable experimental 64bit support as noted here:

Supposedly it increases speed and reduces power used on more complex and/or I/O intensive tasks.

1 Like