q3dviewer 1.0.7__py3-none-any.whl → 1.0.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- q3dviewer/custom_items/axis_item.py +3 -3
- q3dviewer/custom_items/cloud_item.py +6 -1
- q3dviewer/glwidget.py +1 -2
- q3dviewer/tools/ros_viewer.py +7 -8
- {q3dviewer-1.0.7.dist-info → q3dviewer-1.0.8.dist-info}/METADATA +1 -1
- {q3dviewer-1.0.7.dist-info → q3dviewer-1.0.8.dist-info}/RECORD +10 -10
- {q3dviewer-1.0.7.dist-info → q3dviewer-1.0.8.dist-info}/LICENSE +0 -0
- {q3dviewer-1.0.7.dist-info → q3dviewer-1.0.8.dist-info}/WHEEL +0 -0
- {q3dviewer-1.0.7.dist-info → q3dviewer-1.0.8.dist-info}/entry_points.txt +0 -0
- {q3dviewer-1.0.7.dist-info → q3dviewer-1.0.8.dist-info}/top_level.txt +0 -0
|
@@ -49,7 +49,7 @@ class AxisItem(BaseItem):
|
|
|
49
49
|
super().__init__()
|
|
50
50
|
self.size = size
|
|
51
51
|
self.width = width
|
|
52
|
-
self.
|
|
52
|
+
self.T = np.eye(4, dtype=np.float32)
|
|
53
53
|
self.need_update_setting = True
|
|
54
54
|
|
|
55
55
|
def initialize_gl(self):
|
|
@@ -116,7 +116,7 @@ class AxisItem(BaseItem):
|
|
|
116
116
|
return
|
|
117
117
|
glUseProgram(self.program)
|
|
118
118
|
set_uniform(self.program, float(self.size), 'size')
|
|
119
|
-
set_uniform(self.program, self.
|
|
119
|
+
set_uniform(self.program, self.T, 'model_matrix')
|
|
120
120
|
glUseProgram(0)
|
|
121
121
|
self.need_update_setting = False
|
|
122
122
|
|
|
@@ -127,7 +127,7 @@ class AxisItem(BaseItem):
|
|
|
127
127
|
"""
|
|
128
128
|
Set the transformation matrix for the axis item.
|
|
129
129
|
"""
|
|
130
|
-
self.
|
|
130
|
+
self.T = transform
|
|
131
131
|
self.need_update_setting = True
|
|
132
132
|
|
|
133
133
|
def paint(self):
|
|
@@ -124,7 +124,12 @@ class CloudItem(BaseItem):
|
|
|
124
124
|
|
|
125
125
|
def set_color_mode(self, color_mode):
|
|
126
126
|
if color_mode in {'FLAT', 'RGB', 'I'}:
|
|
127
|
-
|
|
127
|
+
try:
|
|
128
|
+
self.combo_color.setCurrentIndex(self.mode_table[color_mode])
|
|
129
|
+
except RuntimeError:
|
|
130
|
+
pass
|
|
131
|
+
except ValueError:
|
|
132
|
+
pass
|
|
128
133
|
else:
|
|
129
134
|
print(f"Invalid color mode: {color_mode}")
|
|
130
135
|
|
q3dviewer/glwidget.py
CHANGED
|
@@ -73,8 +73,7 @@ class GLWidget(BaseGLWidget):
|
|
|
73
73
|
|
|
74
74
|
def update(self):
|
|
75
75
|
if self.followed_name != 'none':
|
|
76
|
-
|
|
77
|
-
self.opts['center'] = QVector3D(pos[0], pos[1], pos[2])
|
|
76
|
+
self.center = self.named_items[self.followed_name].T[:3, 3]
|
|
78
77
|
super().update()
|
|
79
78
|
|
|
80
79
|
def add_setting(self, layout):
|
q3dviewer/tools/ros_viewer.py
CHANGED
|
@@ -18,7 +18,7 @@ from q3dviewer.utils.convert_ros_msg import convert_pointcloud2_msg, convert_odo
|
|
|
18
18
|
viewer = None
|
|
19
19
|
point_num_per_scan = None
|
|
20
20
|
color_mode = None
|
|
21
|
-
|
|
21
|
+
auto_set_color_mode = True
|
|
22
22
|
|
|
23
23
|
def odom_cb(data):
|
|
24
24
|
global viewer
|
|
@@ -29,16 +29,15 @@ def odom_cb(data):
|
|
|
29
29
|
def scan_cb(data):
|
|
30
30
|
global viewer
|
|
31
31
|
global point_num_per_scan
|
|
32
|
+
global auto_set_color_mode
|
|
32
33
|
cloud, fields, _ = convert_pointcloud2_msg(data)
|
|
33
34
|
if (cloud.shape[0] > point_num_per_scan):
|
|
34
35
|
idx = random.sample(range(cloud.shape[0]), point_num_per_scan)
|
|
35
36
|
cloud = cloud[idx]
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
color_mode = 'RGB'
|
|
41
|
-
viewer['map'].set_color_mode(color_mode)
|
|
37
|
+
if 'rgb' in fields and auto_set_color_mode:
|
|
38
|
+
print("Set color mode to RGB")
|
|
39
|
+
viewer['map'].set_color_mode('RGB')
|
|
40
|
+
auto_set_color_mode = False
|
|
42
41
|
viewer['map'].set_data(data=cloud, append=True)
|
|
43
42
|
viewer['scan'].set_data(data=cloud)
|
|
44
43
|
|
|
@@ -54,7 +53,7 @@ def main():
|
|
|
54
53
|
global viewer
|
|
55
54
|
global point_num_per_scan
|
|
56
55
|
point_num_per_scan = 10000
|
|
57
|
-
map_item = q3d.CloudIOItem(size=1, alpha=0.1, color_mode='
|
|
56
|
+
map_item = q3d.CloudIOItem(size=1, alpha=0.1, color_mode='I')
|
|
58
57
|
scan_item = q3d.CloudItem(
|
|
59
58
|
size=2, alpha=1, color_mode='FLAT', color='#ffffff')
|
|
60
59
|
odom_item = q3d.AxisItem(size=0.5, width=5)
|
|
@@ -4,14 +4,14 @@ q3dviewer/base_item.py,sha256=-6GogOKrjVRSTszio9ELPDhehBaUlTyNaag2bUl81l8,1337
|
|
|
4
4
|
q3dviewer/basic_window.py,sha256=CFErOPRMysFcCqq3vhDsQ-xZzLArO3m1yABCTIhq5do,7946
|
|
5
5
|
q3dviewer/cloud_viewer.py,sha256=IxxrB6Sl6aPCr9P9QzKHGkMcDP_DjsBWbkmIbsAoIM4,2358
|
|
6
6
|
q3dviewer/gau_io.py,sha256=S6NmqL5vSMgHVxKR-eu4CWCqgZeWBJKYRoOMAwr8Xbo,5890
|
|
7
|
-
q3dviewer/glwidget.py,sha256=
|
|
7
|
+
q3dviewer/glwidget.py,sha256=BwBxbok40cq705QBYjPbtckf-hbLxnKTxyA6nhaT1Ic,4772
|
|
8
8
|
q3dviewer/utils.py,sha256=evF0d-v17hbTmquC24fmMIp9CsXpUnSQZr4MVy2sfao,2426
|
|
9
9
|
q3dviewer/viewer.py,sha256=Rv_YMo-N2kibh4Bnaz0g32hEtNyn8WXRmoh7GTSPcJg,1708
|
|
10
10
|
q3dviewer/custom_items/__init__.py,sha256=gOiAxdjDaAnFL8YbqSEWWWOwUrJfvzP9JLR34sCB9-4,434
|
|
11
|
-
q3dviewer/custom_items/axis_item.py,sha256=
|
|
11
|
+
q3dviewer/custom_items/axis_item.py,sha256=8ZIzBH9rYFD9DWNAlshpJFBpSyXfMcv-eewjqlJ9GIE,4423
|
|
12
12
|
q3dviewer/custom_items/camera_frame_item.py,sha256=VBsr3Avly_YWXViIh4DJkGc_HJt227GeOYLpGtbYTOw,5605
|
|
13
13
|
q3dviewer/custom_items/cloud_io_item.py,sha256=gjK3n9WKB7JwxC93ijkweEHA5EezpgNJ8KO-PBaDKCs,2835
|
|
14
|
-
q3dviewer/custom_items/cloud_item.py,sha256=
|
|
14
|
+
q3dviewer/custom_items/cloud_item.py,sha256=kkIpJky7-Bbry3yCUodsU08BCZqtRQD69-0EMCLKnUs,12571
|
|
15
15
|
q3dviewer/custom_items/frame_item.py,sha256=YTBOEeRWh95trhAlKoZ9LZ4I2x-A5JjOhNPp4OvD5E0,6983
|
|
16
16
|
q3dviewer/custom_items/gaussian_item.py,sha256=B0mYjlW83Kr6FUtZ6P_f40pjjiASPB8g3CSjMTnjsvY,9857
|
|
17
17
|
q3dviewer/custom_items/grid_item.py,sha256=U4nk16d5Dkbt6U9s23c9PIlG-wPwu15Ho0HsamDuyqM,3436
|
|
@@ -31,16 +31,16 @@ q3dviewer/tools/example_viewer.py,sha256=yeVXT0k4-h1vTLKnGzWADZD3our6XUaYUTy0p5d
|
|
|
31
31
|
q3dviewer/tools/gaussian_viewer.py,sha256=vIwWmiFhjNmknrEkBLzt2yiegeH7LP3OeNjnGM6GzaI,1633
|
|
32
32
|
q3dviewer/tools/lidar_calib.py,sha256=beQP6Z9NyW7ME6zCRAxH1RRSm5zMalcmlmF_HzJPLi8,10811
|
|
33
33
|
q3dviewer/tools/lidar_cam_calib.py,sha256=kYR41Eq3o7frHLIWqysHUvVbB29GC0sDLzUigwxG4n4,11539
|
|
34
|
-
q3dviewer/tools/ros_viewer.py,sha256=
|
|
34
|
+
q3dviewer/tools/ros_viewer.py,sha256=ARB3I5wohY3maP8dCu0O0hxObd6JFKuK2y7AApVgMWA,2551
|
|
35
35
|
q3dviewer/utils/__init__.py,sha256=irm8Z_bT8l9kzhoMlds2Dal8g4iw4vjmqNPZSs4W6e0,157
|
|
36
36
|
q3dviewer/utils/cloud_io.py,sha256=ttD8FJExdDhXB1Z0Ej9S939i8gcq4JfyqwLXVh8CEFw,11094
|
|
37
37
|
q3dviewer/utils/convert_ros_msg.py,sha256=sAoQfy3qLQKsIArBAVm8H--wlQXOcmkKK3-Ox9UCcrc,1686
|
|
38
38
|
q3dviewer/utils/gl_helper.py,sha256=dRY_kUqyPMr7NTcupUr6_VTvgnj53iE2C0Lk0-oFYsI,1435
|
|
39
39
|
q3dviewer/utils/maths.py,sha256=ghnZQYxQtAQonTqQOmfHAMdSluk0sO1Ps_9bL2vMeb8,5397
|
|
40
40
|
q3dviewer/utils/range_slider.py,sha256=jZJQL-uQgnpgLvtYSWpKTrJlLkt3aqNpaRQAePEpNd0,3174
|
|
41
|
-
q3dviewer-1.0.
|
|
42
|
-
q3dviewer-1.0.
|
|
43
|
-
q3dviewer-1.0.
|
|
44
|
-
q3dviewer-1.0.
|
|
45
|
-
q3dviewer-1.0.
|
|
46
|
-
q3dviewer-1.0.
|
|
41
|
+
q3dviewer-1.0.8.dist-info/LICENSE,sha256=81cMOyNfw8KLb1JnPYngGHJ5W83gSbZEBU9MEP3tl-E,1124
|
|
42
|
+
q3dviewer-1.0.8.dist-info/METADATA,sha256=36WLMFrKUX9e1GTT3s9QgIBgchCmF_7v2QzF4TiNJck,349
|
|
43
|
+
q3dviewer-1.0.8.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
|
|
44
|
+
q3dviewer-1.0.8.dist-info/entry_points.txt,sha256=2vsxH5_1WhM-DnDgY0TDbiAGFPFMfI0Wmfs_6iXEf4Y,317
|
|
45
|
+
q3dviewer-1.0.8.dist-info/top_level.txt,sha256=HFFDCbGu28txcGe2HPc46A7EPaguBa_b5oH7bufmxHM,10
|
|
46
|
+
q3dviewer-1.0.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|