Suggestions on how to protect against static.
I’m looking for suggestions on how to protect the camera from static.
While I wouldn’t call it common, it’s definitely not unusual for us to see cameras partially disconnect from Windows when static is present.
In these cases, the cameras still appear in Device Manager, but data transmission stops.
-
Hi Steve Steve You can use your own choice of USB cable with RealSense cameras so long as it is a high quality cable designed for data transfer (i.e not an inexpensive device charging / sync cable). So you could explore the possibility of using a shielded twisted pair USB cable to increase protection against interference from electrostatic discharge (ESD).
You can find some examples of such cables if you google for the term below, including the speech marks in order to achieve the most relevant search results.
"usb cable" "shielded twisted pair"
-
Because the issue isn't uncommon...we've explored software solutions to allow us to reset the camera(s)
- Historically, power-cycling the cameras will resolve the issues encountered with static. But that's hard for a customer to do.
We are trying to call "HardwareReset()" on the devices, but sometimes we get this error:'ExternalException: rs2_hardware_reset(device:000001FBA1577BA0)Rethrow as Exception: hr returned: HResult 0x8007001f: "A device attached to the system is not functioning."Intel.RealSense.ErrorMarshaler.MarshalNativeToManaged (System.IntPtr pNativeData) (at <8f69383e07bb4010b4a8322e1cf5f071>:0)Intel.RealSense.Device.HardwareReset () (at <8f69383e07bb4010b4a8322e1cf5f071>:0)'
Also, this error when pulling the device list:
'ExternalException: rs2_create_device(info_list:000001B6FC326EE0, index:0)Rethrow as Exception: MFCreateDeviceSource(_device_attrs, &_source) returned: HResult 0x80070003: "The system cannot find the path specified."Intel.RealSense.ErrorMarshaler.MarshalNativeToManaged (System.IntPtr pNativeData) (at <8f69383e07bb4010b4a8322e1cf5f071>:0)Intel.RealSense.DeviceList+<GetEnumerator>d__3.MoveNext () (at <8f69383e07bb4010b4a8322e1cf5f071>:0)'
Can we get some clarification on what this error is? Is there a way to programmatically reset the cameras once we reach this state?
-
Aside from static interference, long cables should also be high quality ones, as performance degradation or camera connection drops are more likely to occur when using cables longer than 2 meters that are not 'industrial grade'. Using cables that contain 'active repeater' components also help to boost the signal over longer distances. The high quality USB cable supplier Newnex has examples of RealSense-validated cables that are equivalent third-party replacements for the 1 m official cable supplied with the cameras:
https://newnex.com/realsense-3d-camera-connectivity.php
A hardware reset disconnects the camera and then automatically reconnects it. On occasion though the auto-reconnection attempt may fail and the camera is not detected.
If you are using a device list and you program in C++, you could try a hardware reset script below which iterates through all attached cameras and resets them when they are ready.
// define a realsense context
std::cout << "Initialising realsense context" << std::endl;
rs2::context rs2Ctx;
rs2::device rs2Dev;
resettingIntelRealsense = 0;
resetCompleteIntelRealsense = 0;
int gotDev = 0;
// Define a callback mechanism - to detect when the sensor has been reset
rs2Ctx.set_devices_changed_callback([&](rs2::event_information& info)
{
// loop thru all new devices - that is one that has been reset effectively
for (auto&& dev : info.get_new_devices())
{
std::string devName = "";
std::string devSerialNumber = "";
std::string devFirmware = "";
std::string devProdId = "";
devProdId = dev.get_info(RS2_CAMERA_INFO_PRODUCT_ID);
devSerialNumber = dev.get_info(RS2_CAMERA_INFO_SERIAL_NUMBER);
devName = dev.get_info(RS2_CAMERA_INFO_NAME);
if (devName == "Intel RealSense D415")
{
devFirmware = dev.get_info(RS2_CAMERA_INFO_FIRMWARE_VERSION);
}
if (devName == "Intel RealSense D435")
{
devFirmware = dev.get_info(RS2_CAMERA_INFO_FIRMWARE_VERSION);
}
std::cout << "RESET Dev: " << devName << " Ser: " << devSerialNumber << " Firmware: " << devFirmware << " ProdID " << devProdId << std::endl;
resetCompleteIntelRealsense = 1;
}
});
// interate thru the intel device context looking for intel sensors
// note that other devices like webcams can appear here too depending on their device type
for (auto&& dev : rs2Ctx.query_devices()) // Query the list of connected RealSense devices
{
std::string devName = "";
std::string devSerialNumber = "";
std::string devFirmware = "";
std::string devProdId = "";
devProdId = dev.get_info(RS2_CAMERA_INFO_PRODUCT_ID);
devSerialNumber = dev.get_info(RS2_CAMERA_INFO_SERIAL_NUMBER);
devName = dev.get_info(RS2_CAMERA_INFO_NAME);
if (gotDev == 0 && (devName == "Intel RealSense D415" || devName == "Intel RealSense D435"))
{
devFirmware = dev.get_info(RS2_CAMERA_INFO_FIRMWARE_VERSION);
// assume there is only one intel camera for now
// save the device for future use
rs2Dev = dev;
gotDev = 1;
}
std::cout << "System Dev: " << devName << " Ser: " << devSerialNumber << " Firmware: " << devFirmware << " ProdID " << devProdId << std::endl;
}
////////////////////////////////////////////////////////////////
// if we have found a realsense sensor - force initialise it if required
if (gotDev == 1)
{
// reset the hardware device found during initial iteration thru context
rs2Dev.hardware_reset();
// wait for hardware to reset reset
resetCompleteIntelRealsense = 0;
int rs2WaitForReset = 1;
// pause until device is reset - not elegant but will do for testing
while (resetCompleteIntelRealsense == 0 && rs2WaitForReset < 9999999999)
{
rs2WaitForReset++;
}
}
if (gotDev == 0)
{
std::cout << "No Intel Realsense devices detected" << std::endl;
} -
Thanks for the specific cable recomend! (Really...thanks!)
I tested and rejected 3 cables from different manufacturers just yesterday
We'll take a look at the code sample--thank you.
I know we are already itterating through the cameras for reset, but it doesn't hurt to look over that code again.
Please sign in to leave a comment.
Comments
6 comments