Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading sync port connections #10

Open
Suedocode opened this issue Oct 11, 2024 · 1 comment
Open

Reading sync port connections #10

Suedocode opened this issue Oct 11, 2024 · 1 comment

Comments

@Suedocode
Copy link
Collaborator

Suedocode commented Oct 11, 2024

In the k4a library, you are able to query the status of the sync port connections, and analytically assign the sync mode settings. [is_sync_in_connected(), is_sync_out_connected()]

  if (mDev.is_sync_in_connected()) {
    mConfig.wired_sync_mode = K4A_WIRED_SYNC_MODE_SUBORDINATE;
  } else if (mDev.is_sync_out_connected()) {
    mConfig.wired_sync_mode = K4A_WIRED_SYNC_MODE_MASTER;
  } else {
    mConfig.wired_sync_mode = K4A_WIRED_SYNC_MODE_STANDALONE;
  }

Orbbec uses ethernet to distribute the sync signals though. There doesn't seem to be a way to query the sync connections. Given that, the sync connections have to be known outside of the software in order to decide which sync configurations should be used. If the sync configurations are distributed but no sync signal exists or the wrong primary is assigned, the cameras won't stream because they will never receive the trigger signal.

Could we get an API to at least query the existence of a sync cable?

Is there a suggested way to know which Femto is hooked up to the SYNC_OUT of the hub? Our current proposal is to finish the installation of a unit and stream from the sensors. If the configuration is correct, all will stream. If not, one camera will show the white led, while the others flash orange. Adjust the sync cables to assign that one the "Primary In", and restart the unit.

//first enumerated device gets PRIMARY, assumes device enumeration indexes are consistent
static OBMultiDeviceSyncMode get_sync_mode() {
  static OBMultiDeviceSyncMode mode = OB_MULTI_DEVICE_SYNC_MODE_PRIMARY;

  auto out = mode;
  mode = OB_MULTI_DEVICE_SYNC_MODE_SECONDARY_SYNCED;
  return out;
}

In the mean time, I will test using OB_MULTI_DEVICE_SYNC_MODE_SECONDARY_SYNCED to allow subordinate designated cameras to continue streaming when there is no sync cable connected. I'd prefer to use the more rigorous OB_MULTI_DEVICE_SYNC_MODE_SECONDARY in applicable situations, but it's difficult without being able to query the sync connection state.

EDIT: OB_MULTI_DEVICE_SYNC_MODE_SECONDARY_SYNCED refuses to stream as well. The incorrect camera was assigned the primary, but I thought that a failure to receive a trigger signal would continue streaming anyway (though obviously not with multi device synced frames). Is this feature available to Femto?

Environment:
Ubuntu 22.04.5 LTS (x86_64)
g++ 11.4.0
OrbbecSDK-dev bd2d4dd
Femto: Firmware v1.2.9

@hzcyf
Copy link
Contributor

hzcyf commented Oct 12, 2024

Thank you for your valuable feedback and suggestions.

  1. The Femto Mega currently does not support the OB_MULTI_DEVICE_SYNC_MODE_SECONDARY_SYNCED mode.
  2. We will discuss the additional issues and suggestions you’ve raised within our team. We’ll keep you updated with any developments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants