Skip to content

Commit 381ed93

Browse files
switch 'uuid1' function to 'uuid4'
1 parent 769cf56 commit 381ed93

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

kf_hungarian_tracker/kf_hungarian_tracker/kf_hungarian_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def callback(self, msg):
165165
marker_list = []
166166
# add current active obstacles
167167
for obs in filtered_obstacle_list:
168-
(r, g, b) = colorsys.hsv_to_rgb((obs.msg.id.int >> 64) % 360 / 360., 1., 1.) # encode id with rgb color
168+
(r, g, b) = colorsys.hsv_to_rgb(obs.msg.id.int % 360 / 360., 1., 1.) # encode id with rgb color
169169
# make a cube
170170
marker = Marker()
171171
marker.header = msg.header

kf_hungarian_tracker/kf_hungarian_tracker/obstacle_class.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ObstacleClass:
1717
def __init__(self, obstacle_msg, top_down, measurement_noise_cov, error_cov_post, process_noise_cov):
1818
'''Initialize with an Obstacle msg and an assigned id'''
1919
self.msg = obstacle_msg
20-
self.msg.id = uuid.uuid1()
20+
self.msg.id = uuid.uuid4()
2121
position = np.array([[obstacle_msg.position.x, obstacle_msg.position.y, obstacle_msg.position.z]]).T # shape 3*1
2222
velocity = np.array([[obstacle_msg.velocity.x, obstacle_msg.velocity.y, obstacle_msg.velocity.z]]).T
2323

0 commit comments

Comments
 (0)