NxLib initialize error

General Information

  • Product: e.g. N36-606-16-BL
  • Serial Number: 201234
  • Ensenso SDK Version: 3.4.473
  • Operating System: Linux (Ubuntu 22.04)
  • Data Attachments?
    • File Camera
    • Profiler log
    • Photo of setup
    • Screenshots

I am using the ensenso camera node from the ros repo (GitHub - ensenso/ros_driver: Official ROS driver for Ensenso stereo cameras.). I got the following error message: “Error while initializing the NxLib. Shutting down node”. I tried restarting the node/program multiple times but it did not help.
NxView did not list the camera either. The camera was connected to the machine, and it had power.

After a reboot of the machine the error disappeared, and the camera was up and running.

What could be causing this?

Hello Erblin,

did the error occur on a fresh installation of the Ensenso SDK? The installation prepares it so the environment variable ENSENSO_INSTALL is set, which the SDK requires to load properly, but this takes a restart or manual intervention to work. If you did not restart after installing the SDK, this might explain the failure of the ROS node, but then NxView should have failed to start and shown you an error message, so this was probably not the cause.

In case the camera does not appear in NxView again despite being properly set up, can you record a log and post it here? In NxView you can just press Ctrl+L once to start logging and again after a few seconds to stop. The log is then opened in the NxProfiler application, from which you can save it to a known location. It would be great if you could also include a copy of the NxLib tree, which you can obtain using NxTreeEdit:

How to copy the NxLib tree
  • Open NxTreeEdit.
  • Connect to NxView.
  • Right-click the root node / at the very top.
  • Select “Copy value as JSON string” from the context menu.
  • Paste the JSON into any text editor and save.

You can also use NxTreeEdit to save a log:

How to record a log from NxTreeEdit
  • Open NxTreeEdit.
  • Connect to NxView.
  • Open the debug tab at the bottom of the NxTreeEdit window.
  • Select “Trace” as the debug level.
  • Wait a few seconds.
  • Stop the debugging and open or copy the resulting file.

If the initialization fails again in the ROS node, you can modify the error message, which originates in https://github.com/ensenso/ros_driver/blob/master/ensenso_camera/src/camera_node.cpp#L31, to include the error message, like here. This might give us an idea what caused the error.

Regards,
Raphael