When i get the depth measurement from a fusion object subscribed to a camera, it seems to change the depth units to mm:
status_rgb = self.fusion.retrieve_image(self.rgb,camera.uuid)
status_depth = self.fusion.retrieve_measure(self.depth,camera.uuid,sl.MEASURE.DEPTH)
Any ideas why? The sl.Fusion() and sl.Camera() objects are in different threads.
Hi @fdunbar,
This is probably due to how the InitFusionParameters are set, the coordinate_units
parameter is set to millimeters by default.
Could you try changing this parameter and try again?
This is how I am constructing the sl.Fusion module:
def _build_(self):
self.current_gps = sl.GNSSData()
self.fusion = sl.Fusion()
self.current_pose = sl.Pose()
self.rgb = sl.Mat()
self.depth = sl.Mat()
fusion_params = self.zed_config.parse_fusion_params()
fusion_params.coordinate_units = sl.UNIT.METER
fusion_params_tracking = self.zed_config.parse_fusion_params_tracking()
init_status = self.fusion.init(fusion_params)
if init_status.name != "SUCCESS":
logging.error("Fusion: Cannot initialize: ", init_status)
exit(1)
fusion_params_tracking = self.zed_config.parse_fusion_params_tracking()
positional_tracking_status = self.fusion.enable_positionnal_tracking(fusion_params_tracking)
if positional_tracking_status.name != "SUCCESS":
logging.error("Fusion: Positional tracking not activated: ", positional_tracking_status)
exit(1)
else:
logging.info("Fusion: Positional tracking enabled")
mars3
4
Also experiencing this, meters is set in both Fusion and Camera but receive millimeters back
1 Like
Hi @fdunbar, @mars3,
Thank you for reporting this, we will investigate this on our end and will get back to you as soon as we have more information on a fix for this.
Hello again @fdunbar, @mars3,
Thank you for the report, this was indeed identified as a bug and will be fixed in an upcoming version of the ZED SDK.
Best,
Matthew
1 Like
While you are at it, could we please get a way to generate a sl.Pose() object from a (4,4) numpy.ndarray?
I’ve logged this as a feature request, this can probably be a sample code or a helper function that we can share.