-
Notifications
You must be signed in to change notification settings - Fork 2
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
contact_detectionノードにおいてbring_in, take_outが出力されない場合がある #48
Comments
画像のように Message Filters->TimeSynchronizerの影響?
|
左から
で1, 2番目の端末で |
原因node_contact_detection.py 35-37 self.time_synchronizer = message_filters.TimeSynchronizer(
[object_subscriber, people_subscriber, color_subscriber, depth_camera_info_subscriber], 1500)
self.time_synchronizer.registerCallback(self.callback) にて 対処上記に習い、 |
原因2上記の原因に加えて、物体と人物の接触ロジックに問題があることを確認した。 contact_detection/logic.py 57-74 linked_list = []
object_cube: Cube
hand_cube: Cube
for object_item in object_cube_list:
_, object_cube = object_item
for hand in hand_cube_list:
_, hand_cube, _ = hand
result, volume = object_cube.is_collided(hand_cube)
if result:
linked_list.append((hand, object_item, volume))
result_list = []
linked_list = sorted(linked_list, key=itemgetter(2), reverse=True)
for hand, object_item, _ in linked_list:
if hand in hand_cube_list and object_item in object_cube_list:
hand_cube_list.remove(hand)
object_cube_list.remove(object_item)
result_list.append((hand, object_item)) 対処pull request : #65 下記のようにbring-in, take-out時のみ、linked_listへappendする直前の判定を緩めることで回避 linked_list = []
object_cube: Cube
hand_cube: Cube
for object_item in object_cube_list:
tracked_object_info, object_cube = object_item
result = False
is_bring_in_or_take_out = tracked_object_info.action == TrackedObjectActionEnum.BRING_IN.value or tracked_object_info.action == TrackedObjectActionEnum.TAKE_OUT.value
for hand in hand_cube_list:
_, hand_cube, _ = hand
result, volume = object_cube.is_collided(hand_cube)
if result | is_bring_in_or_take_out:
linked_list.append((hand, object_item, volume))
if (not result) & is_bring_in_or_take_out:
print("Note : The system did not detect contact between the wrist and the object, but prioritized the determination of whether the object was brought in or taken away.")
result_list = []
linked_list = sorted(linked_list, key=itemgetter(2), reverse=True)
for hand, object_item, _ in linked_list:
if hand in hand_cube_list and object_item in object_cube_list:
hand_cube_list.remove(hand)
object_cube_list.remove(object_item)
result_list.append((hand, object_item)) 接触判定は確認していないが、bring-in, take-outのみを判断基準にした場合は |
bring_in
,take_out
の判定を行っているobject_detection
ノードとstay
の判定を行っているobject_tracking
ノードではそれぞれ正しくイベント検知が行われているのにも関わらず、contact_detection
ノードではstay
を変換したtouch
のみしか出力しない場合がある。The text was updated successfully, but these errors were encountered: