moveit / moveit2

:robot: MoveIt for ROS 2
https://moveit.ai/
BSD 3-Clause "New" or "Revised" License
1.03k stars 508 forks source link

Foxy Branch Build Broken #1197

Closed jtcass01 closed 2 years ago

jtcass01 commented 2 years ago

Description

Foxy Branch is missing proper moveit2 repos file. Had to replace with my own file to get it to properly build.

Your environment

Steps to reproduce

I ran the following commands on my jetson nano after updating to Ubuntu 20.04:

sudo apt upgrade

# installing ros2
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
sudo apt update && sudo apt install curl gnupg2 lsb-release
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key  -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update
sudo apt install ros-foxy-desktop
source /opt/ros/foxy/setup.bash
ros2 run demo_nodes_cpp talker

# Setting up Ros2 robot driver
sudo apt install python3-colcon-common-extensions python3-vcstool python-rosdep
export COLCON_WS=~/workspace/ros_ur_driver
mkdir -p $COLCON_WS/src
cd $COLCON_WS
git clone https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver.git src/Universal_Robots_ROS2_Driver
cd src/Universal_Robots_ROS2_Driver
git checkout foxy
git pull origin foxy
cd $COLCON_WS
vcs import src --skip-existing --input src/Universal_Robots_ROS2_Driver/Universal_Robots_ROS2_Driver.repos
rosdep update
rosdep install --ignore-src --from-paths src -y -r
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
source install/setup.bash

# Setting up Ros2 robot driver with moveit2
cd $COLCON_WS
vcs import src --skip-existing --input src/Universal_Robots_ROS2_Driver/MoveIt_Support.repos
# Having to fix moveit2.repos
cd $COLCON_WS/src/Universal_Robots_ROS2_Driver/moveit2
nano moveit2.repos

Writing the following inside of moveit2.repos:

repositories:
  geometric_shapes:
    type: git
    url: https://github.com/ros-planning/geometric_shapes
    version: foxy
  moveit_resources:
    type: git
    url: https://github.com/ros-planning/moveit_resources
    version: ros2
  srdfdom:
    type: git
    url: https://github.com/ros-planning/srdfdom.git
    version: foxy

Finishing build with moveit2

cd $COLCON_WS
vcs import src --skip-existing --input src/Universal_Robots_ROS2_Driver/moveit2.repos
rosdep update
rosdep install --ignore-src --from-paths src -y -r
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

Expected behavior

The package should have built.

Actual behavior

It produced errors when sourcing from srdfdom. When using apt-get install srdfdom, it was unable to produce a path claiming all joints were in collision. Fixed by rebuilding with new moveit2.repos file.

henningkayser commented 2 years ago

Apologies for the late reply! I think one issue is that moveit_resources doesn't have a foxy branch. In that case, the Debian should be used, newer versions could easily produce issues with the MoveIt 2 foxy branch. What was listed inside Universal_Robots_ROS2_Driver/moveit2.repos? Without a workspace snapshot it's hard to tell what's going on. In general, old distro branches should always work with an empty workspace, simply depending on the released Debians. Since our goal is to keep API's stable, we're clearing the repos files as soon as possible. Only on development targets like main it really makes sense to source dependencies since there might be changes that haven't been released yet.