hsd-dev / Universal_Robots_ROS2_Driver

Universal Robots ROS2 driver supporting CB3 and e-Series

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Universal Robots ROS2 Driver

Universal Robots has become a dominant supplier of lightweight, robotic manipulators for industry, as well as for scientific research and education.

Universal Robot e-Series family

This is one of the very first ROS2 manipulator drivers. Some of the new features are enabled by ROS2 and include decreased latency, improved security, and more flexibility regarding middleware configuration. The package contains launch files to quickly get started using the driver as a standalone version or in combination with MoveIt2

This driver is developed on top of Universal_Robots_Client_Library and support some key cobot functionalities like; pause at emergency stop, safeguard stop, automatic speed scaling to avoid violate the safety setting and manually speed scaling from the teach pendant. In addition the externalControl URCap makes it possible to include ROS2 behaviors in the robot program.

The driver is compatible across the entire line of UR robots -- from 3 kg payload to 16 kg payload and includes both the CB3 and the E-series.

Check also presentations and videos about this driver.

Release Status

ROS2 Distro Foxy (EOL) Galactic (EOL) Humble Iron Rolling
Branch foxy galactic humble iron main
Release status Foxy Binary Build
Galactic Binary Build



The table above shows the build status for each package of this repo from the ROS buildfarm. For end-of-life (EOL) distributions the nightly binary builds from our CI are shown. EOL distributions will receive no more updates and may be lacking features.

A more detailed build status shows the state of all CI workflows inside this repo. Please note that the detailed view is intended for developers, while the one here should give end users an overview of the current released state.

Packages in the Repository:

  • ur - Meta-package that provides a single point of installation for the released packages.
  • ur_calibration - tool for extracting calibration information from a real robot.
  • ur_controllers - implementations of controllers specific for UR robots.
  • ur_dashboard_msgs - package defining messages used by dashboard node.
  • ur_moveit_config - example MoveIt configuration for UR robots.
  • ur_robot_driver - driver / hardware interface for communication with UR robots.

Getting Started

For getting started, you'll basically need three steps:

  1. Install the driver (see below). You can either install this driver from binary packages or build it from source. We recommend a binary package installation unless you want to join development and submit changes.

  2. Start & Setup the robot. Once you've installed the driver, setup the robot and create a program for external control.

    Please do this step carefully and extract the calibration as explained here. Otherwise the TCP's pose will not be correct inside the ROS ecosystem.

    If no real robot is required, you can use a simulated robot that will behave almost exactly like the real robot.

  3. Start the driver. See the usage documentation for details.

  4. Unless started in headless mode: Run the external_control program by pressing play on the teach pendant.

Install from binary packages

  1. Install ROS2. This branch supports only ROS2 Rolling. For other ROS2 versions, please see the respective branches.
  2. Install the driver using
    sudo apt-get install ros-${ROS_DISTRO}-ur
    

Build from source

Before building from source please make sure that you actually need to do that. Building from source might require some special treatment, especially when it comes to dependency management. Dependencies might change from time to time. Upstream packages (such as the library) might change their features / API which require changes in this repo. Therefore, this repo's source builds might require upstream repositories to be present in a certain version as otherwise builds might fail. Starting from scratch following exactly the steps below should always work, but simply pulling and building might fail occasionally.

  1. Install ROS2. This branch supports only ROS2 Rolling. For other ROS2 versions, please see the respective branches.

    Once installed, please make sure to actually source ROS2 before proceeding.

  2. Make sure that colcon, its extensions and vcs are installed:

    sudo apt install python3-colcon-common-extensions python3-vcstool
    
  3. Create a new ROS2 workspace:

    export COLCON_WS=~/workspace/ros_ur_driver
    mkdir -p $COLCON_WS/src
    
  4. Clone relevant packages, install dependencies, compile, and source the workspace by using:

    cd $COLCON_WS
    git clone https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver.git src/Universal_Robots_ROS2_Driver
    vcs import src --skip-existing --input src/Universal_Robots_ROS2_Driver/Universal_Robots_ROS2_Driver-not-released.${ROS_DISTRO}.repos
    rosdep update
    rosdep install --ignore-src --from-paths src -y
    colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
    source install/setup.bash
    
  5. When consecutive pulls lead to build errors it is possible that you'll have to build an upstream package from source, as well. See the detailed build status. When the binary builds are red, but the semi-binary builds are green, you need to build the upstream dependencies from source. The easiest way to achieve this, is using the repos file:

    cd $COLCON_WS
    vcs import src --skip-existing --input src/Universal_Robots_ROS2_Driver/Universal_Robots_ROS2_Driver.${ROS_DISTRO}.repos
    rosdep update
    rosdep install --ignore-src --from-paths src -y
    

MoveIt! support

MoveIt! support is built-in into this driver already. Watch MoveIt in action with the Universal Robots ROS2 driver:

Video: MoveIt2 Demo

The video shows free-space trajectory planning around a modeled collision scene object using the MoveIt2 MotionPlanning widget for Rviz2.

See the MoveIt! section of the Usage guide for details.

Expected Changes in the Near Future

  • Trajectory control currently only supports position commands. In the future, velocity control will be added.

Contributor Guidelines

Code is auto-formatted with clang-format 14 whenever a git commit is made. Please ensure these dependencies are installed:

pip3 install pre-commit
sudo apt install clang-format-14

Prepare the pre-commit formatting to run like this:

pre-commit install

About

Universal Robots ROS2 driver supporting CB3 and e-Series

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 59.2%Language:Python 36.9%Language:CMake 3.0%Language:Shell 0.6%Language:Batchfile 0.2%Language:Emacs Lisp 0.1%