Troubleshooting

Camera Issues

IR bleed in images
_images/ir_bleed_example.png

Fig. 1 Consecutive images in a sequence showing the projection of an IR pattern

When the depth sensor is in use, it projects an IR pattern on alternate frames (see left image). The pattern causes feature detection to perform poorly so Slamcore runs on an “interleaved mode” and uses only alternate images without the IR pattern projection.

However, in some scenes the IR may bleed to the next frame depending on the exposure time and the textures in the scene (see right image: IR bleed on the black texture). To mitigate the IR bleed, configure the Base.Readers.Property.AutoExposureLimit parameter as described in RealSense Configuration.

No RealSense device found
No RealSense device found. Is your device plugged in?
Error: Failed to query camera serial number: No such device (generic:19)

Cause

If the camera is plugged in, the USB connection might be faulty or the kernel might not have been patched correctly due to Secure Boot BIOS settings.

Solution

If the camera is connected when you get the error, check if the videodev module is loaded.

$ lsmod | grep videodev

If this is not present, it usually indicates Secure Boot is enabled and the kernel modules were not patched correctly. You can either disable Secure Boot by rebooting your computer and entering the BIOS menu or you can uninstall any existing slamcore-dkms package and try reinstalling it, this time setting an MOK key as explained in the slamcore-dkms README Troubleshooting section.

To remove existing slamcore-dkms installations:

$ sudo apt remove slamcore-dkms

or in case you installed librealsense2-dkms, you can remove this with:

$ dpkg -l | grep "realsense" | cut -d " " -f 3 | xargs sudo dpkg --purge

Then follow the instructions on the Setting up a camera page and slamcore-dkms README to install this package correctly.

Could not find metadata for sensor
Metadata error:

Could not find metadata for sensor
Slamcore DKMS may not be correctly installed.

Cause

Slamcore DKMS is not correctly installed. The DKMS package that patches the kernel to enable correct communication with the camera may not be correctly installed or your system’s kernel version might not be currently officially supported. This error may occur even when RealSense Viewer appears to be running correctly.

Solution

If you have not installed the Slamcore DKMS package previously on your machine then follow these instructions in Setting up a camera. This page includes instructions for supported and unsupported kernel versions.

If you have installed slamcore-dkms or librealsense2-dkms previously then it is best to ensure old versions are removed before installing a new one. You can remove old slamcore-dkms installations by running the following command:

$ sudo apt remove slamcore-dkms

You can remove old librealsense2-dkms installations by running the following command:

$ dpkg -l | grep "realsense" | cut -d " " -f 3 | xargs sudo dpkg --purge

If you have built from source, you can remove kernel modules installed from source by running:

$ cd /path/to/librealsense
$ ./scripts/patch-realsense-ubuntu-lts.sh reset

Once you have done either one or all of the above steps then you should follow the instructions for installation of the Slamcore DKMS package in Setting up a camera.

Could not retrieve camera configuration, please ensure that the camera is registered
Failed to receive camera config: HTTP Response: 403 | "You do not have permission to perform this action."
Error: Could not retrieve camera configuration, please ensure that the camera is registered at https://portal.slamcore.com.

Cause

The camera being used isn’t registered to the user’s account.

Solution

Register the camera on your Slamcore account following the instructions on the Setting up a camera page.

Error: Failed to auto-detect camera vendor
Auto-detecting your camera...
Error: Failed to auto-detect camera vendor

Cause

The camera could not be detected.

Solution

Ensure the camera is plugged in.

RealSense camera over USB <version> not supported
RealSense camera over USB 2.1.0.0 not supported. Minimum supported 3.0.0.0
Error: Failed to query camera serial number: Operation not supported (generic:95)

Cause

The camera is connected using a non USB3-capable port and/or a non USB3-capable cable.

Solution

Connect the camera using USB3.0 hardware.

Unsupported D435i/D455 camera firmware
RealSense camera firmware 5.14.0.0 not supported. Please install one of
the supported firmware versions: { 5.12.3.0, 5.12.6.0, 5.12.7.100, 5.12.8.200, 5.12.11.0,
5.12.12.100, 5.12.13.50, 5.12.14.50, 5.12.15.50 }
Error: Failed to query camera serial number: Operation not supported (generic:95)

Cause

Firmware version on the connected D435i/D455 is not supported.

Solution

Update the camera firmware to one of the supported versions. Versions 5.12.3.0 - 5.12.15.50 are supported.

To do this, you will need to install tools from the librealsense2 SDK. Intel provides a Debian package which can be easily installed on x86_64 systems which includes tools to change the camera firmware. These packages are not currently available for arm64 platforms.

Below we provide instructions on how to install these tools based on Intel’s Linux Installation Guide. In case of doubt, always refer to the official instructions.

The following instructions assume you have already patched the kernel using the Slamcore DKMS package. If that is not the case, first see Setting up a camera.

To install the firmware update tool, first register the server’s public key:

$ sudo mkdir -p /etc/apt/keyrings
$ curl -sSf https://librealsense.intel.com/Debian/librealsense.pgp | sudo tee /etc/apt/keyrings/librealsense.pgp > /dev/null

Make sure apt HTTPS support is installed - sudo apt-get install apt-transport-https

Add the server to the list of repositories:

$ echo "deb [signed-by=/etc/apt/keyrings/librealsense.pgp] https://librealsense.intel.com/Debian/apt-repo `lsb_release -cs` main" | \
$ sudo tee /etc/apt/sources.list.d/librealsense.list
$ sudo apt-get update

Finally, install the librealsense2 tools:

$ sudo apt-get install librealsense2-utils

Once you have the RealSense tools installed, follow the firmware update instructions provided by Intel RealSense to install one of the camera firmware versions supported by our software (5.12.3.0 - 5.12.15.50).

Error failed to open scan_element
15/04 14:07:37,618 ERROR [140332946140864] (types.h:307) Failed to open scan_element /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.5/0003:8086:0B3A.000E/HID-SENSOR-200076.2.auto/iio:device1/scan_elements/in_anglvel_x_en Last Error: Permission denied
15/04 14:07:37,619 ERROR [140332946140864] (backend-hid.cpp:969) Hid device is busy!
Backend rs2_open_multiple sensor:0xaaaac534e9a0, profiles:0xaaaac5398038, count:2
Error: Failed to query camera serial number: Input/output error (generic:5)

Cause

User does not have permissions to access scan_element.

Solution

Install the librealsense2 udev rules using the Slamcore DKMS package. See the instructions in Setting up a camera to install this package.

Alternatively, you can set up the udev rules directly by running a script provided by librealsense:

$ git clone https://github.com/IntelRealSense/librealsense.git
$ cd librealsense
$ ./scripts/setup_udev_rules.sh
Failed to receive data from D435i/D455 sensor stream
Failed to parse command-line, try to guess camera vendor
Failed to receive data from D435i sensor stream Depth.0
Failed to receive data from D435i sensor stream Infrared.0
Failed to receive data from D435i sensor stream Infrared.1

Cause

One or more of the expected data streams from the RealSense camera failed to open.

Solution

This is an intermittent error on the RealSense cameras. Advice is to:

  • Install the librealsense2 udev rules using the Slamcore DKMS package. See the instructions in Setting up a camera.

  • Disconnect and re-connect the RealSense camera.

Insufficient permissions to communicate with X_LINK_UNBOOTED device

When first attempting to access the OAK-D S2 Fixed-Focus camera on your Linux machine, you may get permission issues from Luxonis’ DepthAI:

Insufficient permissions to communicate with X_LINK_UNBOOTED device with name
"1.1". Make sure udev rules are set

Solution

Resolve this by setting the udev rules according to Luxonis’ DepthAI documentation, then unplug the camera and plug it back into USB afterwards:

echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"' | sudo tee /etc/udev/rules.d/80-movidius.rules
sudo udevadm control --reload-rules && sudo udevadm trigger

SLAM Issues

Dropped frames during SLAM execution

There are two probable causes for our SLAM software to drop incoming frames/measurements during its execution.

Cause 1: High CPU Load

If the SLAM process is not allocated enough time to process all incoming measurements it will start skipping old measurements for the sake of keeping up with the newer ones. This may happen because:

  • There are other unrelated CPU-intensive tasks running alongside SLAM.

  • A loop closure event (normally running in the background) is taking up too much CPU time. This may often be the case when operating in large-scale environments.

  • The SLAM configuration parameters are not appropriate for the platform SLAM is running on.

  • The CPU clock frequency is reduced at the system level. This could occur due to overheating.

In this case you should be seeing warnings like the following while running:

Frames dropped because of insufficient processing resources.
Frequent dropping of frames can lead to lower accuracy and robustness.

Solution

  • Reduce the overall CPU load, e.g. by shutting down any redundant processes.

  • Tweak the SLAM configuration so that SLAM uses less CPU time (e.g. reduce the NumKeypoints or TimeBudget)

  • Make sure that the hardware is not overheating.

Cause 2: Problems related to timing of incoming sensor measurements

There is an issue with the associated timestamps of the measurements used for SLAM (that may be visual-inertial measurements, wheel odometry measurements etc.).

To ensure the accuracy and minimise the latency of SLAM results (e.g. estimated pose), we have set strict restrictions with regards to the timestamps of the incoming measurement streams. If these requirements are somehow not met, you should be seeing warnings like the following while running:

Frames dropped because of timing problems with sensor data.
Known causes include high sensor latency and incorrectly aligned timestamps from different sensors.

Solution

You should pay extra care in configuring the timestamps of the incoming measurements.

  • If integrating wheel-odometry, you should ensure that the wheel-odometry measurements are produced and fed to the SLAM at a constant rate as suggested in the Wheel Odometry Integration Tutorial.

  • If integrating wheel-odometry and you are capturing the odometry measurements in a machine different than the one you are running SLAM, then the system clocks of these two machines should be synchronised so that their measurements are in the same timeline and avoid potential clock drift. If feasible, use a reliable and fast medium for connecting the machines (e.g. Gigabit ethernet link) - avoid using WiFi.

    You could use an NTP client program like chrony to ensure the clocks synchronisation.

Connection Issues

Not authorized to run on this system
Failed to start session: Couldn't resolve host name (6) | HTTP Response: 0
Error: Not authorized to run on this system

Cause

Unable to connect to Slamcore.

Solution

Check that you have a stable internet connection and try running the software a couple of times. If the issue persists, check that the proxy server your system uses does not block Slamcore’s site (if applicable).

Contact Slamcore at support@slamcore.com with the full output log from running this command:

$ curl -L -v 'http://portal.slamcore.com/session/start'

Software Dependencies

glfw error: failed to create OpenGL window
glfw error: Requested OpenGL version <number>, got version <number> (code 65543).
Error: Failed to create OpenGL window.

Solution

Overwrite OpenGL version by running the following:

$ export MESA_GL_VERSION_OVERRIDE=4.3

Dataset Recording Issues

Failed to reserve padding space
Failed to reserve padding space.
Failed to start recording dataset: Input/output error

Cause

The file system type of the selected output directory does not support the fallocate operation, for example if the system drive is formatted to NTFS.

Solution

Select a different location to write the dataset. Alternatively, reformat the intended partition to use a file system that does support fallocate, such as ext4.

Target disk might be too slow
Cannot write all the data, your target disk might be too slow. Your dataset will be incomplete

Cause

There are various causes for this; sometimes the disk does not have the required write speed, or the disk is formatted in an unsupported type.

Solution

We recommend using a disk formatted to ext4.

If you still get the warning, use the fio tool to test the estimated speed and ensure it is above the requirements for Recording Datasets.

To install fio:

$ sudo apt install fio

To test the write speed to your disk:

$ cd /path/to/disk/for/dataset && fio --name TEST --eta-newline=5s \
>   --filename=fio-tempfile.dat --rw=write --size=500m --io_size=10g \
>   --blocksize=1024k --ioengine=libaio --fsync=10000 --iodepth=32 \
>   --direct=1 --numjobs=1 --runtime=60 --group_reporting

Panoptic Segmentation

Semantics not available
_images/panoptic_plugin_error.png

Fig. 2 Slamcore Visualiser - Panoptic Segmentation Plugin Error

Cause

The panoptic segmentation plugin either hasn’t been installed on your machine or enabled via the --enable-panoptic-plugin command line flag.

Solution

Ensure to follow the panoptic segmentation Installation process and run the software with the correct flags.

Inference took longer than the expected frame period
[Warning 2023-07-18T18:06:44+0100] Inference took longer than the expected
frame period (66 ms), SLAM results may be affected

Cause

If the inference time takes longer than the SLAM time, you may see this warning. The network inference time is also affected by other processes running on the GPU, such as visualization with the Slamcore Visualiser, ROS RViz, etc.

Solution

If this occurs frequently, set your platform to the highest power mode, and set the GPU and CPU clocks to the maximum by running:

sudo jetson_clocks