Fusion enable_positionnal_tracking() takes exactly one argument (0 given)

Updated to 4.0.6!!
and continued working on getting fusion right but the issue I am facing is,

File “zed-sdk-master/tutorials/tutorial 9 - geotracking/python/geotracking.py”, line 83, in
fusion.enable_positionnal_tracking()
TypeError: enable_positionnal_tracking() takes exactly one argument (0 given)

same error with samples in geotracking too,
I tried inputting possitional tracking params in function as
“fusion.enable_positionnal_tracking(tracking_params)”

resulting in,
Traceback (most recent call last):
File “zed-sdk-master/tutorials/tutorial 9 - geotracking/python/geotracking.py”, line 83, in
fusion.enable_positionnal_tracking(tracking_params)
File “pyzed/sl.pyx”, line 10653, in pyzed.sl.Fusion.enable_positionnal_tracking
File “stringsource”, line 14, in FromPyStructUtility.__pyx_convert__from_py_struct__sl_3a__3a_PositionalTrackingFusionParameters
TypeError: Expected a mapping, got pyzed.sl.PositionalTrackingParameters

so, It requires “mapping” not the params, Stereolabs team can you please help me regarding this, I believe it has to do with newer 4.0.6 sdk because earlier in 4.0.5 it was working fine with this function although fusion has not worked for me til date.

ps: I can confirm the camera opens well n good so does the gnss module.

Thanks

Hi, it needs PositionalTrackingFusionParameters and not PositionalTrackingParameters. Sorry for the confusion. You can find it in the documentation : BodyTrackingFusionParameters Class Reference | API Reference | Stereolabs

Hmmm this solution doesn’t seem to work for me on 4.0.6:

    gnss_calibration_parameters = sl.GNSSCalibrationParameters()
    fusion_tracking_params = sl.PositionalTrackingFusionParameters()
    fusion_tracking_params.enable_GNSS_fusion = True
    fusion_tracking_params.gnss_calibration_parameters = gnss_calibration_parameters
    fusion.enable_positionnal_tracking(fusion_tracking_params)

Gives

Traceback (most recent call last):
  File "tracking.py", line 88, in <module>
    fusion_tracking_params.gnss_calibration_parameters = sl.GNSSCalibrationParameters() #gnss_calibration_parameters
  File "pyzed/sl.pyx", line 9858, in pyzed.sl.PositionalTrackingFusionParameters.gnss_calibration_parameters.__set__
  File "stringsource", line 14, in FromPyStructUtility.__pyx_convert__from_py_struct__sl_3a__3a_GNSSCalibrationParameters
TypeError: Expected a mapping, got pyzed.sl.GNSSCalibrationParameters

If I remove that line i.e.

    gnss_calibration_parameters = sl.GNSSCalibrationParameters()
    fusion_tracking_params = sl.PositionalTrackingFusionParameters()
    fusion_tracking_params.enable_GNSS_fusion = True
    # fusion_tracking_params.gnss_calibration_parameters = gnss_calibration_parameters
    fusion.enable_positionnal_tracking(fusion_tracking_params)

I get

Traceback (most recent call last):
  File "tracking.py", line 90, in <module>
    fusion.enable_positionnal_tracking(fusion_tracking_params)
  File "pyzed/sl.pyx", line 10653, in pyzed.sl.Fusion.enable_positionnal_tracking
  File "stringsource", line 14, in FromPyStructUtility.__pyx_convert__from_py_struct__sl_3a__3a_PositionalTrackingFusionParameters
TypeError: Expected a mapping, got pyzed.sl.PositionalTrackingFusionParameters

Any ideas?

@alassagne do you have any hints? Sorry, I went to file a support ticket but couldn’t see how.

OK, turns out the tutorial is just wrong, but the other code samples (geotracking) work.

This must work!

fusion_params = sl.PositionalTrackingFusionParameters()
fusion.enable_positionnal_tracking(fusion_params)