Skip to content

Commit

Permalink
Merge branch 'main' into issue_844
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauch authored Feb 26, 2024
2 parents 7c72f7e + 2048d14 commit 092af95
Show file tree
Hide file tree
Showing 41 changed files with 1,182 additions and 699 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.10.4
- name: Install system hooks
run: sudo apt-get install clang-format-14 cppcheck
- uses: pre-commit/[email protected].0
- uses: pre-commit/[email protected].1
with:
extra_args: --all-files --hook-stage manual
2 changes: 1 addition & 1 deletion .github/workflows/coverage-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
file: ros_ws/lcov/total_coverage.info
flags: unittests
name: codecov-umbrella
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: colcon-logs-${{ matrix.os }}
path: ros_ws/log
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
4 changes: 2 additions & 2 deletions .github/workflows/update-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
# Setup pre-commit
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.10.4
- name: Install pre-commit
Expand All @@ -28,7 +28,7 @@ jobs:
# Create pull request
- name: Create pull-request
id: cpr
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
branch: update-ci/pre-commit-autoupdate
delete-branch: true
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -33,13 +33,13 @@ repos:

# Python hooks
- repo: https://github.com/asottile/pyupgrade
rev: v3.13.0
rev: v3.15.1
hooks:
- id: pyupgrade
args: [--py36-plus]

- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.2.0
hooks:
- id: black
args: ["--line-length=100"]
Expand All @@ -51,7 +51,7 @@ repos:
args: ["--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D401,D404"]

- repo: https://github.com/pycqa/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
args: ["--ignore=E501,W503"]
Expand Down Expand Up @@ -135,7 +135,7 @@ repos:
# Spellcheck in comments and docs
# skipping of *.svg files is not working...
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell
args: ['--write-changes']
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
4 changes: 2 additions & 2 deletions Universal_Robots_ROS2_Driver.iron.repos
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ repositories:
ros2_control:
type: git
url: https://github.com/ros-controls/ros2_control.git
version: master
version: iron
ros2_controllers:
type: git
url: https://github.com/ros-controls/ros2_controllers
version: master
version: iron
kinematics_interface:
type: git
url: https://github.com/ros-controls/kinematics_interface.git
Expand Down
6 changes: 6 additions & 0 deletions ur/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog for package ur
^^^^^^^^^^^^^^^^^^^^^^^^

2.4.3 (2024-02-02)
------------------

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.3</version>
<description>Metapackage for universal robots</description>
<maintainer email="[email protected]">Felix Exner</maintainer>
<maintainer email="[email protected]">Robert Wilbrandt</maintainer>
Expand Down
6 changes: 6 additions & 0 deletions ur_calibration/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog for package ur_calibration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.4.3 (2024-02-02)
------------------

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.3</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
10 changes: 10 additions & 0 deletions ur_controllers/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
Changelog for package ur_controllers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.4.3 (2024-02-02)
------------------

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.3</version>
<description>Provides controllers that use the speed scaling interface of Universal Robots.</description>

<maintainer email="[email protected]">Denis Stogl</maintainer>
Expand Down
2 changes: 0 additions & 2 deletions ur_controllers/src/gpio_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ controller_interface::CallbackReturn GPIOController::on_init()
// Create the parameter listener and get the parameters
param_listener_ = std::make_shared<gpio_controller::ParamListener>(get_node());
params_ = param_listener_->get_params();

} catch (const std::exception& e) {
fprintf(stderr, "Exception thrown during init stage with message: %s \n", e.what());
return CallbackReturn::ERROR;
Expand All @@ -63,7 +62,6 @@ controller_interface::InterfaceConfiguration GPIOController::command_interface_c
config.type = controller_interface::interface_configuration_type::INDIVIDUAL;

const std::string tf_prefix = params_.tf_prefix;
RCLCPP_INFO(get_node()->get_logger(), "Configure UR gpio controller with tf_prefix: %s", tf_prefix.c_str());

for (size_t i = 0; i < 18; ++i) {
config.names.emplace_back(tf_prefix + "gpio/standard_digital_output_cmd_" + std::to_string(i));
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
6 changes: 6 additions & 0 deletions ur_dashboard_msgs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog for package ur_dashboard_msgs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.4.3 (2024-02-02)
------------------

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.3</version>
<description>Messages around the UR Dashboard server.</description>

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

2.4.3 (2024-02-02)
------------------
* fix move_group_node crash during initialization (`#906 <https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/issues/906>`_)
* Add UR30 support (`#899 <https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/issues/899>`_)
* Contributors: Chen Chen, Felix Exner (fexner)

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/config/ur_servo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ move_group_name: ur_manipulator # Often 'manipulator' or 'arm'
planning_frame: base_link # The MoveIt planning frame. Often 'base_link' or 'world'

## Other frames
ee_frame_name: tool0 # The name of the end effector link, used to return the EE pose
ee_frame: tool0 # The name of the end effector link, used to return the EE pose
robot_link_command_frame: tool0 # commands must be given in the frame of a robot link. Usually either the base or end effector

## Stopping behaviour
Expand Down
Loading

0 comments on commit 092af95

Please sign in to comment.