Skip to content

Commit bfb879a

Browse files
committed
update imports on ros side
1 parent 15737e0 commit bfb879a

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

extra/ouroboros_ros/nodes/ground_truth_lc_node.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,21 @@
11
#!/usr/bin/env python3
22
import functools
3-
import rospy
4-
import numpy as np
5-
import matplotlib
6-
from scipy.spatial.transform import Rotation as R
73

4+
import matplotlib
85
import matplotlib.pyplot as plt
9-
10-
from pose_graph_tools_msgs.msg import PoseGraph, PoseGraphEdge
11-
6+
import numpy as np
7+
import rospy
128
import tf2_ros
9+
from pose_graph_tools_msgs.msg import PoseGraph, PoseGraphEdge
10+
from scipy.spatial.transform import Rotation as R
1311

14-
15-
from vlc_db.vlc_db import VlcDb
16-
from vlc_db.spark_loop_closure import SparkLoopClosure
17-
from vlc_db.gt_lc_utils import (
12+
import ouroboros as ob
13+
from ouroboros.vlc_db.gt_lc_utils import (
1814
VlcPose,
1915
compute_descriptor_similarity,
2016
recover_pose,
2117
)
2218

23-
2419
# Hydra takes too long to add agent poses to the backend, so if we send the LC
2520
# immediately it will get rejected. To work around this, we can't send the loop
2621
# closure until several seconds after it is detected
@@ -127,7 +122,7 @@ def compute_lc(
127122
match_kps, match_descriptors = vlc_db.get_keypoints(match_uid)
128123

129124
from_T_to = recover_pose(query_descriptors, match_descriptors)
130-
lc = SparkLoopClosure(
125+
lc = ob.SparkLoopClosure(
131126
from_image_uuid=0, to_image_uuid=0, f_T_t=from_T_to, quality=1
132127
)
133128
vlc_db.add_lc(lc, session_id)
@@ -193,7 +188,7 @@ def compute_lc(
193188
line = plt.plot([], [], color="g")[0]
194189
points = plt.scatter([], [], color="g")
195190

196-
vlc_db = VlcDb(8)
191+
vlc_db = ob.VlcDb(8)
197192
session_id = vlc_db.add_session(0)
198193

199194
rate = rospy.Rate(10)

0 commit comments

Comments
 (0)