()
| 48 | |
| 49 | # callback function for lidar.read_loop() |
| 50 | def move_steps_callback(): |
| 51 | stepper.move_steps(config.steps if config.SCAN_ANGLE > 0 else -config.steps) |
| 52 | lidar.z_angle = stepper.get_current_angle() |
| 53 | |
| 54 | # # DEBUG: take photo at each step |
| 55 | # imgpath = os.path.join(config.scan_dir, f"{format_value(lidar.z_angle, 2)}.jpg") |
| 56 | # take_photo(path=imgpath, |
| 57 | # exposure_time=current_exposure_time, |
| 58 | # gain=current_gain, |
| 59 | # awbgains=current_awbgains, |
| 60 | # denoise="cdn_fast") |
| 61 | |
| 62 | if enable_IMU: |
| 63 | # euler = imu.get_euler_angles() |
| 64 | # print(f'{format_value(lidar.z_angle, 2)} | Euler: x {format_value(euler.x, 2)} y {format_value(euler.y, 2)} z {format_value(euler.z, 2)}') |
| 65 | quat_values = imu.get_quat_values() |
| 66 | quat_list.append(quat_values) # [lidar.z_angle, *quat_values] |
| 67 | |
| 68 | if not enable_cam: |
| 69 | # wait for lidar to lock rotational speed |
nothing calls this directly
no test coverage detected