Giter Club home page Giter Club logo

Comments (5)

marcbone avatar marcbone commented on August 17, 2024 2

I can assure you that you still have 0.8.0 somewhere on your system. Otherwise the error would not show that you have library version 4. You can verify this by putting

message("libfranka version: ${Franka_VERSION}")

into your CMakeLists.txt.

from franka_ros2.

marcbone avatar marcbone commented on August 17, 2024 1

libfranka 0.9.x will work for your robot. So installing 0.9.0 will work. I guess you still have a libfranka 0.8 somewhere on your system which shadows your 0.9 installation.

My random guess is that if you run:
sudo apt remove ros-foxy-libfranka
your problem will be solved. Feel free to reopen if this does not fix your issue.

In general all current libfranka versions should work with franka_ros2

from franka_ros2.

peterdavidfagan avatar peterdavidfagan commented on August 17, 2024

Hi @marcbone,

I retested today with 0.9.0 again and I am still facing the above error. I am building libfranka from source and have run sudo apt remove ros-foxy-libfranka as suggested above.

Here is a Dockerfile to recreate the issue:

ARG ROS_DISTRO=foxy
FROM ros:${ROS_DISTRO}-ros-base
MAINTAINER Peter David Fagan "[email protected]"

# set default DDS to Cyclone
ENV RMW_IMPLEMENTATION rmw_cyclonedds_cpp

# install libfranka
RUN apt update && \
    apt install -y libpoco-dev libeigen3-dev && \
    git clone --branch 0.9.0 https://github.com/frankaemika/libfranka.git --recursive && \
    cd libfranka && \
    mkdir build && cd build && \
    cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF  .. && \
    cmake --build . -j$(nproc) && \
    cpack -G DEB && \
    sudo dpkg -i libfranka-*.deb

# set up workspace
ENV ROS_UNDERLAY /root/panda_ws/install
WORKDIR $ROS_UNDERLAY/..
COPY . .

# import dependent libraries
RUN vcs import --skip-existing src < src/moveit2_tutorials/moveit2_tutorials.repos 

# install ros dependencies
RUN . /opt/ros/${ROS_DISTRO}/setup.sh && \
    apt-get -q update && \
    apt-get install -y ros-${ROS_DISTRO}-rmw-cyclonedds-cpp && \
    apt-get install -y \
    ros-foxy-control-msgs \
    ros-foxy-xacro \
    ros-foxy-angles \
    ros-foxy-ros2-control \
    ros-foxy-realtime-tools \
    ros-foxy-control-toolbox \
    ros-foxy-moveit \
    ros-foxy-ros2-controllers \
    ros-foxy-joint-state-publisher \
    ros-foxy-joint-state-publisher-gui \
    ros-foxy-ament-cmake-clang-format && \
    rosdep update && \
    DEBIAN_FRONTEND=noninteractive \
    rosdep install --from-paths src --ignore-src -r -y --rosdistro ${ROS_DISTRO} --as-root=apt:false && \ 
    colcon build --mixin debug && \
    # Clear apt-cache to reduce image size
    rm -rf /var/lib/apt/lists/* && \
    # Update /ros_entrypoint.sh to source our new workspace
    sed -i "s#/opt/ros/\$ROS_DISTRO/setup.bash#$ROS_UNDERLAY/setup.sh#g" /ros_entrypoint.sh

from franka_ros2.

peterdavidfagan avatar peterdavidfagan commented on August 17, 2024

Thanks for getting back to me on this @marcbone.

From the above Dockerfile it seems surprising that this version of libfranka is getting installed within the container.

I think the issue may be due to how ros dependencies are being installed. I'll fix this and report back here. At the very least hopefully this issue thread will help someone else who made the same mistake I did.

from franka_ros2.

peterdavidfagan avatar peterdavidfagan commented on August 17, 2024

The following builds and runs as expected. As @marcbone outlined I was still installing 0.8.0 via rosdep.

ARG ROS_DISTRO=foxy
FROM ros:${ROS_DISTRO}-ros-base
MAINTAINER Peter David Fagan "[email protected]"

# set default DDS to Cyclone
ENV RMW_IMPLEMENTATION rmw_cyclonedds_cpp

# install libfranka
RUN apt update && apt upgrade -y && \
    apt install -y  build-essential cmake git libpoco-dev libeigen3-dev && \
    git clone --recursive https://github.com/frankaemika/libfranka.git --branch 0.9.0 && \
    cd libfranka && \
    mkdir build && cd build && \
    cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF  .. && \
    cmake --build . -j$(nproc) && \
    cpack -G DEB && \
    sudo dpkg -i libfranka-*.deb

# set up workspace
ENV ROS_UNDERLAY /root/panda_ws/install
WORKDIR $ROS_UNDERLAY/..
COPY . .

# import dependent libraries
RUN vcs import --skip-existing src < src/moveit2_tutorials/moveit2_tutorials.repos 

# install ros dependencies
RUN . /opt/ros/${ROS_DISTRO}/setup.sh && \
    apt-get -q update && \
    apt-get install -y ros-${ROS_DISTRO}-rmw-cyclonedds-cpp && \
    apt-get install -y \
    ros-foxy-control-msgs \
    ros-foxy-xacro \
    ros-foxy-angles \
    ros-foxy-ros2-control \
    ros-foxy-realtime-tools \
    ros-foxy-control-toolbox \
    ros-foxy-moveit \
    ros-foxy-ros2-controllers \
    ros-foxy-joint-state-publisher \
    ros-foxy-joint-state-publisher-gui \
    ros-foxy-ament-cmake-clang-format && \
    rosdep update && \
    DEBIAN_FRONTEND=noninteractive \
    rosdep install --from-paths src --ignore-src -r -y --skip-keys "libfranka" --rosdistro ${ROS_DISTRO} && \ 
    colcon build --mixin debug && \
    # Clear apt-cache to reduce image size
    rm -rf /var/lib/apt/lists/* && \
    # Update /ros_entrypoint.sh to source our new workspace
    sed -i "s#/opt/ros/\$ROS_DISTRO/setup.bash#$ROS_UNDERLAY/setup.sh#g" /ros_entrypoint.sh

from franka_ros2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.