-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'humble' into dev-humble-launch
- Loading branch information
Showing
32 changed files
with
410 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Oops, something went wrong.