Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cube detector, Cube tracker #812

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Preclaa
Copy link

@Preclaa Preclaa commented Mar 16, 2023

Add two new modules - cube_detector and cube_tracker.
Cube detector detects colored cubes in image from Kinect.
Cube tracker periodically calls detector and stores positions of detected cubes.
New Object Type was added (CubeTracker) that can return Pose of nearest/farthest cube from given point.

Detector runs on port 5020, Tracker on port 5021. OT is integrated in fit_demo.

src/python/arcor2_kinect_azure/kinect_azure.py Outdated Show resolved Hide resolved
src/python/arcor2_object_detector/BUILD Outdated Show resolved Hide resolved
src/python/arcor2_object_detector/README.md Outdated Show resolved Hide resolved
src/python/arcor2_object_detector/__init__.py Outdated Show resolved Hide resolved
@@ -0,0 +1,5 @@
color,x,y,z
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no orientation?

src/python/arcor2_object_detector/object_detector.py Outdated Show resolved Hide resolved
src/python/arcor2_object_detector/tests/test_dataset.py Outdated Show resolved Hide resolved
src/python/arcor2_object_tracker/BUILD Outdated Show resolved Hide resolved
src/python/arcor2_object_tracker/object_tracker.py Outdated Show resolved Hide resolved
@dataclass
class Cube(JsonSchemaMixin):
color: str
position: Position = field(default_factory=Position)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No orientation?

src/python/arcor2_cube_detector/README.md Outdated Show resolved Hide resolved
src/python/arcor2_cube_detector/cube_detector.py Outdated Show resolved Hide resolved
src/python/arcor2_cube_detector/cube_detector.py Outdated Show resolved Hide resolved
src/python/arcor2_cube_detector/cube_detector.py Outdated Show resolved Hide resolved
src/python/arcor2_cube_detector/cube_detector.py Outdated Show resolved Hide resolved
src/python/arcor2_cube_detector/scripts/cube_detector.py Outdated Show resolved Hide resolved
while _started:
t_start = time.monotonic()
_tracker.store_cubes(rest.call(rest.Method.GET, f"{URL_DETECTOR}/detect/all", list_return_type=Cube))
time.sleep(1 - (time.monotonic() - t_start))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So 1 Hz is the maximum speed? Or could it run faster, but you consider 1 Hz ok?

$ref: WebApiError
"""
color = request.args.get("color", default=None)
return jsonify(_tracker.get_stored_cubes(color)), 200
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it return something in mock mode?

src/python/arcor2_fit_demo/object_types/cube_tracker.py Outdated Show resolved Hide resolved
@ZdenekM
Copy link
Member

ZdenekM commented Apr 20, 2023

@Preclaa Also, before merging this, please squash your commits into one. Thanks!

@Preclaa Preclaa force-pushed the master branch 6 times, most recently from dc9d1f5 to f35f400 Compare May 5, 2023 07:42
@ZdenekM ZdenekM marked this pull request as ready for review May 11, 2023 11:10
@Preclaa Preclaa force-pushed the master branch 2 times, most recently from 1e05e2d to d581dea Compare May 12, 2023 06:06
@Preclaa Preclaa changed the title Draft: Add Object detector, Object tracker prototype Add Cube detector, Cube tracker May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants