Skip to content

Latest commit

 

History

History
121 lines (101 loc) · 2.35 KB

File metadata and controls

121 lines (101 loc) · 2.35 KB

Hawkeye-OS

Repository Structure

Hawkeye-OS/
├── .dockerignore 
├── .gitignore 
├── docker-compose.yml 
├── Dockerfile
├── mock_gcom.py 
├── README.md
├── start_system.sh
├── stop_system.sh 
├── test-hawkeye-os.sh 
├── received_stream/
└── src/
    └── orchestrator
        ├── package.xml
        ├── setup.cfg
        ├── setup.py
        ├── orchestrator/
            ├── __init__.py
            ├── mock_object_detection.py
            └── orchestrator.py 
        └── resource/
            └── orchestrator
└── test_images
    ├── anpanman_wooddadandan_hero.jpg
    └── test_video.mp4

Installing Dependencies

Install docker, docker-compose, tmux.

// I think we can ignore this since we have the requirements.txt Install required Python Packages:

pip install websockets aiortc av opencv-python numpy

Building the Image for the First Time (Manual)

Build the image (in project root)

docker-compose build

Run the container

docker-compose up -d

Get the bash (On each terminal to test)

docker-compose exec ros2_workspace bash

Inside the terminal, build the workplace

colcon build

Testing (Manual)

Make sure you're in the project's root directory (../Hawkeye-OS)

In a Normal Terminal:

python3 mock_gcom.py

Inside the Docker Workspace (see previous section for setup):

ros2 run orchestrator orchestrator

For testing, mock queues are available

ros2 run orchestrator mock_object_detection ("on another terminal")

Unit Tests

Set up the virtual environment (first time only):

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Run all tests:

source venv/bin/activate
pytest

Run with coverage:

pytest --cov=src --cov-report=term-missing

Run a specific file (example):

pytest tests/streaming/test_streaming.py

Automated Build/Test

For bash shells, there are files you can run to automate the test setups.

To run the script, make sure you make it executable with:

chmod +x start_system.sh stop_system.sh

Run the script (in project root):

./start_system.sh 

To stop the script:

./stop_system.sh