|
1 | 1 | lbr_dual_arm_description |
2 | 2 | ======================== |
3 | | -This demo gives a walk through on using the ``lbr_description`` to generate a custom robot description. In this case, we will be investigating a dual-arm setup. |
4 | 3 |
|
5 | 4 | .. contents:: Table of Contents |
6 | 5 | :depth: 2 |
7 | 6 | :local: |
8 | 7 | :backlinks: none |
9 | 8 |
|
10 | | -Creating the Dual-arm Robot Description |
11 | | ---------------------------------------- |
12 | | -#. Create a dual-arm robot description: |
| 9 | +Customize Robot Placement |
| 10 | +------------------------- |
| 11 | +#. Open ``urdf/lbr_dual_arm.xacro``. |
| 12 | +#. Adjust the fixed joint origins: |
13 | 13 |
|
14 | | -.. code-block:: bash |
| 14 | + - ``lbr_one_base_joint`` |
| 15 | + - ``lbr_two_base_joint`` |
15 | 16 |
|
16 | | - touch urdf/lbr_dual_arm.xacro |
| 17 | +#. Typical changes are: |
17 | 18 |
|
18 | | -#. Fill it with the following contents (note that `xacro <https://github.com/ros/xacro/tree/ros2>`_:octicon:`link-external` is used): |
| 19 | + - Increase/decrease spacing between both arms via ``xyz``. |
| 20 | + - Rotate one arm around the base frame via ``rpy``. |
19 | 21 |
|
20 | | -.. code-block:: XML |
| 22 | +Customize Hardware Network Settings |
| 23 | +----------------------------------- |
| 24 | +#. Open ``ros2_control/lbr_one_system_config.yaml`` and ``ros2_control/lbr_two_system_config.yaml``. |
| 25 | +#. Set unique ``port_id`` values for each arm. |
| 26 | +#. Set ``remote_host`` per arm according to your network setup. |
21 | 27 |
|
22 | | - <?xml version="1.0"?> |
23 | | -
|
24 | | - <robot name="lbr_dual_arm" xmlns:xacro="http://www.ros.org/wiki/xacro"> |
25 | | - <!-- include the lbr iiwa macro --> |
26 | | - <xacro:include filename="$(find lbr_description)/urdf/iiwa7/iiwa7_description.xacro" /> |
27 | | -
|
28 | | - <!-- add an arguent to allow for mock / hardware / gazebo --> |
29 | | - <xacro:arg name="mode" default="mock" /> |
30 | | -
|
31 | | - <!-- add a base / floating link --> |
32 | | - <link name="base_link" /> |
33 | | -
|
34 | | - <!-- add robot 1 via macro, note that different lbr_one_system_config.yaml are used (to |
35 | | - configure port id) --> |
36 | | - <xacro:iiwa7 |
37 | | - robot_name="lbr_one" |
38 | | - mode="$(arg mode)" |
39 | | - system_config_path="$(find lbr_dual_arm_description)/ros2_control/lbr_one_system_config.yaml" /> |
40 | | -
|
41 | | - <!-- add robot 2 via macro --> |
42 | | - <xacro:iiwa7 |
43 | | - robot_name="lbr_two" |
44 | | - mode="$(arg mode)" |
45 | | - system_config_path="$(find lbr_dual_arm_description)/ros2_control/lbr_two_system_config.yaml" /> |
46 | | - </robot> |
47 | | -
|
48 | | -#. Create the ROS 2 Control configuration files: |
49 | | - |
50 | | - #. Create a configurations file for the controller manager and respective controllers: |
51 | | - |
52 | | - |
53 | | - |
54 | | - #. FRI system configurations (only necessary when hardware is used): |
55 | | - |
56 | | - .. code-block:: bash |
57 | | -
|
58 | | - cp `ros2 pkg prefix lbr_description`/share/lbr_description/ros2_control/lbr_system_config.yaml ros2_control/lbr_one_system_config.yaml && \ |
59 | | - cp `ros2 pkg prefix lbr_description`/share/lbr_description/ros2_control/lbr_system_config.yaml ros2_control/lbr_two_system_config.yaml |
60 | | -
|
61 | | -#. Open ``lbr_two_system_config.yaml``: |
62 | | - |
63 | | - #. Change ``port_id`` to ``30201`` (or as desired, but different from ``lbr_one_system_config.yaml``) |
64 | | - #. Update ``estimated_ft_sensor`` frames: |
65 | | - |
66 | | - .. code-black:: yaml |
67 | | - |
68 | | - chain_root: lbr_one_link_0 # and lbr_two_link_0 respectively |
69 | | - chain_tip: lbr_one_link_ee # and lbr_two_link_0 respectively |
70 | | - |
71 | | -#. Add the following to the ``CMakeLists.txt``: |
72 | | - |
73 | | - .. code-block:: cmake |
74 | | -
|
75 | | - install(DIRECTORY ros2_control urdf |
76 | | - DESTINATION share/${PROJECT_NAME} |
77 | | - ) |
78 | | -
|
79 | | -
|
80 | | -
|
81 | | -.. #. Build the package in your workspace: |
82 | | -
|
83 | | -.. .. code-block:: bash |
84 | | -
|
85 | | -.. colcon build --packages-select lbr_dual_arm_description --symlink-install |
| 28 | +.. note:: |
| 29 | + ``port_id`` must be different for both arms. |
0 commit comments