File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ project(ouroboros_ros)
3
3
4
4
find_package (catkin REQUIRED COMPONENTS
5
5
rospy
6
+ dynamic_reconfigure
7
+ )
8
+
9
+ generate_dynamic_reconfigure_options (
10
+ cfg/PlaceDescriptorDebugging.cfg
6
11
)
7
12
8
13
catkin_package (
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
1
2
import rospy
2
3
3
4
from dynamic_reconfigure .server import Server
7
8
import numpy as np
8
9
9
10
from ouroboros import VlcDb , SparkImage
10
- from ouroboros_salad import get_salad_model
11
+ from ouroboros_salad . salad_model import get_salad_model
11
12
from ouroboros_ros .cfg import PlaceDescriptorDebuggingConfig
12
13
13
14
@@ -62,17 +63,19 @@ def image_cb(self, msg):
62
63
embedding = self .embedding_model (image )
63
64
64
65
image_matches , similarities = self .vlc_db .query_embeddings_max_time (
65
- embedding , 1 , msg .header .stamp .to_nsec () - self .lc_lockout
66
+ embedding , 1 , msg .header .stamp .to_nsec () - self .lc_lockout * 1e9
66
67
)
67
68
68
69
self .vlc_db .update_embedding (uid , embedding )
69
70
70
- if similarities [0 ] < self .place_match_threshold :
71
- image_match = None
71
+ if len ( similarities ) == 0 or similarities [0 ] < self .place_match_threshold :
72
+ right = None
72
73
else :
73
- image_match = image_matches [0 ]
74
+ right = image_matches [0 ]. image . rgb
74
75
75
- display_image_pair (current_image , image_match )
76
+ left = current_image .image .rgb
77
+
78
+ display_image_pair (left , right )
76
79
77
80
78
81
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments