Kinovarobotics / ros2_kortex

ROS2 driver for the Gen3 Kinova robot arm
Other
51 stars 49 forks source link

cannot load moveit config #176

Closed patrickwasp closed 1 month ago

patrickwasp commented 1 year ago

ros version: humble

when selecting the moveit configuration package /ros2_ws/src/ros2_kortex/kortex_moveit_config/kinova_gen3_6dof_robotiq_2f_85_moveit_config and pressing load files the following error is displayed:

Screenshot from 2023-09-26 13-59-51

with the following terminal output:

[moveit_setup_assistant-1] error: No such file or directory: /ros2_ws/install/kortex_description/share/kortex_description/arms/gen3/dof/urdf/gen3_macro.xacro [Errno 2] No such file or directory: '/ros2_ws/install/kortex_description/share/kortex_description/arms/gen3/dof/urdf/gen3_macro.xacro'
[moveit_setup_assistant-1] when instantiating macro: load_robot (/ros2_ws/install/kortex_description/share/kortex_description/robots/kortex_robot.xacro)
[moveit_setup_assistant-1] in file: /ros2_ws/install/kortex_description/share/kortex_description/robots/gen3.xacro
[moveit_setup_assistant-1] Error:   Error document empty.

it looks like ${dof} isn't defined so it's looking in /gen3/dof/ which doesn't exist.

moriarty commented 1 year ago

@abake48 if you have time can you take a look, likely a param or arg not getting passed through correctly. Otherwise I'll add this to my todo list and try to get to it.

Given this is inside the specific configuration package kinova_gen3_6dof_robotiq_2f_85_moveit_config that should be configured to dof should be set to 6.

abake48 commented 1 year ago

I'll look into this now

abake48 commented 1 year ago

@patrickwasp What version of ROS 2 are you using and did you install MoveIt 2 via apt?

patrickwasp commented 1 year ago

@abake48 yes I did. Here is my dockerfile:

FROM osrf/ros:humble-desktop-full

SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
    && apt-get install --yes \
    git \
    build-essential \
    cmake \
    wget \
    python3 \
    python3-pip \
    python3-colcon-common-extensions \
    python3-vcstool \
    python3-rosdep \
    bash-completion \
    apt-utils \
    ros-$ROS_DISTRO-rviz2 \
    ros-$ROS_DISTRO-rviz-common \
    ros-$ROS_DISTRO-rviz-rendering \
    ros-$ROS_DISTRO-rviz-default-plugins \
    ros-$ROS_DISTRO-rviz-ogre-vendor \
    ros-$ROS_DISTRO-rviz-visual-tools \
    ros-$ROS_DISTRO-moveit \
    ros-$ROS_DISTRO-moveit-servo \
    ros-$ROS_DISTRO-moveit-ros-perception \
    ros-$ROS_DISTRO-moveit-ros-control-interface \
    ros-$ROS_DISTRO-moveit-visual-tools \
    ros-$ROS_DISTRO-moveit-resources \
    ros-$ROS_DISTRO-cv-bridge \
    ros-$ROS_DISTRO-kortex-bringup \
    ros-$ROS_DISTRO-kinova-gen3-6dof-robotiq-2f-85-moveit-config \
    ros-$ROS_DISTRO-rmw-cyclonedds-cpp \
    python3-pip \
    && rm -rf /var/lib/apt/lists/*

# ignore setuptools deprecation warnings when building with colcon
ENV PYTHONWARNINGS="ignore:setup.py install is deprecated::setuptools.command.install"
ENV PYTHONWARNINGS="ignore:::setuptools.command.install,ignore:::setuptools.command.easy_install,ignore:::pkg_resources"

# create workspace
RUN mkdir -p /ros2_ws/src
WORKDIR /ros2_ws

# install extra packages from github
RUN cd /ros2_ws/src \
    && git clone -b humble --single-branch https://github.com/ros-planning/moveit_task_constructor.git

RUN source /opt/ros/$ROS_DISTRO/setup.bash && colcon build --symlink-install

# add sourcing ros2_ws to entrypoint
RUN sed --in-place --expression \
    '$isource "/ros2_ws/install/setup.bash"' \
    /ros_entrypoint.sh

# add packages to path
RUN echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc
RUN echo "source /ros2_ws/install/setup.bash" >> ~/.bashrc
felixmaisonneuve commented 1 year ago

I think your problem with {dof} being undefined might be related to my answer in #175

aalmrad commented 1 month ago

Closing due to inactivity - reply to the thread if you need the issue to be reopened