Skip to content

Commit 0e02601

Browse files
authored
Merge pull request #394 from lbr-stack/backport-393-to-jazzy
Backport 393 to jazzy
2 parents a3198f6 + 6e7e9f6 commit 0e02601

28 files changed

Lines changed: 1641 additions & 4 deletions

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Jazzy v2.x (TBD)
1111

1212
* Replace ``ament_target_dependencies`` with ``target_link_libraries``.
1313
* ``lbr_moveit``: Add missing ``pynput`` dependency and fix dataclasses.
14+
* ``lbr_dual_arm``: Adds dual-arm integration demo package.
15+
* ``lbr_dual_arm_moveit_config``: Adds dual-arm moveit configuration package.
1416
* ``lbr_description``:
1517

1618
* Removes ``lbr_description`` from this folder in favor of external descriptions:
@@ -38,6 +40,7 @@ Jazzy v2.x (TBD)
3840
* Related pull requests:
3941

4042
* MoveIt fix: https://github.com/lbr-stack/lbr_fri_ros2_stack/pull/379
43+
* Dual-arm: https://github.com/lbr-stack/lbr_fri_ros2_stack/pull/393 (kenichi-maeda)
4144
* Namespace argument: https://github.com/lbr-stack/lbr_fri_ros2_stack/pull/344, https://github.com/lbr-stack/lbr_fri_ros2_stack/pull/353
4245
* Effort limits: https://github.com/lbr-stack/lbr_fri_ros2_stack/pull/357
4346
* URDF de-coupling: https://github.com/lbr-stack/lbr_fri_ros2_stack/pull/359, https://github.com/lbr-stack/lbr_fri_ros2_stack/pull/389

lbr_demos/doc/lbr_demos.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ MoveIt
3232
lbr_moveit <../lbr_moveit/doc/lbr_moveit.rst>
3333
lbr_moveit_cpp <../lbr_moveit_cpp/doc/lbr_moveit_cpp.rst>
3434

35+
3536
Integration
3637
-----------
37-
TODO system integration demos
38+
.. toctree::
39+
:titlesonly:
40+
41+
lbr_dual_arm <../lbr_dual_arm/lbr_dual_arm/doc/lbr_dual_arm.rst>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
project(lbr_dual_arm)
3+
4+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
5+
add_compile_options(-Wall -Wextra -Wpedantic)
6+
endif()
7+
8+
find_package(ament_cmake REQUIRED)
9+
10+
install(
11+
DIRECTORY config launch urdf
12+
DESTINATION share/${PROJECT_NAME}
13+
)
14+
15+
ament_package()
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Use of /** so that the configurations hold for controller
2+
# managers regardless of their namespace. Usefull in multi-robot setups.
3+
/**/controller_manager:
4+
ros__parameters:
5+
update_rate: 100
6+
7+
# ROS 2 control broadcasters
8+
joint_state_broadcaster:
9+
type: joint_state_broadcaster/JointStateBroadcaster
10+
11+
# ROS 2 control controllers
12+
joint_trajectory_controller:
13+
type: joint_trajectory_controller/JointTrajectoryController
14+
15+
# ROS 2 control controllers
16+
/**/joint_trajectory_controller:
17+
ros__parameters:
18+
joints:
19+
# robot one
20+
- lbr_one_A1
21+
- lbr_one_A2
22+
- lbr_one_A3
23+
- lbr_one_A4
24+
- lbr_one_A5
25+
- lbr_one_A6
26+
- lbr_one_A7
27+
# robot two
28+
- lbr_two_A1
29+
- lbr_two_A2
30+
- lbr_two_A3
31+
- lbr_two_A4
32+
- lbr_two_A5
33+
- lbr_two_A6
34+
- lbr_two_A7
35+
command_interfaces:
36+
- position
37+
state_interfaces:
38+
- position
39+
- velocity
40+
state_publish_rate: 50.0
41+
action_monitor_rate: 20.0
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# initial joint positions [degrees]
2+
A1: 0.0
3+
A2: 25.0
4+
A3: 0.0
5+
A4: 90.0
6+
A5: 0.0
7+
A6: 0.0
8+
A7: 0.0
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
A1:
2+
lower: -169 # each lower / upper limit is 1 degree stricter to avoid hard limits
3+
upper: 169
4+
velocity: 98
5+
effort: 200
6+
safety_position_margin: 5 # inside the URDF, we compute k_position=velocity/safety_position_margin
7+
k_velocity: 10
8+
A2:
9+
lower: -119
10+
upper: 119
11+
velocity: 98
12+
effort: 200
13+
safety_position_margin: 5
14+
k_velocity: 10
15+
A3:
16+
lower: -169
17+
upper: 169
18+
velocity: 100
19+
effort: 200
20+
safety_position_margin: 5
21+
k_velocity: 10
22+
A4:
23+
lower: -119
24+
upper: 119
25+
velocity: 130
26+
effort: 200
27+
safety_position_margin: 5
28+
k_velocity: 10
29+
A5:
30+
lower: -169
31+
upper: 169
32+
velocity: 140
33+
effort: 200
34+
safety_position_margin: 5
35+
k_velocity: 10
36+
A6:
37+
lower: -119
38+
upper: 119
39+
velocity: 180
40+
effort: 200
41+
safety_position_margin: 5
42+
k_velocity: 10
43+
A7:
44+
lower: -174
45+
upper: 174
46+
velocity: 180
47+
effort: 200
48+
safety_position_margin: 5
49+
k_velocity: 10
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# these parameters are read by the lbr_system_interface.xacro and configure the lbr_ros2_control::SystemInterface
2+
fri_client_sdk: # the fri_client_sdk version is used to create the correct state interfaces lbr_system_interface.xacro
3+
major_version: 1
4+
minor_version: 15
5+
client_command_mode: position # the command mode specifies the user-sent commands. Available: [position, torque, wrench]
6+
port_id: 30200 # port id for the UDP communication. Useful in multi-robot setups
7+
remote_host: INADDR_ANY # the expected robot IP address. INADDR_ANY will accept any incoming connection
8+
rt_prio: 80 # real-time priority for the control loop
9+
# exponential moving average time constant for joint position commands [s]:
10+
# set tau > robot sample time for more smoothing on the commands
11+
# set tau << robot sample time for no smoothing on the commands
12+
joint_position_tau: 0.04
13+
command_guard:
14+
# if requested position / velocities beyond limits, CommandGuard will be triggered and the command will be overriden with the current state instead
15+
# available: [default, safe_stop]
16+
variant: default
17+
state_guard:
18+
# enable / disable the load data safety check in compliant control modes [CARTESIAN_IMPEDANCE, IMPEDANCE]
19+
# in POSITION control mode, safety check is not performed
20+
external_torque_safety_check: true
21+
external_torque_limit: 2.0 # maximum allowed external joint torque on activation of compliant control modes [Nm]
22+
# exponential moving average time constant for external joint torque measurements [s]:
23+
# set tau > robot sample time for more smoothing on the external torque measurements
24+
# set tau << robot sample time for no smoothing on the external torque measurements
25+
external_torque_tau: 0.01
26+
# exponential moving average time constant for joint torque measurements [s]:
27+
# set tau > robot sample time for more smoothing on the raw torque measurements
28+
# set tau << robot sample time for no smoothing on the raw torque measurements
29+
measured_torque_tau: 0.01
30+
# for position control, LBR works best in open_loop control mode
31+
# note that open_loop is overridden to false if LBR is in impedance or Cartesian impedance control mode
32+
open_loop: true
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# these parameters are read by the lbr_system_interface.xacro and configure the lbr_ros2_control::SystemInterface
2+
fri_client_sdk: # the fri_client_sdk version is used to create the correct state interfaces lbr_system_interface.xacro
3+
major_version: 1
4+
minor_version: 15
5+
client_command_mode: position # the command mode specifies the user-sent commands. Available: [position, torque, wrench]
6+
port_id: 30201 # port id for the UDP communication. Useful in multi-robot setups
7+
remote_host: INADDR_ANY # the expected robot IP address. INADDR_ANY will accept any incoming connection
8+
rt_prio: 80 # real-time priority for the control loop
9+
# exponential moving average time constant for joint position commands [s]:
10+
# set tau > robot sample time for more smoothing on the commands
11+
# set tau << robot sample time for no smoothing on the commands
12+
joint_position_tau: 0.04
13+
command_guard:
14+
# if requested position / velocities beyond limits, CommandGuard will be triggered and the command will be overriden with the current state instead
15+
# available: [default, safe_stop]
16+
variant: default
17+
state_guard:
18+
# enable / disable the load data safety check in compliant control modes [CARTESIAN_IMPEDANCE, IMPEDANCE]
19+
# in POSITION control mode, safety check is not performed
20+
external_torque_safety_check: true
21+
external_torque_limit: 2.0 # maximum allowed external joint torque on activation of compliant control modes [Nm]
22+
# exponential moving average time constant for external joint torque measurements [s]:
23+
# set tau > robot sample time for more smoothing on the external torque measurements
24+
# set tau << robot sample time for no smoothing on the external torque measurements
25+
external_torque_tau: 0.01
26+
# exponential moving average time constant for joint torque measurements [s]:
27+
# set tau > robot sample time for more smoothing on the raw torque measurements
28+
# set tau << robot sample time for no smoothing on the raw torque measurements
29+
measured_torque_tau: 0.01
30+
# for position control, LBR works best in open_loop control mode
31+
# note that open_loop is overridden to false if LBR is in impedance or Cartesian impedance control mode
32+
open_loop: true
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
lbr_dual_arm
2+
============
3+
Dual-arm ``iiwa7`` integration demo, including: launch files, description file, and ``ros2_control`` configurations.
4+
5+
.. contents:: Table of Contents
6+
:depth: 2
7+
:local:
8+
:backlinks: none
9+
10+
Quick Start
11+
-----------
12+
Open a terminal, then run:
13+
14+
.. code-block:: bash
15+
16+
ros2 launch lbr_dual_arm mock.launch.py \
17+
moveit:=true
18+
19+
.. note::
20+
For hardware, run ``hardware.launch.py`` (follow :doc:`Hardware Setup <../../../../lbr_fri_ros2_stack/doc/hardware_setup>` first).
21+
22+
.. note::
23+
To configure position / orientation, launch with ``lbr_one_x:=<value>`` etc. (list all arguments via ``ros2 launch lbr_dual_arm mock.launch.py -s``)
24+
25+
Description File
26+
----------------
27+
Custom description files can be generated via ``xacro``, see `lbr_dual_arm.xacro <https://github.com/lbr-stack/lbr_fri_ros2_stack/blob/jazzy/lbr_demos/lbr_dual_arm/lbr_dual_arm/urdf/lbr_dual_arm.xacro>`_:octicon:`link-external`.
28+
29+
#. Include macros:
30+
31+
.. code-block:: xml
32+
33+
<xacro:include filename="$(find lbr_iiwa7_r800_description)/urdf/lbr_iiwa7_r800_macro.xacro" />
34+
<xacro:include filename="$(find lbr_ros2_control)/config/lbr_system_interface.xacro" />
35+
36+
#. Instantiate macros (``ros2_control`` plugin and robot description)
37+
38+
.. code-block:: xml
39+
40+
<xacro:lbr_system_interface ... />
41+
<xacro:lbr_iiwa7_r800 ... />
42+
43+
Done! The controller manager will load appropriate plugins when reading the robot description from the robot state publisher.
44+
45+
Customize Hardware Network Settings
46+
-----------------------------------
47+
#. Open `lbr_one_system_config.yaml <https://github.com/lbr-stack/lbr_fri_ros2_stack/blob/jazzy/lbr_demos/lbr_dual_arm/lbr_dual_arm/config/lbr_one_system_config.yaml>`_:octicon:`link-external` and `lbr_two_system_config.yaml <https://github.com/lbr-stack/lbr_fri_ros2_stack/blob/jazzy/lbr_demos/lbr_dual_arm/lbr_dual_arm/config/lbr_two_system_config.yaml>`_:octicon:`link-external`.
48+
#. Set unique ``port_id`` values for each arm.
49+
#. Set ``remote_host`` per arm according to your network setup.
50+
51+
.. note::
52+
``port_id`` must be different for both arms.

0 commit comments

Comments
 (0)