Unable to Detect Basler Camera in CtrlX App Build Environment

Hello everyone,

I am developing an object detection application for CtrlX using a Basler camera. The application works fine on my Windows environment; however, when I deploy the app to the CtrlX app build environment, it throws the following error:

No Basler camera detected!

I am using the pypylon library to interface with the camera, but I am unable to detect the Basler camera in the CtrlX app build environment.

Steps Taken:

  • I am using Flask to create a simple web interface to stream the video from the camera.

  • The Basler camera is successfully detected when running the app on Windows.

  • However, when I deploy the same application to CtrlX (using an SSH connection to the app build environment), the app cannot detect the camera and reports the "No Basler camera detected" error.

  • I can ping the camera's IP address from the CtrlX app build environment, so the network connection seems fine, but it still does not detect the camera.

Relevant Code:

Here’s a snippet of the relevant code I am using to connect to the camera:

from pypylon import pylon # For Basler Camera

# Initialize the camera

tl_factory = pylon.TlFactory.GetInstance()

devices = tl_factory.EnumerateDevices()

if not devices:

print("No Basler camera detected!")

exit(1)

camera = pylon.InstantCamera(tl_factory.CreateFirstDevice())

camera.Open()

What I’ve Tried So Far:

  • Ensured the camera is connected via Ethernet and I can ping the camera’s IP address from the CtrlX environment.

  • Verified the pypylon installation in the CtrlX environment.

  • Tried various network settings and ensured that the camera is properly configured to be accessible via IP.

Questions:

  1. Is there a specific configuration needed for Basler cameras to work within the CtrlX app build environment?

  2. Should I use a different method to access the camera in this environment?

  3. Are there any additional libraries or settings needed for network-based camera detection in CtrlX?

I would appreciate any suggestions or guidance on how to solve this issue.

3 replies