Adding a second synchronized IR stream to a dual-IR depth camera looks like a one-line change: set enable_ir2 to true, relaunch, and expect frames on the ir2 topic. Instead, the whole driver node dies, the nodelet manager follows it down, and the log ends in exit code -8. This page is for engineers bringing up dual-IR depth cameras over USB 3 in ROS. You will decode the exit code, rank the two real causes — a driver stack that predates the second stream, and a stream set that no longer fits the link — and fix either one with numbers instead of trial and error.
Why does the driver die the moment the second IR stream is enabled?
Two things kill a driver at load time: a release that predates the second stream, and a stream set that no longer fits the USB 3 connection; with exit code -8 arriving at the enable_ir2 parameter, the version gap is the first suspect.
Three details in the log mark this as a load-time abort rather than a runtime failure. The driver nodelet fails while the manager is still loading it, the manager then reports its own death on the same signal, and the separate load call returns 255 because the manager it talks to is already gone. Nothing was published — no depth frames, no ir2 topic — because the driver never finished coming up.
The parameter itself is the clue. A launch file accepts enable_ir2 because the wrapper's schema lists it, but schema and capability are different things: the setting exists in the release line even when the loaded driver binary predates the second stream. Rank the causes in this order.
- Driver stack version gap. The wrapper or capture library predates second-IR-stream support. Most likely when the first IR stream enables and runs fine on its own.
- Link running at USB 2.0 speed. 480 Mbit/s carries no full stream set, and an older driver aborts instead of refusing the request cleanly.
- Combined set over the host controller's USB 3 budget. Realistic on hubs and shared controllers; the arithmetic is in the bandwidth section below.
Check them in that order: the first costs ten minutes, the second one cable swap, the third one calculation.
What does exit code -8 actually tell you?
A negative exit code means the operating system killed the process on a signal, and the number after the minus sign is that signal number; exit code -8 is signal 8, while the companion 255 on the load call is the loader reporting its target already dead.
The location matters more than the number. A negative code here means the death happened inside the driver's load path, during its first pass over the stream configuration, before any USB transfer was attempted. That timing separates this failure from the friendlier ones: a bandwidth shortfall at runtime shows up as dropped frames, a stream that refuses to start with a logged error, or a camera that drops off the bus. A crash before the first frame points at the software stack, because the code that would have handled a refusal gracefully never got the chance to run.
The fastest test needs no ROS: run the camera with the manufacturer's own capture utility and enable the second IR stream there. If the utility shows ir2 frames, the camera and its firmware support the stream, and the stale component is the middleware wrapper or the library under it. If the utility also fails, the update in the next section covers both cases.
How do you update the driver stack in the right order?
Update the whole stack together: camera firmware, capture library and middleware wrapper, because any version skew aborts the same way, and pull all three from the camera manufacturer's or its distributor's own download pages, then rebuild the wrapper against the installed library.
A wrapper from one release running against a library from another, or a library expecting firmware newer than what is flashed, produces the same abort as a missing feature. Rebuild the wrapper from source against the installed library rather than reusing a cached build. On Windows hosts the install order decides whether the camera enumerates at all, and the driver install order on Windows guide walks that sequence.
Write down three versions before you start: firmware as the utility reports it, the installed capture library, and the wrapper package. After the update, all three should come from one release line. Two follow-up patterns are worth knowing: a camera that stops publishing after a firmware flash alone needs the rebuild described in fixing a depth stream missing after a firmware update, and header or interface errors at startup mean the components disagree, which the firmware and SDK version alignment guide covers.
Only then does the enable_ir2 test mean anything: relaunch with the parameter set and watch the nodelet load before touching anything else.
How much bandwidth does a second IR stream add?
The second IR stream adds the same 9.2 MB/s as the first, the payload of one 640 × 480, 8-bit stream at 30 frames per second, so the added stream is small and what refuses the link is the total of every stream enabled at once.
A USB 3.0 connection runs at a 5 Gbit/s line rate. 8b/10b coding leaves 500 MB/s of raw payload, and after packet and protocol overhead you can plan on roughly 350-380 MB/s when several video streams run at once. Treat that as the working budget per host controller, not per port. The fuller version of this calculation on small boards is in USB bandwidth for multi-stream depth cameras on embedded hosts.
Worked example, the whole stream set of a typical dual-IR camera:
| Stream | Pixels | Bytes per pixel | Rate | Payload |
|---|---|---|---|---|
| Depth | 640 × 480 | 2 (16-bit) | 30 fps | 18.4 MB/s |
| IR 1 | 640 × 480 | 1 (8-bit) | 30 fps | 9.2 MB/s |
| IR 2 | 640 × 480 | 1 (8-bit) | 30 fps | 9.2 MB/s |
| RGB (YUY2) | 1280 × 720 | 2 | 30 fps | 55.3 MB/s |
| Set total | 92.1 MB/s |
Each row is the formula in one line: depth is 640 × 480 × 2 × 30 ÷ 1,000,000 = 18.4 MB/s; each IR stream is 640 × 480 × 1 × 30 ÷ 1,000,000 = 9.2 MB/s; RGB is 1280 × 720 × 2 × 30 ÷ 1,000,000 = 55.3 MB/s. The set totals 18.4 + 9.2 + 9.2 + 55.3 = 92.1 MB/s, about a quarter of the budget. Without IR 2 the set drew 82.9 MB/s, so the second stream raised demand by about 11% — a refusal at exactly this step on a healthy USB 3 root port is almost never bandwidth. Go back to the software stack; the budget only gets tight when the set grows, rates rise, or the controller is shared.
Why does the link refuse the stream set instead of slowing down?
Isochronous USB transfers reserve their bandwidth when the stream is configured, not frame by frame, so when the requested total passes what the controller will grant the configuration is refused outright, and a driver without a clean error path for that refusal aborts instead of reporting it.
Bulk transfers degrade gracefully: everything slows and frames drop. Isochronous video cannot, because the controller grants reservations at configuration time until its budget is spent, and a request beyond it fails on the spot. A driver written before multi-stream cameras made that refusal common has no error path for it, and an unhandled refusal at load takes the process down. That is why one symptom covers both causes.
The budget belongs to the host controller, not to the port. Two cameras on ports served by the same controller share one pool, and a hub puts everything behind a single upstream link — the pattern in why depth cameras fail on a USB hub. Before blaming arithmetic, check the two faster explanations:
- Negotiated speed. A camera on a USB 2.0 port has a practical budget near 40 MB/s against 60 MB/s theoretical, which no full set fits; the USB 2.0 bandwidth check walks through it, and a marginal cable that falls back to a lower speed does the same damage, as the 5-meter USB 3.0 cable test shows.
- Neighbours on the controller. A second camera, a storage drive or a dock can hold the reservation your set needs.
One differentiator closes the list: if the camera disappears from the bus as the stream starts, rather than the host process dying, the cause is power, not bandwidth — bus-powered hubs sag when an IR illuminator switches on, and that pattern with its fix is in the USB power budget guide.
How do you trim the stream set until it fits?
Cut frame rate first, then resolution, then whole streams that nothing subscribes to, because every enabled stream consumes budget even when no node reads it; halving the second IR stream from 30 fps to 15 fps takes it from 9.2 MB/s to 4.6 MB/s.
Apply that to the worked example:
| Change | Arithmetic | Result |
|---|---|---|
| IR 2 down to 15 fps | 640 × 480 × 1 × 15 ÷ 1,000,000 | 4.6 MB/s |
| RGB stream removed | nothing subscribes to it | -55.3 MB/s |
| Trimmed set total | 18.4 + 9.2 + 4.6 | 32.2 MB/s |
32.2 MB/s fits inside a USB 2.0 link's practical 40 MB/s and uses under a tenth of a USB 3 controller's budget, so the trimmed set also survives a port change or a cable swap. Keep full rate for the streams the depth result depends on; trim the ones you sample occasionally, and delete the ones nobody reads.
If every remaining stream is genuinely needed at full rate, stop trimming. That decision is next.
When should you stop trimming and change the hardware?
When the streams you genuinely need still exceed one controller's 350-380 MB/s budget, usually because two cameras share a host controller, stop trimming and change the hardware: move one camera to a port on another controller, or step up to a sensor class that carries less or has more.
Interface numbers put the options on one line. GigE Vision carries about 118 MB/s in practice, a step down from USB 3 for raw streams. 10 GigE reaches roughly 1,180 MB/s, and CoaXPress moves several hundred MB/s into a frame grabber with deterministic timing.
The cheaper decision is often the sensor class rather than the interface. Many industrial stereo and structured-light 3D cameras compute depth on board, so only the depth result crosses the cable and the two raw IR images never touch the bus. If your application needs depth only, that class removes the budget problem instead of managing it. The 3D sensors category groups sensors by type — laser profilers, stereo and structured-light cameras, ToF — and the 3D camera finder narrows the list by series and availability.
So the decision reads: raw IR images at full rate with the set under the budget — dedicated USB 3 controller, done. Depth only — an onboard-processing stereo sensor ends the question. Set still over budget after honest trimming — move to a 10 GigE or CoaXPress class of hardware rather than degrade the data you designed the system around.
How do you keep the crash from coming back?
Pin the three software versions together and budget the streams before you enable them: record firmware, capture library and wrapper versions alongside the launch file, and recompute the stream set's MB/s total whenever you add a stream or raise a frame rate.
Bring the set up in steps on the bench: depth plus the first IR, confirm frames; then enable_ir2, confirm the second topic; then RGB. A stepwise bring-up isolates the exact stream that tips the configuration, and the same launch file becomes the regression test after any update. Rerun the MB/s total whenever a camera joins the controller — the multi-camera version of the budget is in multiple USB cameras on one host.
If the total says the set cannot fit the controller you have, decide before deployment: trim for good, split the cameras across controllers, or change sensor class. The 3D camera guides collect the remaining bring-up and bandwidth fixes, and the configurator below steps through the camera and host choices for a new station.
The configurator matches a camera, lens, light, light controller and cables to each other, step by step, and lists only parts that fit what you already picked.
If a crash survives a matched stack and a set that fits, gather the three versions, the stream table and the log from the manufacturer's utility, then use the contact page — that one page of evidence splits the remaining causes fast.
Questions
Does a USB hub make the second stream fail more often?
Yes, twice over. A hub shares one upstream link, so the camera's full stream set competes with every other device behind it, and raw multi-stream requests are refused more readily there. A bus-powered hub adds a second failure mode: the illuminator's start-up surge sags the rail and the camera drops off the bus. Use a root port, or a powered hub with the combined budget recomputed before you enable the second stream.
Can a USB 2.0 link carry any useful part of this stream set?
Only a trimmed one. A USB 2.0 link offers about 40 MB/s in practice against 60 MB/s theoretical. Depth at 18.4 MB/s plus the first IR stream at 9.2 MB/s plus the second IR stream at 15 fps, 4.6 MB/s, totals 32.2 MB/s and runs. Adding the 55.3 MB/s RGB stream does not. Check the negotiated link speed before you blame the driver.
Where should the updated firmware and drivers come from?
From the camera manufacturer's download page or from the distributor that supplied the camera, and from nowhere else. Third-party mirrors repack installers with old or altered libraries, and a version mismatch reproduces the exact abort you started with. Note the firmware, capture library and wrapper versions before and after the update, so a future crash traces back to one change.
Do you need the second IR stream running for depth output?
Only if a node actually subscribes to the IR 2 topic. Depth output does not require the raw second IR images over USB; the second stream matters for synchronization checks, projector debugging or custom stereo work. If nothing consumes the images, leave it disabled and both the extra bandwidth and this crash disappear from your bring-up.