-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from KCL-BMEIS/dev-galactic-demos
Dev galactic demos
- Loading branch information
Showing
104 changed files
with
1,907 additions
and
417 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
LBR Demos | ||
========= | ||
Demos for controlling the LBR through the Fast Robot Interface (FRI) from ROS 2. | ||
|
||
.. warning:: | ||
On the real robot, do always execute in ``T1`` mode first. | ||
|
||
LBR FRI ROS 2 Demos | ||
------------------- | ||
.. note:: | ||
These demos are compatible with and closely follow KUKA's FRI example applications. They send commands to ``/lbr_command`` and read states from ``/lbr_state``. | ||
|
||
.. note:: | ||
A real robot is required to run these demos. Make sure you followed :ref:`Robot Setup` first. | ||
|
||
.. toctree:: | ||
:titlesonly: | ||
|
||
LBR FRI ROS 2 C++ Demos <../lbr_fri_ros2_cpp_demos/doc/lbr_fri_ros2_cpp_demos.rst> | ||
LBR FRI ROS 2 Python Demos <../lbr_fri_ros2_python_demos/doc/lbr_fri_ros2_python_demos.rst> | ||
LBR FRI ROS 2 Advanced Python Demos <../lbr_fri_ros2_advanced_python_demos/doc/lbr_fri_ros2_advanced_python_demos.rst> | ||
|
||
LBR ROS 2 Control Demos | ||
----------------------- | ||
These demos demonstrate the LBR integration into the ROS 2 ecosystem through ``ros2_control``. | ||
|
||
.. note:: | ||
These demos run in simulation **and** on the real robot. For the real robot, make sure you followed :ref:`Robot Setup` first. | ||
|
||
.. toctree:: | ||
:titlesonly: | ||
|
||
LBR ROS 2 Control C++ Demos <../lbr_ros2_control_cpp_demos/doc/lbr_ros2_control_cpp_demos.rst> | ||
LBR ROS 2 Control Python Demos <../lbr_ros2_control_python_demos/doc/lbr_ros2_control_python_demos.rst> |
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,17 @@ | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
29 changes: 29 additions & 0 deletions
29
...s/lbr_fri_ros2_advanced_python_demos/doc/lbr_fri_ros2_advanced_python_demos.rst
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,29 @@ | ||
LBR FRI ROS 2 Advanced Python Demos | ||
=================================== | ||
Collection of advanced usage examples for the ``lbr_fri_ros2`` package through Python. | ||
|
||
.. warning:: | ||
Do always execute in ``T1`` mode first. | ||
|
||
Admittance Controller | ||
--------------------- | ||
.. warning:: | ||
Not well behaved around singularities, put the robot in a well-behaved configuration first, e.g. ``A1 = 0°``, ``A2 = -30°``, ``A3 = 0°``, ``A4 = 60°``, ``A5 = 0°``, ``A6 = -90°``, ``A7 = 0°``. This can be done using the ``smartPAD`` in ``T1`` mode. | ||
|
||
1. .. dropdown:: Launch the ``LBRServer`` application on the ``KUKA smartPAD`` | ||
|
||
.. thumbnail:: ../../doc/img/applications_lbr_server.png | ||
|
||
2. Launch the robot driver: | ||
|
||
.. code-block:: bash | ||
ros2 launch lbr_fri_ros2 lbr_app.launch.py model:=iiwa7 # [iiwa7, iiwa14, med7, med14] | ||
3. Run the `admittance_control_node <https://github.com/KCL-BMEIS/lbr_fri_ros2_stack/blob/galactic/lbr_demos/lbr_fri_ros2_advanced_python_demos/lbr_fri_ros2_advanced_python_demos/admittance_control_node.py>`_: | ||
|
||
.. code-block:: bash | ||
ros2 run lbr_fri_ros2_advanced_python_demos admittance_control_node | ||
4. Now gently move the robot at the end-effector. |
Empty file.
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,21 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>lbr_fri_ros2_advanced_python_demos</name> | ||
<version>1.0.0</version> | ||
<description>Advanced Python demos for the lbr_fri_ros2.</description> | ||
<maintainer email="[email protected]">mhubii</maintainer> | ||
<license>MIT</license> | ||
|
||
<exec_depend>lbr_fri_msgs</exec_depend> | ||
<exec_depend>rclpy</exec_depend> | ||
|
||
<test_depend>ament_copyright</test_depend> | ||
<test_depend>ament_flake8</test_depend> | ||
<test_depend>ament_pep257</test_depend> | ||
<test_depend>python3-pytest</test_depend> | ||
|
||
<export> | ||
<build_type>ament_python</build_type> | ||
</export> | ||
</package> |
Empty file.
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,4 @@ | ||
[develop] | ||
script_dir=$base/lib/lbr_fri_ros2_advanced_python_demos | ||
[install] | ||
install_scripts=$base/lib/lbr_fri_ros2_advanced_python_demos |
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,25 @@ | ||
from setuptools import setup | ||
|
||
package_name = "lbr_fri_ros2_advanced_python_demos" | ||
|
||
setup( | ||
name=package_name, | ||
version="0.0.0", | ||
packages=[package_name], | ||
data_files=[ | ||
("share/ament_index/resource_index/packages", ["resource/" + package_name]), | ||
("share/" + package_name, ["package.xml"]), | ||
], | ||
install_requires=["setuptools"], | ||
zip_safe=True, | ||
maintainer="mhubii", | ||
maintainer_email="[email protected]", | ||
description="Advanced Python demos for the lbr_fri_ros2.", | ||
license="MIT", | ||
tests_require=["pytest"], | ||
entry_points={ | ||
"console_scripts": [ | ||
"admittance_control_node = lbr_fri_ros2_advanced_python_demos.admittance_control_node:main", | ||
], | ||
}, | ||
) |
25 changes: 25 additions & 0 deletions
25
lbr_demos/lbr_fri_ros2_advanced_python_demos/test/test_copyright.py
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,25 @@ | ||
# Copyright 2015 Open Source Robotics Foundation, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from ament_copyright.main import main | ||
import pytest | ||
|
||
|
||
# Remove the `skip` decorator once the source file(s) have a copyright header | ||
@pytest.mark.skip(reason='No copyright header has been placed in the generated source file.') | ||
@pytest.mark.copyright | ||
@pytest.mark.linter | ||
def test_copyright(): | ||
rc = main(argv=['.', 'test']) | ||
assert rc == 0, 'Found errors' |
25 changes: 25 additions & 0 deletions
25
lbr_demos/lbr_fri_ros2_advanced_python_demos/test/test_flake8.py
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,25 @@ | ||
# Copyright 2017 Open Source Robotics Foundation, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from ament_flake8.main import main_with_errors | ||
import pytest | ||
|
||
|
||
@pytest.mark.flake8 | ||
@pytest.mark.linter | ||
def test_flake8(): | ||
rc, errors = main_with_errors(argv=[]) | ||
assert rc == 0, \ | ||
'Found %d code style errors / warnings:\n' % len(errors) + \ | ||
'\n'.join(errors) |
23 changes: 23 additions & 0 deletions
23
lbr_demos/lbr_fri_ros2_advanced_python_demos/test/test_pep257.py
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,23 @@ | ||
# Copyright 2015 Open Source Robotics Foundation, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from ament_pep257.main import main | ||
import pytest | ||
|
||
|
||
@pytest.mark.linter | ||
@pytest.mark.pep257 | ||
def test_pep257(): | ||
rc = main(argv=['.', 'test']) | ||
assert rc == 0, 'Found code style errors / warnings' |
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,59 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
project(lbr_fri_ros2_cpp_demos) | ||
|
||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic) | ||
endif() | ||
|
||
# find dependencies | ||
find_package(ament_cmake REQUIRED) | ||
find_package(fri REQUIRED) | ||
find_package(lbr_fri_msgs REQUIRED) | ||
find_package(rclcpp REQUIRED) | ||
|
||
# joint sine overlay | ||
add_executable(joint_sine_overlay_node | ||
src/joint_sine_overlay_node.cpp | ||
) | ||
|
||
ament_target_dependencies(joint_sine_overlay_node | ||
fri | ||
lbr_fri_msgs | ||
rclcpp | ||
) | ||
|
||
# torque sine overlay | ||
add_executable(torque_sine_overlay_node | ||
src/torque_sine_overlay_node.cpp | ||
) | ||
|
||
ament_target_dependencies(torque_sine_overlay_node | ||
fri | ||
lbr_fri_msgs | ||
rclcpp | ||
) | ||
|
||
# wrench sine overlay | ||
add_executable(wrench_sine_overlay_node | ||
src/wrench_sine_overlay_node.cpp | ||
) | ||
|
||
ament_target_dependencies(wrench_sine_overlay_node | ||
fri | ||
lbr_fri_msgs | ||
rclcpp | ||
) | ||
|
||
install(TARGETS | ||
joint_sine_overlay_node | ||
torque_sine_overlay_node | ||
wrench_sine_overlay_node | ||
DESTINATION lib/${PROJECT_NAME} | ||
) | ||
|
||
install(DIRECTORY | ||
launch | ||
DESTINATION share/${PROJECT_NAME} | ||
) | ||
|
||
ament_package() |
Oops, something went wrong.