stereolabs / zed-unity

ZED SDK Unity plugin
https://www.stereolabs.com/documentation/guides/using-zed-with-unity/introduction.html
MIT License
250 stars 57 forks source link

Cannot manually set ZED camera position in Object Detection mode #293

Open MoritzSkowronski opened 3 weeks ago

MoritzSkowronski commented 3 weeks ago

Preliminary Checks

Description

I want to be able to set the ZED camera at a predefined position in world space. For this, I have to disable positional tracking in the ZED manager. However, when running the object detection sample, the ZED Manager crashes throws an "INVALID_FUNCTION_CALL" error on StartObjectDetection().

Steps to Reproduce

  1. Open the Object Detection Sample
  2. Disable "Enable Tracking" under positional tracking
  3. Run the game

Expected Result

The ZED Rig remains at the position set in the editor and the objects are being tracked.

Actual Result

The ZED manager throws an error

ZED Camera model

ZED2

Environment

ZED SDK: 4.1.1

Anything else?

No response

Bvallon-sl commented 3 weeks ago

Hi,

Yes, the positional tracking must be enabled to use the Object detection/body tracking module.

To be able to move the ZED Camera game object in the scene, you need to disable the "Set Floor as Origin" setting available in the ZED Manager script, in the inspector window.

MoritzSkowronski commented 1 week ago

But does this mean that each time the Unity application starts, the camera will be rotated slightly differently?

Bvallon-sl commented 1 week ago

If the camera does not move, the initial should be the same at each start. It is estimated using the internal IMU of the camera.