Comments (5)
Feedback from @skalldri
- If it’s not too much trouble to add, I would find this useful. My tool has dynamic log-level reconfiguration during runtime, so being able to change the K4A log level when I get a ROS log-level change would be nice. I can un-register and re-register the callback function, but it would be nice to not have to.
(I suppose we could allow the registration API to be called with the same callback function and treat that as an update to the logging level for a runtime change that doesn’t require unregistration. Anyone think that would be useful?)
- This sounds fine. I can build my own locks around the logging function, but there needs to be pretty clear documentation in the SDK docs / k4a.h that concurrent callbacks are possible.
The callback function will be invokable by any caller attempting to log. So if there are 3 threads running on 3 CPU, and all of then generate an error message at the same time, then all three of them can call into the users logging callback function at the same time. The user will need to protect against this.
from azure-kinect-sensor-sdk.
Feedback from @xthexder.
I don’t have any problems with a callback sort of system for this.
If we’re only going to support a single registered function, then maybe the API could be simplified to just set_debug_message_handler(), which would replace any existing handler, or unregister it if NULL. This would also make changing the log level easier if the user specifies the same function.
Needing to pass in the pointer to the existing callback function seems like an arbitrary requirement if it’s only possible to register a single callback.
-Jacob
from azure-kinect-sensor-sdk.
Feedback from @yijiew
The design sounds nice to me. But I am afraid we cannot leverage this nice feature in our body tracking SDK. Because body tracking SDK is created on top of the K4A SDK but not wrapping around it. In order to use the body tracking SDK, the user still requires to call the K4A APIs. Since the registration API will only allow 1 callback function to be registered, if we redirect the logging system to use our own callback function, the logging behavior will be strange when the user directly calls the K4A SDK.
from azure-kinect-sensor-sdk.
@skalldri thanks for the feedback, I will plan to allow runtime changing of logging level.
@xthexder I like the idea of calling this k4a_set_debug_message_handler()
and using the same API to clear it. This is the same as k4a_capture_set_XXX_image() to add and clear an image.
@yijiew You should consider implementing the same k4a_set_debug_message_handler()
API, which will allow the user to forward BT and SDK messages to the same tool owned by the user.
from azure-kinect-sensor-sdk.
I love this. As an FYI for getting started, spdlog has an idea of sinks. We may want to do this by creating a custom sink which is just a callback.
Someone tried to create a callback sink in spdlog a couple years ago but the PR was denied because it was too specific for the spdlog library. Even though it was rejected, it might be interesting to see how they did it as a starting point.
PR can be found here: https://github.com/gabime/spdlog/pull/205/files
from azure-kinect-sensor-sdk.
Related Issues (20)
- Installing k4aviewer on Ubuntu 18.04 HOT 1
- Performance between Linux and Window
- Is there a way to transform specific cordinates of a color_image to that of a correspondant depth_image?
- Getting depth data without depth engine HOT 1
- get mkv use k4arecorder.exe output.mkv , and use ffmpeg to decouple rgb and depth, but depth always have 2 frames less than rgb
- Is there a way to run the Body Tracking Viewer in the other Sensor Orientation modes? HOT 1
- The --record-length parameter in k4arecorder does not match the actual length of the recorded video
- Open K4A Device failed! with the set up following the instructions HOT 2
- Azure Kinect on Jetson Orin HOT 1
- [vcpkg] Run-time crash due to multiple libraries trying to use the same log-file.
- Creating an Image in python from a numpy array doesn't work
- The check of the raw calibration size is incorrect
- Update python bindings to follow the PEP 8 standard
- A convenient way to copy the Sync Settings information is desired
- I have reviewed all the issues related to Azure Kinect, and due to its end-of-life status, Azure Kinect is no longer maintained. Orbbec's Femto Mega and Femto Bolt cameras can serve as alternatives to Azure Kinect. HOT 1
- IR image to color camera transformation changes pixel values HOT 1
- get image failed HOT 1
- Window:find_libusb_device(). libusb device(s) are all unavalable. Is the device being used by another application?
- Finding the turbojpeg.h file that is used in the transformation functions
- k4a_image_get_size() returns unexpected values
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-kinect-sensor-sdk.