[Documentation] [TitleIndex] [WordIndex

Errors when using package

Error: Cannot find the camera on the network

Solution:

Reset Cameras

You can try to reset all wge100 cameras on a PR2. The reset command sends a special command to the firmware that can allow the cameras to recover without power cycling the cameras.

After running this command, the cameras should recover. You can verify that all cameras are present by running pr2-systemcheck.

Error: Trigger mode set error

Solution:

Error: Discover error / ioctl failed

Solution:

Error: I'm getting images from the wrong camera

Solution:

Error: Many packets are dropped

Solution:

Dropped Frames and "rmem_max"

One common reason for dropped frames on Ethernet connected sensors is a buffer overrun in the kernel. The default kernel buffer size is rmem_default. Programs can increase the buffer size up to rmem_max using setsockopt, but they cannot change rmem_max. Only root can change rmem_max. When working with Ethernet cameras it is usually necessary to increase rmem_max so that the camera driver can allocate a large enough buffer. A poorly written driver might not know that it needs to increase its buffer, in which case rmem_default can also be adjusted (this will cause all applications to use large buffers though, so beware).

Temporary Changes

You can view rmem_max using sysctl

sysctl net.core.rmem_max

or using the /proc filesystem

cat /proc/sys/net/core/rmem_max

The same two ways are available to set rmem_max

sudo sysctl net.core.rmem_max=20000000

or using the /proc filesystem

echo 10000000 | sudo tee /proc/sys/net/core/rmem_max

Permanent Changes

The changes made using sysctl or writing to /proc are lost when the system is rebooted. To make the changes permanent, add a line to /etc/sysctl.conf

net.core.rmem_max=20000000

Programatic Changes

To set rmem_default for a socket, do

size_t bufsize = 20000000; 
if(setsockopt(s, SOL_SOCKET,SO_RCVBUF, &bufsize, sizeof(bufsize)) == -1) {
   ### Handle Error Here ###
}

and read it using

socklen_t bufsizesize = sizeof(bufsize);
if( getsockopt(s, SOL_SOCKET,SO_RCVBUF, &bufsize, &bufsizesize) == 0) {
    ### Use value here ###
}

Note that the read-back value will be double the written value on linux systems. Linux allocates more than is requested because user programs are not expected to anticipate packet storage overhead in the kernel.

You will need to include <sys/socket.h> (and possibly <sys/types.h>, see the setsockopt man page).

Error: No frames received for more than one second.

Solution:

Error: Trigger matcher dropping frames.

Solution:

Error: Failed to set trigger mode/IP.

Solution:

Warn: Camera Intrinsics have bad Checksum

Solution:

Warn: Camera Intrinsics have bad Checksum

Solution:

Error: Image resolution from intrinsics file does not match current video mode

Solution:

Camera Calibration is Wrong

Solution:

Things that can go wrong and that need to be handled


2022-05-28 13:08