3D visionTroubleshooting

initial_reset true stuck on resetting device: when a reset is needed

Why a depth camera launch gets stuck at Resetting device... on initial_reset true, why userspace USB backends never complete the reset, and the fix that works.

LumaSpec Vision10 min read Share on LinkedIn

On this page 9 sections
  1. 01The symptom and the quick answer
  2. 02What initial_reset actually does
  3. 03Why the reset hangs on a userspace backend
  4. 04Test the likely causes in order
  5. 05The fix: set initial_reset to false and confirm the stream
    1. Budget the recovery you can actually get
  6. 06When a reset is genuinely needed
  7. 07Prevention: keep resets out of every launch file
  8. 08The decision, case by case
  9. 09Questions

A depth camera launch freezes at "Resetting device..." and never opens a stream, yet the same camera streams the moment initial_reset is set to false. If you run depth cameras from a Linux controller or a ROS launch file, here is the mechanism behind the hang, the four causes to test in order, and the decision for each case. The short version: a startup reset is recovery for a device a crashed session left busy, and on a userspace (RSUSB/libuvc) backend the reset request never completes, so the wait has no end.

The symptom and the quick answer

The launch log prints "Resetting device..." and stops: no device re-open, no streams, and no error after it. Set initial_reset to false and the same camera on the same port enumerates and streams normally. The flag was true on purpose, and the SDK behind it had just been rebuilt on the userspace backend; on the earlier kernel (V4L2) build, the same true value ran to completion.

That pairing — the reset hangs on the userspace build, the camera streams fine when the flag is false — is the signature of this fault. It is a software-path problem, not a failing camera.

The quick answer: set initial_reset to false in every launch file and leave it there. Use a reset only as a deliberate one-off after a crash that leaves the camera genuinely busy, and prefer a five-second unplug, which restarts the firmware under every backend.

What initial_reset actually does

initial_reset is a launch parameter of the ROS wrapper, and its default is false: it does nothing unless you set it true. With it true, the wrapper does one extra thing before it opens any stream — it asks the camera firmware to reset. The firmware restarts, the USB device drops off the bus and comes back as a fresh enumeration, and only then does the wrapper open the camera and start the depth stream.

The reset exists for bad deaths. A pipeline killed with a hard kill signal, a launch that crashed mid-stream, or a host that lost power while the camera stayed powered can leave the firmware holding streams that nothing closed. The next open then fails or reports the device busy. One reset clears that state, which is the entire job of the flag: recovery for a dead session, not startup hygiene.

Even where it completes, it is not free. Every boot pays a firmware restart and a re-enumeration of roughly one to two seconds before the first frame.

Why the reset hangs on a userspace backend

A UVC depth camera can be driven two ways. The kernel path uses the kernel's V4L2 driver: the kernel owns the device and exposes /dev/video nodes, and a driver that is missing or misbuilt shows up there first, as the no-video-device failure with its own fix. The userspace path — an SDK rebuilt with the RSUSB backend, built on libuvc over libusb — has the SDK claim the USB device directly. Userspace builds are common where you control the whole USB stack, on embedded rigs built from board-level cameras above all.

On the kernel build the reset sequence closes. The device drops, the kernel re-enumerates and re-binds it in about a second, and the wrapper reopens the fresh device and streams. That is the behavior the same flag used to show.

On the userspace build the same request restarts the firmware and then stalls. The camera comes back as a fresh enumeration, but the wrapper keeps waiting on the device it reset, the new instance never gets opened, and no timeout fires. The launch sits at "Resetting device..." with nothing left to recover. The camera itself is healthy — with the flag false it streams normally — but on this backend the recovery path cannot complete.

The tell: the same true value completes on the kernel build and hangs on the userspace build. That points at the backend, not the hardware.

Test the likely causes in order

Run the tests top to bottom; the first costs one relaunch.

Symptom Likely cause Test Fix
Hangs only with initial_reset true; false streams fine Userspace backend cannot complete a reset One relaunch with false Keep false everywhere; recover by unplug when needed
Will not open even with false, right after a killed or crashed run Firmware holds streams from the dead session SDK reports the device busy or an open failure One five-second unplug, or one true-flag launch, then false
No device found at all A stale process holds the device, or the driver build is incomplete Stop every wrapper and viewer process, then relaunch once Kill the stale process; finish the driver build
Drops off the bus mid-stream, or enumerates at the wrong USB speed Link fault: cable, hub or port Swap in a short known-good cable; move to a root port Fix the link — unrelated to the reset flag

Row three has a dedicated walk-through in the USB open failure fix. Row four is a link problem, and a camera that enumerates at the wrong speed starts with the USB 2.0 enumeration fix.

The fix: set initial_reset to false and confirm the stream

  1. Stop the hung launch. Kill the wrapper process; a launch stuck in the reset wait has opened no streams, so there is nothing to close cleanly.
  2. Set initial_reset to false in every copy of the launch file, including debug and recovery variants.
  3. Relaunch and read the log: device found, streams opened, first frames within about ten seconds. If the log still stops before the stream opens, the flag was never the whole problem — go back to the table above.
  4. Confirm data, not just the absence of errors: depth values arrive and change while you move a target through the field of view.

Budget the recovery you can actually get

Put numbers on the choice. Recovery by replug: five seconds unplugged guarantees the firmware loses power and forgets its claimed streams; enumeration takes about one second once the firmware is up; opening the device and producing the first frame takes one to two seconds on a healthy USB 3 link. The sum is 5 + 1 + 2 = 8 s — call it 10 s with slack — and it works under every backend, because no software step has to answer.

An automatic reset on the userspace backend contributes an unbounded wait, so no budget survives it. That asymmetry, 8 s of certain recovery against a wait that never ends, is the argument for false in production and for the replug as the deliberate recovery step.

When a reset is genuinely needed

The legitimate case is a session that died without cleanup: a hard kill, a crashed pipeline, a host power loss while the camera stayed powered. The firmware keeps its streams claimed, the next launch fails even with initial_reset false, and relaunching alone never clears it.

Recover once, deliberately. Either unplug the camera for five seconds and replug, or set initial_reset true for exactly one launch, watch the device drop and come back, and confirm one clean stream. Then set the flag back to false. A true value left in the file turns the recovery back into the hang at the top of this guide.

If the camera is busy after every crash, the defect is upstream of the flag: the shutdown path. Stop the streams and release the device when the process is asked to exit, so a normal stop leaves nothing for a reset to clear. On unattended cells, detect the busy state at startup and recover programmatically — the busy-on-startup detection and reset pattern covers those checks in detail.

Prevention: keep resets out of every launch file

  • initial_reset false everywhere, including the debug and recovery variants. The one file left true is the one that ships by accident.
  • Close what you open. Handle the exit path so streams stop and the device is released before the process ends.
  • One owner per camera. A stale viewer or a second wrapper holding the device produces an open failure that looks like a reset problem.
  • Contain crashes in multi-camera rigs so one dead stream cannot take the others down; the multi-camera failure containment pattern shows the shape of it.
  • Recover by power, not by flag: the five-second unplug is the station's recovery step, and it works on every backend.
  • A soft reboot is not a power cycle. Many hosts keep USB ports energized across a reboot, so the camera can carry firmware state through what looks like a fresh start; only a full power-off clears it for certain.
  • Settings changes need no reset at all: stop the streams, apply, restart, as the apply-without-replug pattern lays out.

The decision, case by case

  • Userspace (RSUSB/libuvc) build, launch stuck at "Resetting device..." with initial_reset true: set false and keep it false. The camera streams; the reset path is what cannot complete.
  • Camera will not open after a crashed session, even with false: one five-second unplug, or one true-flag launch, then false again.
  • Stuck in the same place with false: the flag is not involved — stale process, incomplete driver build or bad USB link, in that order.
  • Reaching for a reset after every boot: stop, and fix the shutdown path or the device ownership instead. A resident reset is a hang waiting for a backend that cannot deliver it.

For a new station, favor depth cameras supported by their SDK on your controller out of the box, so you never have to build a backend yourself: the 3D sensors range covers laser profilers and stereo and structured-light depth cameras, and board-level modules cover the embedded side. The camera finder filters by interface and mounting, and the configurator walks the camera, controller and trigger choices in order.

Cameras3D sensors

Laser profilers and stereo 3D cameras

170 models · from $699.00

The other depth-camera startup, recovery and driver-alignment guides sit on the 3D camera topic page.

Questions

Is a startup reset useful on every boot?

No. It is a recovery step for a camera left busy by a session that died without closing its streams. On a backend where the reset completes, it still restarts the firmware and adds a re-enumeration of a second or two to every launch. Keep it false so the camera opens directly, and reset deliberately only when a crash actually leaves the device busy.

The launch hangs at Resetting device... even with initial_reset false — what now?

Then the flag is not your problem. The usual suspects are a stale process that still holds the device from a previous run, an incomplete driver build, or a USB link fault. Stop every wrapper and viewer process, relaunch once, and if the camera still will not open, work through the open-failure checks before touching any reset setting.

Is unplugging the camera equivalent to the reset flag?

For firmware state, yes: about five seconds unplugged removes power, so the camera restarts with no streams claimed and enumerates as a fresh device. It works under every backend because no software step has to answer. Unplug, wait five seconds, replug, and relaunch with initial_reset false — the same recovery without the hang.

Can I leave initial_reset true if the build uses the kernel backend?

It usually completes there, because the kernel re-binds the re-enumerated device within about a second. It still costs a firmware restart on every boot, and it breaks the day the SDK is rebuilt on a userspace backend, which is a common move on embedded controllers. One launch configuration, false everywhere, is easier to keep correct.

Do any cameras in your range need initial_reset set?

No. The flag belongs to a driver wrapper, not to a camera, and no camera needs a reset before every stream. Treat any reset — flag or unplug — as recovery for a device a crashed session left busy. The depth cameras in our 3D sensor range are no exception, and they open straight into a stream.