Close

Security Robot Time

A project log for Home Robot Named Sophie

A next generation home robot with a omni directional drive unit and 6 axis collaborative robot arm

apollo-timbersApollo Timbers 01/07/2024 at 17:490 Comments

While I still wait for the drive unit plates and 3D parts I wanted to continue development in some way. I asked chat GPT 4 what it thought of the project. It stated it did not have feature parity with commercially available home robots. I was like well there can't be too many around like this. lol   

Anyhoo, It said some had "security features" I was like ok I can do that. So, not to be one upped by messily commercial bots I spent a good half day on a security_module.py that is a class. It is still a work in progress but it works non the less.

The system is capable of detecting motion on a pre-set window of time (say when your away at work) and is planned to be equipped with AI audio analysis for detecting sounds like breaking glass, enhancing its security capabilities.

https://github.com/thedocdoc/Sophie/blob/main/security_module.py


It has the following:

Features:

- Utilization of ZED stereo camera for high-resolution imaging.
- Motion detection using background subtraction and contour analysis with OpenCV.
- Planned integration of audio analysis for breaking glass detection.
- Text-to-speech functionality for audible alerts in case of security breaches.
- Time-based activation and deactivation of the security system.
- Logging system for tracking events, errors, and system status.
- Threaded implementation for concurrent processing of camera feed and monitoring tasks.
- Takes two pictures when a security breach is detected and saves to a folder with a date/time stamp

Change log:

- First revision of code that is in a working state
- The mic mute functions may not be needed as voice_assist.py will be off during the security monitoring
- Fixed* It does a single false detection at the beginning that I'm still trying to resolve
- There is a place holder for a glass breaking monitor, this will need to be a trained AI model for accuracy and to reduce false-positives 
- This module is in active development. Future versions will include refined motion detection algorithms, real-time audio analysis for additional security features, and improved error handling and logging for robustness and reliability
- Has a issue where the ZED hangs and has trouble connecting to it, will be a future fix
- Takes two pictures when a security breach is detected and saves to a folder, of the frame the detection was made and one a second later
- False initial detection solved

Discussions