Debugging and Simulation

Debug logging and profiling

NxLib offers debug logging which can be enabled, configured and read out over TCP using NxLibRemote and NxTreeEdit without modifying the user application. Additionally the user application can insert profiling blocks and messages from its own threads. The resulting debug data can be visualized in NxProfiler and allows deep insights into multithreaded code in NxLib and the user application to analyze performance bottlenecks and optimization potentials.

For more information on how to use NxLib debug logging please read the Exporting Debug Information topic.

_images/nxprofiler.png

File Cameras

In order to debug multiple cycles of a user application you can also save data sets into files and replay them again via NxLib. Based on the saved image files NxLib emulates a camera which behaves almost like a hardware camera, but it simply acquires image data from a local folder instead of grabbing images from a hardware sensor. This allows to consistently simulate the very same sequences over and over again to reproduce and fix bugs in user applications with no or minimal changes to user code compared to capturing from hardware cameras.

For more information please read the topic Using File Cameras.

Virtual Cameras

Virtual cameras take a scene with multiple 3D objects as input and simulate the camera raw images on the scene. Objects are given as STL or PLY files and can be positioned arbitrarily. Virtual cameras then behave just like normal hardware cameras, except that the raw images are generated from the virtual world defined by the objects in the Objects node. Virtual cameras can be used to evaluate data quality, completeness, resolution and noise on a scene with different camera models. When integrating the scene generation and modification into the application virtual cameras can be used to run entire applications in a complete offline simulation, allowing to evaluate the results against the virtual ground truth or perform offline performance assessments over many virtual executions of the process, e.g. bin picking with many randomly filled bins.

For more information please refer to the topic Using Virtual Cameras.