Skip to content

Commit

Permalink
Merge branch 'main' into fix/goal_time_violated
Browse files Browse the repository at this point in the history
  • Loading branch information
Lennart Nachtigall committed Jan 17, 2024
2 parents 4d05020 + 60f26aa commit 7bd9e36
Show file tree
Hide file tree
Showing 29 changed files with 574 additions and 77 deletions.
1 change: 0 additions & 1 deletion .github/workflows/iron-binary-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
pull_request:
branches:
- iron
- main # as long as rolling and iron should be compatible
push:
branches:
- iron
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/iron-binary-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
pull_request:
branches:
- iron
- main # as long as rolling and iron should be compatible
push:
branches:
- iron
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/iron-semi-binary-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
pull_request:
branches:
- iron
- main # as long as rolling and iron should be compatible
push:
branches:
- iron
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/iron-semi-binary-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
pull_request:
branches:
- iron
- main # as long as rolling and iron should be compatible
push:
branches:
- iron
Expand Down
72 changes: 14 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,19 @@ users an overview of the current released state.
- `ur_moveit_config` - example MoveIt configuration for UR robots.
- `ur_robot_driver` - driver / hardware interface for communication with UR robots.

## System Requirements

Please see the [requirements for the Universal_Robots_Client_Library](https://github.com/UniversalRobots/Universal_Robots_Client_Library#requirements), as this driver is build on top of Universal_Robots_Client_Library.

## 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.
1. **Install the driver**
```bash
sudo apt-get install ros-rolling-ur
```
See the [installation instructions](https://docs.ros.org/en/ros2_packages/rolling/api/ur_robot_driver/installation/installation.html) for more details and source-build instructions.

2. **Start & Setup the robot**. Once you've installed the driver, [setup the
robot](https://docs.ros.org/en/ros2_packages/rolling/api/ur_robot_driver/installation/robot_setup.html)
Expand All @@ -110,65 +117,14 @@ binary package installation unless you want to join development and submit chang
documentation](https://docs.ros.org/en/ros2_packages/rolling/api/ur_robot_driver/usage.html) for
details.

4. Unless started in [headless mode](https://docs.ros.org/en/ros2_packages/rolling/api/ur_robot_driver/ROS_INTERFACE.html#headless-mode): Run the external_control program by **pressing `play` on the teach pendant**.

### Install from binary packages
1. [Install ROS2](https://docs.ros.org/en/rolling/Installation/Ubuntu-Install-Debians.html). 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
```bash
# Replace ur5e with one of ur3, ur3e, ur5, ur5e, ur10, ur10e, ur16e, ur20, ur30
# Replace the IP address with the IP address of your actual robot / URSim
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=192.168.56.101
```

### 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](https://docs.ros.org/en/rolling/Installation/Ubuntu-Install-Debians.html). This
branch supports only ROS2 Rolling. For other ROS2 versions, please see the respective
branches.

Once installed, please make sure to actually [source ROS2](https://docs.ros.org/en/rolling/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html#source-the-setup-files) before proceeding.

3. Make sure that `colcon`, its extensions and `vcs` are installed:
```
sudo apt install python3-colcon-common-extensions python3-vcstool
```

4. Create a new ROS2 workspace:
```
export COLCON_WS=~/workspace/ros_ur_driver
mkdir -p $COLCON_WS/src
```

5. 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
```

6. 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](ci_status.md). 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:
4. Unless started in [headless mode](https://docs.ros.org/en/ros2_packages/rolling/api/ur_robot_driver/ROS_INTERFACE.html#headless-mode): Run the external_control program by **pressing `play` on the teach pendant**.

```
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

Expand Down
3 changes: 3 additions & 0 deletions ur/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package ur
^^^^^^^^^^^^^^^^^^^^^^^^

2.4.2 (2023-11-23)
------------------

2.4.1 (2023-09-21)
------------------

Expand Down
2 changes: 1 addition & 1 deletion ur/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ur</name>
<version>2.4.1</version>
<version>2.4.2</version>
<description>Metapackage for universal robots</description>
<maintainer email="[email protected]">Felix Exner</maintainer>
<maintainer email="[email protected]">Robert Wilbrandt</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions ur_calibration/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package ur_calibration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.4.2 (2023-11-23)
------------------

2.4.1 (2023-09-21)
------------------

Expand Down
2 changes: 1 addition & 1 deletion ur_calibration/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="2">
<name>ur_calibration</name>
<version>2.4.1</version>
<version>2.4.2</version>
<description>Package for extracting the factory calibration from a UR robot and change it such that it can be used by ur_description to gain a correct URDF</description>

<maintainer email="[email protected]">Felix Exner</maintainer>
Expand Down
7 changes: 7 additions & 0 deletions ur_controllers/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
Changelog for package ur_controllers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.4.2 (2023-11-23)
------------------
* Update read_state_from_hardware
* Renamed normalize_joint_error to joints_angle_wraparound
* Remove noisy controller log message
* Contributors: Felix Exner, Robert Wilbrandt

2.4.1 (2023-09-21)
------------------
* Update sjtc to newest upstream API (`#810 <https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/pull/810>`_)
Expand Down
2 changes: 1 addition & 1 deletion ur_controllers/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ur_controllers</name>
<version>2.4.1</version>
<version>2.4.2</version>
<description>Provides controllers that use the speed scaling interface of Universal Robots.</description>

<maintainer email="[email protected]">Denis Stogl</maintainer>
Expand Down
4 changes: 2 additions & 2 deletions ur_controllers/src/scaled_joint_trajectory_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ controller_interface::return_type ScaledJointTrajectoryController::update(const
auto compute_error_for_joint = [&](JointTrajectoryPoint& error, size_t index, const JointTrajectoryPoint& current,
const JointTrajectoryPoint& desired) {
// error defined as the difference between current and desired
if (normalize_joint_error_[index]) {
if (joints_angle_wraparound_[index]) {
// if desired, the shortest_angular_distance is calculated, i.e., the error is
// normalized between -pi<error<pi
error.positions[index] = angles::shortest_angular_distance(current.positions[index], desired.positions[index]);
Expand Down Expand Up @@ -129,7 +129,7 @@ controller_interface::return_type ScaledJointTrajectoryController::update(const

// current state update
state_current_.time_from_start.set__sec(0);
read_state_from_hardware(state_current_);
read_state_from_state_interfaces(state_current_);

// currently carrying out a trajectory
if (has_active_trajectory()) {
Expand Down
3 changes: 3 additions & 0 deletions ur_dashboard_msgs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package ur_dashboard_msgs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.4.2 (2023-11-23)
------------------

2.4.1 (2023-09-21)
------------------

Expand Down
2 changes: 1 addition & 1 deletion ur_dashboard_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ur_dashboard_msgs</name>
<version>2.4.1</version>
<version>2.4.2</version>
<description>Messages around the UR Dashboard server.</description>

<maintainer email="[email protected]">Felix Exner</maintainer>
Expand Down
5 changes: 5 additions & 0 deletions ur_moveit_config/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package ur_moveit_config
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.4.2 (2023-11-23)
------------------
* moveit_servo package executable name has changed (`#854 <https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/issues/854>`_)
* Contributors: Felix Durchdewald

2.4.1 (2023-09-21)
------------------
* Added support for UR20 (`#797 <https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/issues/797>`_)
Expand Down
2 changes: 1 addition & 1 deletion ur_moveit_config/launch/ur_moveit.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def generate_launch_description():
DeclareLaunchArgument(
"ur_type",
description="Type/series of used UR robot.",
choices=["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e", "ur20"],
choices=["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e", "ur20", "ur30"],
)
)
declared_arguments.append(
Expand Down
2 changes: 1 addition & 1 deletion ur_moveit_config/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ur_moveit_config</name>
<version>2.4.1</version>
<version>2.4.2</version>
<description>
An example package with MoveIt2 configurations for UR robots.
</description>
Expand Down
11 changes: 11 additions & 0 deletions ur_robot_driver/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2.4.2 (2023-11-23)
------------------
* [README] Move installation instructions to subpage (`#870 <https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/issues/870>`_)
* Add backward_ros to driver (`#872 <https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/issues/872>`_)
* Simplify tests (`#849 <https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/issues/849>`_)
* Port configuration (`#835 <https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/issues/835>`_)
Added possibility to change the reverse_port, script_sender_port and trajectory_port
* [README] Update link to MoveIt! documentation
* Do not start urscipt_interface when using mock hardware
* Contributors: Felix Durchdewald, Felix Exner, RobertWilbrandt

2.4.1 (2023-09-21)
------------------
* Added a test that sjtc correctly aborts on violation of constraints (`#810 <https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/pull/810>`_)
Expand Down
2 changes: 1 addition & 1 deletion ur_robot_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ install(PROGRAMS scripts/start_ursim.sh
DESTINATION lib/${PROJECT_NAME}
)

install(DIRECTORY config launch
install(DIRECTORY config launch urdf
DESTINATION share/${PROJECT_NAME}
)

Expand Down
3 changes: 3 additions & 0 deletions ur_robot_driver/config/ur30_update_rate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
controller_manager:
ros__parameters:
update_rate: 500 # Hz
71 changes: 71 additions & 0 deletions ur_robot_driver/doc/installation/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
Installation of the ur_robot_driver
===================================

You can either install this driver from binary packages as shown above or build it from source. We
recommend a binary package installation unless you want to join development and submit changes.

Install from binary packages
----------------------------

1. `Install ROS2 <https://docs.ros.org/en/rolling/Installation/Ubuntu-Install-Debians.html>`_. This
branch supports only ROS2 Rolling. For other ROS2 versions, please see the respective branches.
2. Install the driver using

.. code-block:: bash
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 <https://docs.ros.org/en/rolling/Installation/Ubuntu-Install-Debians.html>`_. This
branch supports only ROS2 Rolling. For other ROS2 versions, please see the respective branches.

Once installed, please make sure to actually `source ROS2 <https://docs.ros.org/en/rolling/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html#source-the-setup-files>`_ before proceeding.

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

.. code-block:: bash
sudo apt install python3-colcon-common-extensions python3-vcstool
4. Create a new ROS2 workspace:

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

.. code-block:: bash
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
6. 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](ci_status.md). 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:

.. code-block:: bash
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
1 change: 1 addition & 0 deletions ur_robot_driver/doc/installation/toc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This chapter explains how to install the ``ur_robot_driver``
:maxdepth: 4
:caption: Contents:

installation
real_time
robot_setup
install_urcap_cb3
Expand Down
4 changes: 2 additions & 2 deletions ur_robot_driver/doc/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The arguments for launch files can be listed using ``ros2 launch ur_robot_driver
The most relevant arguments are the following:


* ``ur_type`` (\ *mandatory* ) - a type of used UR robot (\ *ur3*\ , *ur3e*\ , *ur5*\ , *ur5e*\ , *ur10*\ , *ur10e*\ , or *ur16e*\ , *ur20*\ ).
* ``ur_type`` (\ *mandatory* ) - a type of used UR robot (\ *ur3*\ , *ur3e*\ , *ur5*\ , *ur5e*\ , *ur10*\ , *ur10e*\ , or *ur16e*\ , *ur20*\ , *ur30*\ ).
* ``robot_ip`` (\ *mandatory* ) - IP address by which the root can be reached.
* ``use_mock_hardware`` (default: *false* ) - use simple hardware emulator from ros2_control.
Useful for testing launch files, descriptions, etc. See explanation below.
Expand Down Expand Up @@ -106,7 +106,7 @@ For details on the Docker image, please see the more detailed guide :ref:`here <
Example Commands for Testing the Driver
---------------------------------------

Allowed UR - Type strings: ``ur3``\ , ``ur3e``\ , ``ur5``\ , ``ur5e``\ , ``ur10``\ , ``ur10e``\ , ``ur16e``\ , ``ur20``.
Allowed UR - Type strings: ``ur3``\ , ``ur3e``\ , ``ur5``\ , ``ur5e``\ , ``ur10``\ , ``ur10e``\ , ``ur16e``\ , ``ur20``, ``ur30``.

1. Start hardware, simulator or mockup
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Loading

0 comments on commit 7bd9e36

Please sign in to comment.