def set_cylinder_model(self, cx, cy, cz, ax, ay, az, radius): self.recon = CylinderPointCloudTransformer(cx, cy, cz, ax, ay, az, radius, self.xyz) create_cylinder_publisher(cx, cy, cz, ax, ay, az, radius, topic_name='/flydracalib/cyl', publish_now=True, latch=True, length=3 * radius, color=(0, 1, 0, 0.3)) create_point_publisher(cx, cy, cz, r=0.1, topic_name='/flydracalib/cylcenter', publish_now=True, latch=True, color=(1, 0, 0, 0.5)) create_point_cloud_message_publisher(self.recon.move_cloud(self.xyz), topic_name='/flydracalib/points2', publish_now=True, latch=True)
def new_flydra_calib(self, path="/tmp/flydra.xml"): M = self.recon.get_transformation_matrix() newfly = self.fly.get_aligned_copy(M) newfly.save_to_xml_filename(path) pts2d = self.laser.get_points_in_cameras(newfly.get_cam_ids(), random_num_results=1) pts3d = newfly.find3d(pts2d[0], return_line_coords=False) cx, cy, cz = pts3d create_point_publisher( cx, cy, cz, r=0.1, topic_name="/flydracalib/testpoint", publish_now=True, latch=True, color=(0, 0, 1, 0.5) ) return path
def new_flydra_calib(self, path='/tmp/flydra.xml'): M = self.recon.get_transformation_matrix() newfly = self.fly.get_aligned_copy(M) newfly.save_to_xml_filename(path) pts2d = self.laser.get_points_in_cameras(newfly.get_cam_ids(), random_num_results=1) pts3d = newfly.find3d(pts2d[0],return_line_coords=False) cx,cy,cz = pts3d create_point_publisher( cx,cy,cz, r=0.1, topic_name='/flydracalib/testpoint', publish_now=True, latch=True, color=(0,0,1,0.5)) return path
def set_cylinder_model(self, cx,cy,cz,ax,ay,az,radius): self.recon = CylinderPointCloudTransformer(cx,cy,cz,ax,ay,az,radius,self.xyz) create_cylinder_publisher( cx,cy,cz,ax,ay,az,radius, topic_name='/flydracalib/cyl', publish_now=True, latch=True, length=3*radius, color=(0,1,0,0.3)) create_point_publisher( cx,cy,cz, r=0.1, topic_name='/flydracalib/cylcenter', publish_now=True, latch=True, color=(1,0,0,0.5)) create_point_cloud_message_publisher( self.recon.move_cloud(self.xyz), topic_name='/flydracalib/points2', publish_now=True, latch=True)