frankaemika / libfranka

C++ library for Franka research robots
https://frankaemika.github.io
Apache License 2.0
240 stars 157 forks source link

Server Library Compatibility Issue #160

Closed schromya closed 2 months ago

schromya commented 2 months ago

ROS 1 version: Noetic Ubuntu version: 20.04.6 Robot system version: 4.2.2 (pandas) Robot / Gripper Server version: 5/3 libfranka version: 0.9.2 franka_ros version: 0.9.1

When I run the communication test (sudo communication_test 192.168.1.2), I receive the following error:

libfranka: Incompatible library version (server version: 5, library version: 4). 
Please check https://frankaemika.github.io for Panda system updates or use a different version of libfranka.

According to the compatibility docs, my installed versions of the libraries should be correct, so I am not sure what the issue is. Any ideas?

Fatma-Dhaoui commented 2 months ago

Hi, Please update sub-modules and try again. git submodule update --init --recursive

Thanks!

schromya commented 2 months ago

I ran git submodule update --init --recursive within libfranka and recompiled the library. I'm still running into the same issue.

However, I have discovered that I can successfully run the examples within libfranka (like libfranka/examples/communication_test.cpp). The incompatibility problem just occurs when I try to use communication_test with franka_ros.

schromya commented 2 months ago

Solution(s)

I fixed the issue. It turns out there were a couple problems going on:

  1. I had the ros-noetic-libfranka library installed on my machine which was interfering which my version of libfranka built from source like in this other issue.

    SOLUTION: I uninstalled the library using sudo apt remove ros-noetic-libfranka and recompiled my catkin_ws.

  2. I didn't build the libfranka library into a debian package since that step was marked as optional in the installation guide. This caused franka_ros to try to use libfranka 0.8.0 (which I didn't install) instead of the correct 0.9.2 version when I ran catkin_make -DCMAKE_BUILD_TYPE=Release -DFranka_DIR:PATH=../libfranka/build. This other issue was similar to the problem I was facing.

    SOLUTION: I built the debian package using the following commands in my libfranka/build directory:

    cpack -G DEB
    sudo dpkg -i libfranka-0.9.2-x86_64.deb

    Then in my catkin_ws, I could compile franka_ros properly using:

    catkin_make -DCMAKE_BUILD_TYPE=Release 
    source devel/setup.sh

Documentation

I ended up running everything in a Docker Container. The directions and Dockerfile for setting up this process are here.