Skip to content

Commit

Permalink
Merge branch 'humble' into dev-humble-launch
Browse files Browse the repository at this point in the history
  • Loading branch information
mhubii committed Sep 9, 2024
2 parents ae9373e + 29656d3 commit 5085157
Show file tree
Hide file tree
Showing 32 changed files with 410 additions and 53 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build-ubuntu-22.04-fri-1.11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: build-ubuntu-22.04-fri-1.11
on:
pull_request:
branches:
- humble
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"

jobs:
build:
uses: ./.github/workflows/build.yml
with:
os: ubuntu-22.04
fri_version: 1.11
15 changes: 15 additions & 0 deletions .github/workflows/build-ubuntu-22.04-fri-1.14.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: build-ubuntu-22.04-fri-1.14
on:
pull_request:
branches:
- humble
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"

jobs:
build:
uses: ./.github/workflows/build.yml
with:
os: ubuntu-22.04
fri_version: 1.14
15 changes: 15 additions & 0 deletions .github/workflows/build-ubuntu-22.04-fri-1.15.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: build-ubuntu-22.04-fri-1.15
on:
pull_request:
branches:
- humble
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"

jobs:
build:
uses: ./.github/workflows/build.yml
with:
os: ubuntu-22.04
fri_version: 1.15
15 changes: 15 additions & 0 deletions .github/workflows/build-ubuntu-22.04-fri-1.16.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: build-ubuntu-22.04-fri-1.16
on:
pull_request:
branches:
- humble
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"

jobs:
build:
uses: ./.github/workflows/build.yml
with:
os: ubuntu-22.04
fri_version: 1.16
15 changes: 15 additions & 0 deletions .github/workflows/build-ubuntu-22.04-fri-2.5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: build-ubuntu-22.04-fri-2.5
on:
pull_request:
branches:
- humble
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"

jobs:
build:
uses: ./.github/workflows/build.yml
with:
os: ubuntu-22.04
fri_version: 2.5
15 changes: 15 additions & 0 deletions .github/workflows/build-ubuntu-22.04-fri-2.7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: build-ubuntu-22.04-fri-2.7
on:
pull_request:
branches:
- humble
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"

jobs:
build:
uses: ./.github/workflows/build.yml
with:
os: ubuntu-22.04
fri_version: 2.7
22 changes: 10 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
name: Build

on:
pull_request:
branches:
- humble
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"
workflow_call: # https://github.com/orgs/community/discussions/52616#discussioncomment-9364532
inputs:
os:
required: true
type: string
fri_version:
required: true
type: string

# ros 2 ci: https://github.com/marketplace/actions/ros-2-ci-action
# doc: https://ubuntu.com/blog/ros-2-ci-with-github-actions
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
fri_version: [1.11, 1.14, 1.15, 1.16, 2.5, 2.7]
runs-on: ${{ inputs.os }}
steps:
- uses: ros-tooling/[email protected]
- uses: ros-tooling/[email protected]
with:
package-name: lbr_fri_ros2_stack
target-ros2-distro: humble
vcs-repo-file-url: https://raw.githubusercontent.com/lbr-stack/lbr_fri_ros2_stack/humble/lbr_fri_ros2_stack/repos-fri-${{ matrix.fri_version }}.yaml
vcs-repo-file-url: https://raw.githubusercontent.com/lbr-stack/lbr_fri_ros2_stack/humble/lbr_fri_ros2_stack/repos-fri-${{ inputs.fri_version }}.yaml
32 changes: 32 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,38 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package LBR FRI ROS 2 Stack
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Humble v2.0.0 (2024-07-08)
--------------------------
* Remove ``app.launch.py`` from demos in favor for ``ros2_control`` variant (breaking change)
* ``lbr_ros2_control``:

* Add Cartesian impedance controller
* Add ``lbr_system_parameters.yaml`` for system parameter configuration
* ``lbr_demos``:

* Remove legacy demos
* Add demo for each available controller, both in C++ and Python
* ``lbr_fri_ros2``: De-couple the async client into ``position`` / ``torque`` / ``wrench``
* Matrix testing against multiple FRIs (https://github.com/lbr-stack/fri): ``1.11``, ``1.14``, ``1.15``, ``1.16``, ``2.5``, ``2.7``
* IDL changes: (breaking change)

* ``lbr_fri_msgs`` to ``lbr_fri_idl``
* Moved ``lbr_fri_idl`` into external folder (https://github.com/lbr-stack/lbr_fri_idl) for supporting multiple FRI versions
* Renamed ``LBRPositionCommand`` to ``LBRJointPositionCommand``
* Update documentation

* Refer https://lbr-stack.readthedocs.io/en/latest/
* Deletes branches at https://github.com/lbr-stack/lbr_stack_doc in favor of tags
* Adds an architecture chart to highlight ``lbr_ros2_control`` relation to ``ros2_control``
* Add log coloring a la https://github.com/ros-controls/ros2_control/blob/e149646d3f2595f269cfa4e1cd0681abde89ee69/controller_manager/controller_manager/spawner.py#L45
* Adds ``black`` linting for Python scripts
* Fixes velocity limit checks in impedance control mode
* Add development tools dependency https://github.com/lbr-stack/lbr_fri_ros2_stack/issues/145
* ``ros2_control_node``: Read robot description from robot state publisher
* Add tests to ``lbr_fri_idl`` and ``lbr_fri_ros2``
* Moves all launch mixins to ``lbr_bringup``
* Update parameter source for ``gazebo_ros2_control`` package in ``lbr.gazebo.xacro``

Humble v1.4.3 (2024-02-03)
--------------------------
* Fixes planning scene namespace https://github.com/lbr-stack/lbr_fri_ros2_stack/issues/153
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# lbr_fri_ros2_stack
[![Build status](https://github.com/lbr-stack/lbr_fri_ros2_stack/actions/workflows/build.yml/badge.svg?branch=humble)](https://github.com/lbr-stack/lbr_fri_ros2_stack/actions)
[![License](https://img.shields.io/github/license/lbr-stack/lbr_fri_ros2_stack)](https://github.com/lbr-stack/lbr_fri_ros2_stack/tree/humble?tab=Apache-2.0-1-ov-file#readme)
[![Documentation Status](https://readthedocs.org/projects/lbr-stack/badge/?version=latest)](https://lbr-stack.readthedocs.io/en/latest/?badge=latest)
[![JOSS](https://joss.theoj.org/papers/c43c82bed833c02503dd47f2637192ef/status.svg)](https://joss.theoj.org/papers/c43c82bed833c02503dd47f2637192ef)
Expand All @@ -24,6 +23,16 @@ ROS 2 packages for the KUKA LBR, including communication to the real robot via t
</table>
</body>

## Status
| OS | ROS Distribution | FRI Version | Build Status |
| :------------- | :--------------- | :---------- | :----------- |
| `Ubuntu-22.04` | `humble` | `1.11` | [![build-ubuntu-22.04-fri-1.11](https://github.com/lbr-stack/lbr_fri_ros2_stack/actions/workflows/build-ubuntu-22.04-fri-1.11.yml/badge.svg)](https://github.com/lbr-stack/lbr_fri_ros2_stack/actions/workflows/build-ubuntu-22.04-fri-1.11.yml) |
| `Ubuntu-22.04` | `humble` | `1.14` | [![build-ubuntu-22.04-fri-1.14](https://github.com/lbr-stack/lbr_fri_ros2_stack/actions/workflows/build-ubuntu-22.04-fri-1.14.yml/badge.svg)](https://github.com/lbr-stack/lbr_fri_ros2_stack/actions/workflows/build-ubuntu-22.04-fri-1.14.yml) |
| `Ubuntu-22.04` | `humble` | `1.15` | [![build-ubuntu-22.04-fri-1.15](https://github.com/lbr-stack/lbr_fri_ros2_stack/actions/workflows/build-ubuntu-22.04-fri-1.15.yml/badge.svg)](https://github.com/lbr-stack/lbr_fri_ros2_stack/actions/workflows/build-ubuntu-22.04-fri-1.15.yml) |
| `Ubuntu-22.04` | `humble` | `1.16` | [![build-ubuntu-22.04-fri-1.16](https://github.com/lbr-stack/lbr_fri_ros2_stack/actions/workflows/build-ubuntu-22.04-fri-1.16.yml/badge.svg)](https://github.com/lbr-stack/lbr_fri_ros2_stack/actions/workflows/build-ubuntu-22.04-fri-1.16.yml) |
| `Ubuntu-22.04` | `humble` | `2.5` | [![build-ubuntu-22.04-fri-2.5](https://github.com/lbr-stack/lbr_fri_ros2_stack/actions/workflows/build-ubuntu-22.04-fri-2.5.yml/badge.svg)](https://github.com/lbr-stack/lbr_fri_ros2_stack/actions/workflows/build-ubuntu-22.04-fri-2.5.yml) |
| `Ubuntu-22.04` | `humble` | `2.7` | [![build-ubuntu-22.04-fri-2.7](https://github.com/lbr-stack/lbr_fri_ros2_stack/actions/workflows/build-ubuntu-22.04-fri-2.7.yml/badge.svg)](https://github.com/lbr-stack/lbr_fri_ros2_stack/actions/workflows/build-ubuntu-22.04-fri-2.7.yml) |

## Documentation
Full documentation available on [Read the Docs](https://lbr-stack.readthedocs.io/en/latest).

Expand Down
4 changes: 2 additions & 2 deletions lbr_bringup/launch/gazebo.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ def launch_setup(context: LaunchContext) -> List[LaunchDescriptionEntity]:
robot_name=model,
package_name=f"{model}_moveit_config",
)
movegroup_params = LBRMoveGroupMixin.params_move_group()
move_group_params = LBRMoveGroupMixin.params_move_group()

ld.add_action(
LBRMoveGroupMixin.node_move_group(
parameters=[
moveit_configs_builder.to_dict(),
movegroup_params,
move_group_params,
{"use_sim_time": True},
],
condition=IfCondition(LaunchConfiguration("moveit")),
Expand Down
4 changes: 2 additions & 2 deletions lbr_bringup/launch/move_group.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def launch_setup(context: LaunchContext) -> List[LaunchDescriptionEntity]:
robot_name=model,
package_name=f"{model}_moveit_config",
)
movegroup_params = LBRMoveGroupMixin.params_move_group()
move_group_params = LBRMoveGroupMixin.params_move_group()

# MoveGroup:
# - requires world frame
Expand All @@ -45,7 +45,7 @@ def launch_setup(context: LaunchContext) -> List[LaunchDescriptionEntity]:
LBRMoveGroupMixin.node_move_group(
parameters=[
moveit_configs_builder.to_dict(),
movegroup_params,
move_group_params,
{"use_sim_time": LaunchConfiguration("sim")},
],
namespace=robot_name,
Expand Down
4 changes: 2 additions & 2 deletions lbr_bringup/launch/real.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ def launch_setup(context: LaunchContext) -> List[LaunchDescriptionEntity]:
robot_name=model,
package_name=f"{model}_moveit_config",
)
movegroup_params = LBRMoveGroupMixin.params_move_group()
move_group_params = LBRMoveGroupMixin.params_move_group()

ld.add_action(
LBRMoveGroupMixin.node_move_group(
parameters=[
moveit_configs_builder.to_dict(),
movegroup_params,
move_group_params,
{"use_sim_time": False},
],
condition=IfCondition(LaunchConfiguration("moveit")),
Expand Down
2 changes: 1 addition & 1 deletion lbr_bringup/lbr_bringup/lbr_bringup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def moveit_configs_builder(
f"urdf/{robot_name}/{robot_name}.xacro",
),
)
.planning_pipelines(default_planning_pipeline="ompl", pipelines=["ompl"])
.planning_pipelines(default_planning_pipeline="ompl")
)

@staticmethod
Expand Down
1 change: 1 addition & 0 deletions lbr_demos/doc/lbr_demos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ MoveIt
:titlesonly:

lbr_moveit2_py <../lbr_moveit_py/doc/lbr_moveit_py.rst>
lbr_moveit2_cpp <../lbr_moveit_cpp/doc/lbr_moveit_cpp.rst>

Integration
-----------
Expand Down
34 changes: 34 additions & 0 deletions lbr_demos/lbr_moveit_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
cmake_minimum_required(VERSION 3.22)
project(lbr_moveit_cpp)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(moveit_ros_planning_interface REQUIRED)
find_package(rclcpp REQUIRED)

add_executable(hello_moveit src/hello_moveit.cpp)

ament_target_dependencies(hello_moveit
geometry_msgs
moveit_ros_planning_interface
rclcpp
)

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

install(TARGETS hello_moveit
DESTINATION lib/${PROJECT_NAME}
)

ament_package()
86 changes: 86 additions & 0 deletions lbr_demos/lbr_moveit_cpp/doc/lbr_moveit_cpp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
lbr_moveit_cpp
==============
.. note::

Also refer to the official `MoveIt <https://moveit.picknik.ai/humble/doc/tutorials/your_first_project/your_first_project.html>`_:octicon:`link-external` documentation.

.. contents:: Table of Contents
:depth: 2
:local:
:backlinks: none

MoveIt via C++ API
------------------
Simulation
~~~~~~~~~~
#. Run the robot driver:

.. code-block:: bash
ros2 launch lbr_bringup bringup.launch.py \
moveit:=true \
sim:=true \
model:=iiwa7 # [iiwa7, iiwa14, med7, med14]
#. Run the `hello_moveit <https://github.com/lbr-stack/lbr_fri_ros2_stack/blob/humble/lbr_demos/lbr_moveit_cpp/src/hello_moveit.cpp>`_:octicon:`link-external` node:

.. code-block:: bash
ros2 launch lbr_moveit_cpp hello_moveit.launch.py \
sim:=true \
model:=iiwa7 # [iiwa7, iiwa14, med7, med14]
Hardware
~~~~~~~~
#. Client side configurations:

#. Configure the ``client_command_mode`` to ``position`` in `lbr_system_parameters.yaml <https://github.com/lbr-stack/lbr_fri_ros2_stack/blob/humble/lbr_ros2_control/config/lbr_system_parameters.yaml>`_:octicon:`link-external`
#. Set the ``update_rate`` to ``100`` in `lbr_controllers.yaml <https://github.com/lbr-stack/lbr_fri_ros2_stack/blob/humble/lbr_ros2_control/config/lbr_controllers.yaml>`_:octicon:`link-external`

#. Remote side configurations:

#. .. dropdown:: Launch the ``LBRServer`` application on the ``KUKA smartPAD``

.. thumbnail:: ../../doc/img/applications_lbr_server.png

#. Select

- ``FRI send period``: ``10 ms``
- ``IP address``: ``your configuration``
- ``FRI control mode``: ``POSITION_CONTROL`` or ``JOINT_IMPEDANCE_CONTROL``
- ``FRI client command mode``: ``POSITION``

#. Proceed with steps 1 and 2 from `Simulation`_ but with ``sim:=false``.

Examining the Code
~~~~~~~~~~~~~~~~~~
The source code for this demo is available on `GitHub <https://github.com/lbr-stack/lbr_fri_ros2_stack/tree/humble/lbr_demos/lbr_moveit_cpp>`_:octicon:`link-external`. The demo vastly follows the official `MoveIt <https://moveit.picknik.ai/humble/doc/tutorials/your_first_project/your_first_project.html>`_:octicon:`link-external` demo.

Differently, this repository puts the ``MoveGroup`` under a namespace. The ``MoveGroup`` is thus created as follows:

.. code-block:: cpp
// Create MoveGroupInterface (lives inside robot_name namespace)
auto move_group_interface = moveit::planning_interface::MoveGroupInterface(
node_ptr, moveit::planning_interface::MoveGroupInterface::Options("arm", "robot_description",
robot_name));
The ``MoveGroup`` configurations are parsed conveniently through a mixin:

.. code-block:: python
from launch_mixins.lbr_bringup import LBRMoveGroupMixin
...
model = LaunchConfiguration("model").perform(context)
# generate moveit configs
moveit_configs = LBRMoveGroupMixin.moveit_configs_builder(
robot_name=model,
package_name=f"{model}_moveit_config",
)
.. note::

The MoveIt configurations might vary depending the user's configurations.
Loading

0 comments on commit 5085157

Please sign in to comment.