stereolabs / zed-sdk

⚡️The spatial perception framework for rapidly building smart robots and spaces
https://stereolabs.com
MIT License
783 stars 457 forks source link

Area file is not saved when using sl.DEPTH_MODE.NEURAL #542

Closed YaroslavShchekaturov closed 1 year ago

YaroslavShchekaturov commented 1 year ago

Preliminary Checks

Description

It seems that when we set init_params.depth_mode=sl.DEPTH_MODE.NEURAL we get : RUNNING FILE EMPTY FILE EMPTY when we set init_params.depth_mode=sl.DEPTH_MODE.ULTRA we get: RUNNING RUNNING RUNNING

Steps to Reproduce

import pyzed.sl as sl import open3d as o3d import sys from tqdm import tqdm import copy import numpy as np import os

zed = sl.Camera()

Create a InitParameters object and set configuration parameters

init_params = sl.InitParameters() init_params.camera_resolution = sl.RESOLUTION.HD720 # Use HD720 video mode (default fps: 60)

Use a right-handed Y-up coordinate system

init_params.coordinate_system = sl.COORDINATE_SYSTEM.RIGHT_HANDED_Y_UP init_params.coordinate_units = sl.UNIT.METER # Set units in meters

init_params.depth_mode=sl.DEPTH_MODE.NEURAL

init_params.depth_stabilization = True

init_params.svo_real_time_mode = False

runtime = sl.RuntimeParameters()

init_params.set_from_svo_file('HD1080_SN36524393_19-22-50.svo') err = zed.open(init_params)

py_transform = sl.Transform() tracking_parameters = sl.PositionalTrackingParameters(_init_pos=py_transform) zed.enable_positional_tracking(tracking_parameters) tracking_parameters.enable_area_memory = True

camera_pose = sl.Pose() for i in tqdm(range(1000) ): if zed.grab(runtime) == sl.ERROR_CODE.SUCCESS : # Grab an image and computes the tracking

    zed.get_position(camera_pose, sl.REFERENCE_FRAME.WORLD)

zed.save_area_map("area2.area") # The actual file will be created asynchronously. print(repr(zed.get_area_export_state())) zed.disable_positional_tracking("area.area") print(repr(zed.get_area_export_state()))

Close the camera

zed.close()

print(repr(zed.get_area_export_state()))

Expected Result

SUCCESS SUCCESS SUCCESS

Actual Result

see above

ZED Camera model

ZED2

Environment

I am using the most recent SDK, Windows 10,zed 2

Anything else?

No response

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days