Metadata-Version: 2.1
Name: sr.robot3
Version: 2022.0.1
Summary: Student Robotics API for Python 3
Home-page: https://github.com/srobo/sr-robot3
License: MIT
Author: Student Robotics
Author-email: kit-brain@studentrobotics.org
Requires-Python: >=3.6,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Dist: astoria (>=0.5.1,<0.6.0)
Requires-Dist: j5 (>=0.13.0,<0.14.0)
Requires-Dist: j5-zoloto (>=0.1.0,<0.2.0)
Requires-Dist: pyserial (>=3.4,<4.0)
Project-URL: Documentation, https://studentrobotics.org/docs
Project-URL: Repository, https://github.com/srobo/sr-robot3
Description-Content-Type: text/markdown

# sr.robot3

![Tests](https://github.com/srobo/sr-robot3/workflows/Tests/badge.svg)
[![PyPI version](https://badge.fury.io/py/sr.robot3.svg)](https://pypi.org/project/sr.robot3/)
[![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://opensource.org/licenses/MIT)
![Bees](https://img.shields.io/badge/bees-110%25-yellow.svg)

Student Robotics API for Python 3

This package uses [PEP420](https://www.python.org/dev/peps/pep-0420/)-style namespace packaging.

## Development

### Requirements

This project uses the [Poetry](https://python-poetry.org) dependency and virtualenv manager.

You will also need:

- Python 3.6+
- Make

### Setup

- Clone the repository from GitHub to a folder on your local machine
- `cd` to that folder, and tell Poetry to install dependencies and set up a virtualenv `poetry install`
- You can now enter the virtual environment using `poetry shell` and develop using your IDE of choice.

### Tests

The full type, test and lint suite can be run using make: `make`.

You can also run parts of the suite.

- Unit tests: `make test`
- Unit tests with HTML coverage: `make test-cov`
- Linting: `make lint`
- Static type checks: `make type`

### Adding camera calibrations

You will need to print off a [chAruco marker grid](https://docs.opencv.org/4.5.3/charuco_board.png).

`opencv_interactive-calibration -t=charuco -sz=GRID_SIZE`

Replace GRID_SIZE with the length of one of the larger squares (in mm) from the printed marker grid.

Use `-ci=1` for specifying camera index if multiple cameras are connected.

Point the camera at the marker grid. Until DF is at or below 30 then press S to save.
This will output a `cameraParameters.xml` file. Place this file in `sr/robot3/vision/calibrations` named by the camera model.

You will need to add a detection strategy for the camera in to `sr/robot3/vision/backend.py`.

## Contributions

This project is released under the MIT Licence. For more information, please see LICENSE.

The CONTRIBUTORS file can be generated by executing CONTRIBUTORS.gen. This generated file contains a list of people who have contributed to sr.robot3.

