-
Notifications
You must be signed in to change notification settings - Fork 16
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
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,5 @@ | |||
color,x,y,z |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no orientation?
@dataclass | ||
class Cube(JsonSchemaMixin): | ||
color: str | ||
position: Position = field(default_factory=Position) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No orientation?
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)) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
@Preclaa Also, before merging this, please squash your commits into one. Thanks! |
dc9d1f5
to
f35f400
Compare
1e05e2d
to
d581dea
Compare
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
.