Updating the RealSense nodelet

The ROS Wrapper for Intel RealSense Devices provides a ROS nodelet interface between the camera and the ROS system. Intel updates this ROS package on a fairly regular basis, which could lead to API version mismatch errors.

When this happens, the camera (sometimes) works fine on realsense-viewer but any code using the RealSense nodelet fails to compile. The specific error message is something like:

Failed to load nodelet [/camera/realsense2_camera] of type [realsense2_camera/RealSenseNodeFactory] even after refreshing the cache: API version mismatch: librealsense.so was compiled with API version 2.18.1 but the application was compiled with 2.16.4! Make sure correct version of the library is installed (make install)

Fixing this is straightforward:
    1. Navigate to your github repository folder for the ROS Wrapper for Intel RealSense Devices: cd ~/robot_ws/src/realsense
    2. To avoid loosing any local changes made, first do a git stash followed by a git pull. This will temporarily set your local changes aside while updating the repository from remote, and then merge your changes afterwards. The command sequence to use is: git stash then git pull origin development and lastly, git stash apply --index
    3. Finally, compile: cd ~/robot_ws then catkin_make

This will update your API version to the latest Intel release.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s