When you start a camera in subordinate mode, it doesn't return data until the master sends the start messages. With the current viewer implementation, this means you have to start the master within 2 seconds of starting the subordinate, or it times out.
That's pretty difficult to do, so this change lets the polling thread block for up to 5 minutes if the camera is started in subordinate mode.
Also fixed a couple minor UI issues:
- If the camera fails to start, the IMU will also fail to start, so don't try to start the IMU if the cameras fail to start to reduce the number of error messages shown to the user
- We weren't zeroing new textures, which sometimes led to graphics memory containing old images getting reused when you stop and restart the camera
The viewer was failing to show the point cloud view of depth-only recordings because we were failing to generate the XY tables for the color camera (depth-only recordings don't have enough information to create a color XY table).
Stop attempting to generate color XY tables for depth-only recordings.
A couple minor fixes to the point cloud viewer UI:
- Only send rotation/translation events if the mouse drag started on the point cloud image itself (i.e. don't rotate the image if you drag the point size slider)
- Remove custom warning logging in favor of the new logging pane
- Only send zoom events if the point cloud window is hovered
- Move the settings file location from the working directory to the users' home directory
- Add a setting to show/hide the log dock
- Clean up the way we handle UI settings to reduce the amount of boilerplate required to introduce a new setting
- Clean up the code for the settings menu
When starting the cameras without synchronized_images_only set, we were sometimes trying to get the image format of null images, which raised an error in the log. k4a_image_get_format returns K4A_IMAGE_FORMAT_CUSTOM in this case, which happened to never be what we were expecting to see, so the viewer dropped the image anyway, but with the addition of the new log pane, this became much more noticeable.
This adds a check to verify that the image is valid before trying to get its format, which prevents the error from being triggered.
Moving all firmware files to parameters instead of being hardcoded to make the code more portable.
Cleaning up the logging so that is is more readable.
Add IMU playback support to K4AViewer.
To support this, move graph data aggregation into the listener. This lets us do things like clear the graph data when a seek happens without having direct access to the IMU window.
When starting the depth engine, only wait on the condition if we don't think the thread has started yet as it will never be released if the thread has already triggered the condition.
* Adding Logging API to set/clear callback function, added unit tests, passing with parallel tests with 500 interations.
Updated ENV logger settings so they don't default to enable STDOUT
* formatting change
* works
* Addressing PR comments
* Fixing Doxygen break
* Fixing comment
* last round of feedback
- Add tooltips explaining why options are unavailable (e.g. 3072p doesn't work at 30 FPS)
- Disable starting the IMU if neither camera is enabled since that's no longer supported by the SDK
Also fix an unrelated build break in the transformation tests on some Ubuntu 16.04 setups related to "abs()" resolving to the C version of the function (which expects int args) instead of the C++ version (which has overloads for floats)
* Fixed leak in dewrapper.c. Switched setting to a build variable that can be set in CMAKE.
Also updated leak detection to run a binary unload.
Cleanup up most of the errors I found.
Opened issues #210 and @212 to track leaks that still need to be addressed.
* Adding leak detection logic to k4a_unittest_init() so more tests get it automatically
* Addressing PR feedback
To help prevent errors caused by connecting to a device as it is going away, increase the delay before attempting to connect to the device again after issuing the reset command.
Rewrite the playback wrapper used in k4aviewer in the style of the official C++ wrapper for the K4A API with the intent of eventually adopting the new wrapper as the official C++ playback wrapper
Various improvements to the dock logic:
- Extract the dock logic out into a reusable class
- Add support for resizing docks by dragging
- Add support for docks attached to different edges of the window
- Fix several UI scaling bugs that manifest only when a dock takes up most of the screen
This will be used to support adding a log viewer pane when we have an API for getting logs.