build open3d camera polydata
(g, pose, scale=0.05)
| 149 | |
| 150 | |
| 151 | def create_camera_actor2(g, pose, scale=0.05): |
| 152 | """build open3d camera polydata""" |
| 153 | points = o3d.utility.Vector3dVector(scale * CAM_POINTS) |
| 154 | points = points @ pose[:3, :3].transpose() + pose[:3, 3] |
| 155 | lines = o3d.utility.Vector2iVector(CAM_LINES) |
| 156 | camera_actor = LineMesh(points, lines, [1, 0, 0], radius=0.005) |
| 157 | camera_actor.merge_cylinder_segments() |
| 158 | # color = (g * 1.0, 0.5 * (1 - g), 0.9 * (1 - g)) |
| 159 | # camera_actor.paint_uniform_color(color) |
| 160 | return camera_actor |
| 161 | |
| 162 | |
| 163 | def load_voxels(voxel_centre, voxel_size): |
no test coverage detected