-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cube_detector): add cube detector/tracker
- Loading branch information
Showing
174 changed files
with
2,513 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
docker_image( | ||
name="arcor2_cube_detector", | ||
repository="arcor2/arcor2_cube_detector", | ||
image_tags=["0.1.0"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM python:3.10.10-slim-bullseye as deps | ||
COPY src.python.arcor2_cube_detector.scripts/cube_detector.pex /binary.pex | ||
RUN PEX_TOOLS=1 PYTHONOPTIMIZE=1 /usr/local/bin/python3.10 /binary.pex venv --scope=deps --compile /bin/app | ||
|
||
FROM python:3.10.10-slim-bullseye as srcs | ||
COPY src.python.arcor2_cube_detector.scripts/cube_detector.pex /binary.pex | ||
RUN PEX_TOOLS=1 PYTHONOPTIMIZE=1 /usr/local/bin/python3.10 /binary.pex venv --scope=srcs --compile /bin/app | ||
|
||
FROM python:3.10.10-slim-bullseye | ||
|
||
# curl is for healthcheck | ||
RUN apt-get update \ | ||
&& apt-get install -y -q --no-install-recommends libgl1-mesa-glx=20.3.5-1 libglib2.0-0=2.66.8-1 libgomp1=10.2.1-6 libusb-1.0-0=2:1.0.24-3 curl=7.74.0-1.3+deb11u7 \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENTRYPOINT ["/bin/app/pex"] | ||
COPY --from=deps /bin/app /bin/app | ||
COPY --from=srcs /bin/app /bin/app | ||
|
||
EXPOSE 5020 | ||
HEALTHCHECK --interval=5s --start-period=60s CMD curl -f http://localhost:5020/healthz/ready || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
docker_image( | ||
name="arcor2_cube_tracker", | ||
repository="arcor2/arcor2_cube_tracker", | ||
image_tags=["0.1.0"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM python:3.10.10-slim-bullseye as deps | ||
COPY src.python.arcor2_cube_tracker.scripts/cube_tracker.pex /binary.pex | ||
RUN PEX_TOOLS=1 PYTHONOPTIMIZE=1 /usr/local/bin/python3.10 /binary.pex venv --scope=deps --compile /bin/app | ||
|
||
FROM python:3.10.10-slim-bullseye as srcs | ||
COPY src.python.arcor2_cube_tracker.scripts/cube_tracker.pex /binary.pex | ||
RUN PEX_TOOLS=1 PYTHONOPTIMIZE=1 /usr/local/bin/python3.10 /binary.pex venv --scope=srcs --compile /bin/app | ||
|
||
FROM python:3.10.10-slim-bullseye | ||
|
||
# curl is for healthcheck | ||
RUN apt-get update \ | ||
&& apt-get install -y -q --no-install-recommends libgl1-mesa-glx=20.3.5-1 libglib2.0-0=2.66.8-1 libgomp1=10.2.1-6 libusb-1.0-0=2:1.0.24-3 curl=7.74.0-1.3+deb11u7 \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENTRYPOINT ["/bin/app/pex"] | ||
COPY --from=deps /bin/app /bin/app | ||
COPY --from=srcs /bin/app /bin/app | ||
|
||
EXPOSE 5021 | ||
HEALTHCHECK --interval=5s --start-period=60s CMD curl -f http://localhost:5021/healthz/ready || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
arcor2_python_distribution( | ||
name="arcor2_cube_detector", | ||
description="Cube detector", | ||
binaries={"arcor2_cube_detector": "src/python/arcor2_cube_detector/scripts:cube_detector"}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Changelog | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Cube Detector Service | ||
|
||
## Usage Instructions | ||
|
||
- By default, the service runs on port 5020. | ||
|
||
## Environment variables | ||
|
||
- `ARCOR2_CUBE_DETECTOR_URL=http://0.0.0.0:5020` - by default, the service listens on port 5020. | ||
- `ARCOR2_CUBE_DETECTOR_MOCK=1` - the service will start in a mock (simulator) mode. | ||
- `ARCOR2_CUBE_DETECTOR_DEBUG=1` - switches logger to the `DEBUG` level. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import os | ||
|
||
from arcor2 import package_version | ||
|
||
_ROOT = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
|
||
def version() -> str: | ||
return package_version(__name__) | ||
|
||
|
||
def get_data(path: str) -> str: | ||
return os.path.join(_ROOT, "data", path) |
Oops, something went wrong.