Python SSL Vision Client
Python client for SSL Vision
Installation
From source:
git clone --recursive https://github.com/Juniorlimaivd/python-ssl-client.git
cd python-ssl-client
python setup.py install
From PyPi directly:
pip install sslclient
Example
import sslclient
c = sslclient.client(ip='255.255.255.255', port=1234)
# Bind connection to port and IP for UDP Multicast
c.connect()
while True:
#received decoded package
data = c.receive()
if data.HasField('geometry'):
print(data.geometry)
if data.HasField('detection'):
print(data.detection)
The data packet may have detection or geometry data. Consult SSL Vision Docs to know when you will receive each type of package.
The formats of the geometry and detection data are de followings:
Detection Example
{
"detection": {
"frame_number": 377308,
"t_capture": 13977.820277,
"t_sent": 1505683703.172275,
"camera_id": 1,
"balls": [
{
"confidence": 0.930344820022583,
"area": 78,
"x": -14.979391098022461,
"y": -12.432811737060547,
"z": 0,
"pixel_x": 276.5769348144531,
"pixel_y": 225.73077392578125
}
"{... other balls ...}"
],
"robots_yellow": [
{
"confidence": 0.930344820022583,
"area": 78,
"x": -14.979391098022461,
"y": -12.432811737060547,
"z": 0,
"pixel_x": 276.5769348144531,
"pixel_y": 225.73077392578125
}
"{... other yellow robots ...}"
],
"robots_blue": [
{
"confidence": 0.930344820022583,
"area": 78,
"x": -14.979391098022461,
"y": -12.432811737060547,
"z": 0,
"pixel_x": 276.5769348144531,
"pixel_y": 225.73077392578125
}
"{... other blue robots ...}"
]
}
}
Geometry Example
{
"field": {
"field_length": 1500,
"field_width": 1300,
"goal_width": 100,
"goal_depth": 40,
"boundary_width": 3,
"field_lines": [
{
"name": "TopTouchLine",
"p1": {
"x": -750,
"y": 650
},
"p2": {
"x": 750,
"y": 650
},
"thickness": 10
},
"{... other field lines ...}"
],
"field_arcs": [
{
"name": "CenterCircle",
"center": {
"x": 0,
"y": 0
},
"radius": 150,
"a1": 10,
"a2": 0,
"thickness": 10
},
"{... other field arcs ...}"
]
},
"calib": [
{
"camera_id": 0,
"focal_length": 2.1379730701446533,
"principal_point_x": 390,
"principal_point_y": 290,
"distortion": 0,
"q0": -0.0780009999871254,
"q1": -0.9969499707221985,
"q2": 0.0014819999923929572,
"q3": 0.0017130000051110983,
"tx": -621141.125,
"ty": -459652.8125,
"tz": 3500,
"derived_camera_world_tx": -542101.5625,
"derived_camera_world_ty": 550669.6875,
"derived_camera_world_tz": -0.6016282439231873
},
"{... other cameras ...}"
]
}
Metadata
Release files for sslclient 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sslclient-1.1.2.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sslclient-1.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.3 kB
Release files / sslclient-1.1.2.tar.gz
| Download URL | sslclient-1.1.2.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
615f2006ae0b578950b96f9a97d4943a955a46a799da74503a069aceee408768
|
|
BLAKE2b-256 checksum How to use checksums |
ffaa4bf86340241a295f462a679cd81d2f89046a9709cb224bbdf46dc98e92b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.9.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2
|
Release files / sslclient-1.1.2-py3-none-any.whl
| Download URL | sslclient-1.1.2-py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
244238342f15fce7dccbaaa30c7f643a63c29cd2b328c4e31ec391ea2797a2aa
|
|
BLAKE2b-256 checksum How to use checksums |
ebc872f8004d0be0a889879058b9d50d9cf4a3a2ae7c55c8aec9230ce8a4a39c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.9.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2
|