The vendor's viewer streams live frames, but your script fails at its first device call with RuntimeError: No device connected, raised at config.resolve(pipeline_wrapper) or at pipeline.start(). The camera is almost never gone. In the case this guide is built on, a ROS camera driver launched earlier in another terminal already owned the device, so the SDK handed the script an empty device list. What follows is the check order that finds the owner in under a minute: the two commands that name it, why replugging alone fixed nothing, and the one-client design that keeps the error away. It applies to stereo depth cameras, ToF sensors and USB3 area scan cameras alike.
What the error text really reports
The message describes your process's device list, not your desk. Two observations settle it: the operating system enumerates the camera, since lsusb prints it and the viewer plays it, and your script's query returns zero devices it is allowed to claim. An empty claimable list prints the same words as an empty USB port, which is why this error sends people swapping cables that are fine.
| What you observe | What it means | First move |
|---|---|---|
Viewer streams; pipeline.start() raises "No device connected" |
Another client holds the only handle |
rosnode list, then lsof /dev/video*; stop that client |
Viewer and script both find nothing; lsusb empty |
Link, port or power | Swap the cable, try another port |
| "Permission denied" at open | Access rights on the device node | udev rule and group membership |
| Minimal script fails after a clean boot, no other client | SDK and firmware out of step | Match the SDK version to the camera firmware |
For the wider decision tree when an SDK cannot find a camera, isolating Linux access errors walks the branch points. This guide stays on the first row, because that is the row a running driver node produces.
The most likely cause: a driver node already owns the camera
Your script calls rospy.init_node, so it lives in a ROS workspace, and the habit that comes with that workspace is launching the camera driver with roslaunch before running anything that touches the camera. That was the working belief in the case here: no driver running, no data. It does not hold. The driver node is one client of the SDK; a script that imports the SDK's Python wrapper directly is a second, independent client. The stack hands one camera one exclusive native handle, so the driver's claim leaves nothing for the script to open, and the empty list prints as "No device connected".
The observed sequence proves it. Unplugging and replugging the camera changed nothing, because the still-running driver re-attached the moment the device re-enumerated and took the handle straight back. A restart with the driver deliberately not launched, followed by nothing but the minimal script, started cleanly. Depth and ToF cameras such as the MV-DT01WMU take the same single-claim rule as any stereo depth camera.
- Type
- Depth / ToF camera
Two commands that name the owner
-
rosnode listprints the running nodes; the camera driver appears under the name its package gave it. -
lsof /dev/video*prints every process holding a video device node, with PID and command line.
Cross-check the two outputs. When both point at the driver you launched, stop it: Ctrl-C the terminal where roslaunch is running, or kill the node by name. When lsof instead shows a leftover run of your own script or a notebook kernel, kill that PID. Then rerun the claim test below before changing anything else.
The minimal claim test
# Claim test: run with no other camera client active.
# rs = the vendor SDK's Python module (illustrative alias).
pipeline = rs.pipeline() # owns the handles to connected devices
profile = pipeline.start() # claims the first free device, or raises
frames = pipeline.wait_for_frames()
depth = frames.get_depth_frame()
print(type(depth)) # a depth frame class: the camera answered your process
The vendor's own introductory example walks 480 rows by 640 columns and calls depth.get_distance(x, y) 480 × 640 = 307,200 times per frame. When that script dies at pipeline.start() before a single sample, the failure happens at claim time; your algorithm never runs. One construction detail from the same case: rs.align(rs.stream.depth) and rs.pointcloud() belong after pipeline.start() returns, because they cannot be used while the pipeline is stopped.
If the import line itself fails instead, the problem is the wrapper installation, and the error names the module rather than the device. Those are different repairs, and the claim test tells you which one you need.
The other owners you forgot about
A driver node is the most common owner, not the only one:
- The vendor viewer left in play mode: it holds the handle while it streams.
- A crashed run of your own script whose process never exited; the claim survives the crash.
- A notebook kernel that keeps the import alive after the cell finishes.
- The camera passed through to a virtual machine, which leaves the host SDK enumerating nothing (who owns the device with Windows and a Linux VM).
With several cameras on one host, /dev/video numbering can shuffle between boots, so a launch file pinning a stale node number sends a driver to claim the wrong camera; stopping device path conflicts between USB cameras covers stable addressing.
When it really is the link or the rights
Two other messages, two other repairs.
"Permission denied" at open is an access-rights problem: udev rule and group membership. Udev rules that fix permission denied for USB cameras gives the rule, and the video and media node permission checks give the commands.
Nothing enumerates anywhere, with lsusb empty and the viewer dark too, is a link, port or power problem. Swap to a known-good spare such as the LS-CBL-0219, a 3 m USB3.0 high-flex drag-chain cable, and try a different port before suspecting the camera.
In the case this guide is built on the viewer streamed, so the cable was already proven good; the spare matters when the viewer goes dark along with the script.
Worked example: one camera, one driver node, zero claimable devices
Inputs, every one from the case above: the OS enumerates 1 camera, with lsusb and the viewer in agreement; 1 other client, the driver node started by roslaunch, already holds the native handle; the interface offers 1 exclusive handle per camera. The rule in words: your script can only claim what enumeration shows, minus what other clients already hold.
Arithmetic: 1 - 1 = 0 claimable, so pipeline.start() raises the error, printed with the same words an unplugged camera would give. Decision: claimable 0 while enumerated 1 means stop the owning process; reinstalling the SDK, reflashing firmware or replacing a cable adds no handles. Extend it to two scripts both calling pipeline.start() natively on one camera: 2 clients - 1 handle = 1 failure on every run, until one of them becomes a subscriber instead of an owner.
Pick one client and stay on its side
Two clean architectures, no third:
- Direct SDK script. Never launch the driver node for that camera, and check your workspace and boot scripts so nothing relaunches it behind you. The case here relaunched the driver before every session out of habit.
- ROS node. Let the driver node stay the only owner and subscribe to the image topics it publishes; convert frames with your ROS image bridge inside the node. Your code never touches the device layer. This is the same one-client rule behind a camera that works in the vendor tool but not in ROS.
GigE cameras add a control-channel version of the rule: one control client holds the device, so a second tool gets errors or an empty list until the first lets go, which is releasing GigE control from another process. USB3 area scan cameras such as the MV-CS200-10UM, a 20 MP USB3.0 model, take the same single claim as the depth camera above.
- Sensor format
- 1"
- Lens mount
- C-mount
- Interface
- USB3
- Resolution
- 16-25 MP
After a crash, kill the leftover PID from lsof, then replug the camera once to clear a stale OS-level lock. Replugging while the owner still runs just hands the handle back to it, which is exactly why the replug test failed in the case above.
When the usual answer is wrong
Clean boot, no driver, no viewer, no VM, and the minimal claim test still raises the error while lsusb lists the camera: suspect the software stack, not ownership. An SDK version that does not match the camera's firmware produces the same empty device list, covered in aligning SDK v2 firmware versions when no device is found. Fix that pairing before swapping hardware; a new cable changes nothing about a version handshake.
Checklist before you blame the camera
- Run the minimal claim test first; its outcome splits the problem in half.
-
rosnode listandlsof /dev/video*before any reinstall: they name the owner in seconds. - One camera, one native client, driver node or your script, never both.
- Close the viewer's play mode before running scripts against the same camera.
- Check boot and workspace startup scripts for auto-launched drivers before trusting a reboot as the repair.
- Do not pin
/dev/videonode numbers in launch files; addresses shuffle between boots. - Read the message literally: "No device connected" is ownership or enumeration; "Permission denied" is access rights.
Next step: if the cell is growing to several cameras on one host, draw the ownership map before the wiring. The systems topic page collects the integration guides, and the contact page gets expert help mapping clients to cameras.
Questions
Why does the vendor viewer see the camera while my SDK script does not?
The viewer enumerates every device the OS lists and claims one only when you press play; your script claims at start(). If a driver node took the exclusive claim earlier, the SDK's query can hand your process an empty list, and an empty list prints the same "No device connected" message as an unplugged camera. The viewer result proves the cable and port are good; it says nothing about free handles.
Is unplugging and replugging the camera enough to fix it?
Not while the owning process is still running. A driver node re-attaches the moment the device re-enumerates, so the script fails again, exactly what happened in the case behind this guide. Stop the node first, Ctrl-C the roslaunch terminal or kill it by name, then replug once to clear a lock left behind by a crashed process. On a clean boot with no driver launched, the bare script starts normally.
How do I list which process holds the camera on Linux?
Run lsof /dev/video* (or fuser -v /dev/video0) to print the process IDs holding the video device nodes, and rosnode list to see driver nodes by name. Cross-check the PID in both outputs: that is your owner. If the PID belongs to a leftover run of your own script or a notebook kernel, kill it, wait a second, and rerun the minimal start() test before touching drivers, firmware or cables.
Can two programs share one machine-vision camera?
Not as two native clients: the stack hands one camera one exclusive handle, so the second start() fails every time. Share through one owner instead. Let a driver node publish image topics and have any number of subscribers, or make your SDK script the single owner and re-publish its frames. On GigE cameras the same rule shows up as one control client holding the device. Two owners on one camera is a design error, not a tuning problem.
Could a firmware or SDK version mismatch cause this error instead?
Yes, as the next suspect once ownership is ruled out. If the minimal script still fails after a clean boot with no driver, viewer or virtual machine running, while lsusb lists the camera, align the SDK version with the camera firmware before swapping any hardware. The failure looks identical from the script side, zero claimable devices, which is why the two-command ownership check comes first.


