The venue has four edges. On the same edge, the values at different positions have obvious deviations.
For example, as shown in the picture: the red font represents the x value, and the blue font represents the z value.
The x values of the right edge of the venue are 3.54, 3.60, and 3.26 from the camera from near to far. (Unit: meters)
How does this deviation occur? How can I avoid it?
The following are the parameter settings for zed in my code. Which parameters may cause this situation?
# region 初始化参数
init_params = sl.InitParameters()
init_params.set_from_serial_number(camera_device.serial_number)
init_params.camera_fps = 30
init_params.coordinate_units = sl.UNIT.METER
init_params.depth_mode = sl.DEPTH_MODE.ULTRA
init_params.coordinate_system = sl.COORDINATE_SYSTEM.LEFT_HANDED_Y_UP
init_params.enable_image_enhancement = True
# endregion
status = zed.open(init_params)
if status != sl.ERROR_CODE.SUCCESS:
exit(f"打开zed相机错误!\n"
f"信息:{status}")
# region 定位参数
positional_tracking_parameters = sl.PositionalTrackingParameters()
positional_tracking_parameters.set_as_static = True
positional_tracking_parameters.set_floor_as_origin = True
positional_tracking_parameters.set_gravity_as_origin = True
status = zed.enable_positional_tracking(positional_tracking_parameters)
if status != sl.ERROR_CODE.SUCCESS:
print("Error enabling the positional tracking of camera", status)
exit(1)
# endregion
# region 身体追踪参数
body_param = sl.BodyTrackingParameters()
body_param.enable_tracking = True # Track people across images flow
body_param.enable_body_fitting = False # Smooth skeleton move
body_param.detection_model = sl.BODY_TRACKING_MODEL.HUMAN_BODY_ACCURATE
body_param.body_format = sl.BODY_FORMAT.BODY_34 # Choose the BODY_FORMAT you wish to use
status = zed.enable_body_tracking(body_param)
if status != sl.ERROR_CODE.SUCCESS:
print("Error enabling the body tracking of camera", status)
exit(1)
# endregion
# region 运行参数
body_runtime_param = sl.BodyTrackingRuntimeParameters()
body_runtime_param.detection_confidence_threshold = cfg['detection_confidence_threshold']
runtime_param = sl.RuntimeParameters()
runtime_param.measure3D_reference_frame = sl.REFERENCE_FRAME.WORLD
# endregion
In addition, with my parameter settings, it seems that after each startup, the camera posture information and the position output by bodytrack will be different from the previous one, with slight deviations. Is this caused by set_floor_as_origin?