Skip to content

Commit 9125bbc

Browse files
authored
Merge pull request #347 from lbr-stack/backport-346-to-jazzy
Resolve backport (#346)
2 parents 24cd253 + ef8eba3 commit 9125bbc

4 files changed

Lines changed: 24 additions & 47 deletions

File tree

lbr_bringup/doc/lbr_bringup.rst

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ The ``lbr_bringup`` package hosts some launch files, which can be included via s
1212
1313
def generate_launch_description() -> LaunchDescription:
1414
return LaunchDescription(
15-
IncludeLaunchDescription(
16-
PathSubstitution(
17-
FindPackageShare("lbr_bringup") / "launch" / "mock.launch.py"
15+
[
16+
IncludeLaunchDescription(
17+
PathSubstitution(
18+
FindPackageShare("lbr_bringup") / "launch" / "mock.launch.py"
19+
)
1820
)
19-
)
21+
]
2022
)
2123
2224
The launch files can also be run via the command line, as further described below.
@@ -134,25 +136,6 @@ Please note that MoveIt configurations are specific and you as a user will need
134136
.. note::
135137
Runs ``RViz`` with specific MoveIt configurations.
136138

137-
Mixins
138-
------
139-
The ``lbr_bringup`` package makes heavy use of mixins. Mixins are simply state-free classes with static methods. They are a convenient way of writing launch files.
140-
141-
The below shows an example of the `rviz.launch.py <https://github.com/lbr-stack/lbr_fri_ros2_stack/blob/jazzy/lbr_bringup/launch/rviz.launch.py>`_:octicon:`link-external` file:
142-
143-
.. code:: python
144-
145-
from launch import LaunchDescription
146-
from lbr_bringup.rviz import RVizMixin
147-
148-
149-
def generate_launch_description() -> LaunchDescription:
150-
return LaunchDescription(
151-
[RVizMixin.arg_rviz_cfg(), RVizMixin.arg_rviz_cfg_pkg(), RVizMixin.node_rviz()]
152-
)
153-
154-
Which is quite compact and easy to read.
155-
156139
General Information on the FRI
157140
------------------------------
158141
The ``FRI`` lets the user select a ``FRI control mode`` and a ``FRI client command mode``. When running the ``LBRServer``:

lbr_bringup/launch/gazebo.launch.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ def generate_launch_description() -> LaunchDescription:
2222
DeclareLaunchArgument(
2323
name="robot_name",
2424
default_value="lbr",
25-
description="The robot's name.",
25+
description="The robot's name. Links in the tf tree will be prefixed as <robot_name>_link. Same applies to joints.",
26+
),
27+
DeclareLaunchArgument(
28+
name="namespace",
29+
default_value="lbr",
30+
description="Nodes in this launch file will be spawned with this namespace.",
2631
),
2732
DeclareLaunchArgument(
2833
name="init_jnt_pos_pkg",
@@ -43,11 +48,6 @@ def generate_launch_description() -> LaunchDescription:
4348
"joint_trajectory_controller",
4449
],
4550
),
46-
DeclareLaunchArgument(
47-
name="namespace",
48-
default_value="lbr",
49-
description="The namespace of the robot.",
50-
),
5151
Node(
5252
package="robot_state_publisher",
5353
executable="robot_state_publisher",

lbr_bringup/launch/hardware.launch.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ def generate_launch_description() -> LaunchDescription:
2222
DeclareLaunchArgument(
2323
name="robot_name",
2424
default_value="lbr",
25-
description="The robot's name.",
25+
description="The robot's name. Links in the tf tree will be prefixed as <robot_name>_link. Same applies to joints.",
26+
),
27+
DeclareLaunchArgument(
28+
name="namespace",
29+
default_value="lbr",
30+
description="Nodes in this launch file will be spawned with this namespace.",
2631
),
2732
DeclareLaunchArgument(
2833
name="sys_cfg_pkg",
@@ -58,11 +63,6 @@ def generate_launch_description() -> LaunchDescription:
5863
"twist_controller",
5964
],
6065
),
61-
DeclareLaunchArgument(
62-
name="namespace",
63-
default_value="lbr",
64-
description="The namespace of the robot.",
65-
),
6666
Node(
6767
package="robot_state_publisher",
6868
executable="robot_state_publisher",
@@ -104,9 +104,6 @@ def generate_launch_description() -> LaunchDescription:
104104
/ LaunchConfiguration("ctrl_cfg"),
105105
],
106106
namespace=LaunchConfiguration("namespace"),
107-
remappings=[
108-
("~/robot_description", "robot_description"),
109-
],
110107
),
111108
Node(
112109
package="controller_manager",

lbr_bringup/launch/mock.launch.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ def generate_launch_description() -> LaunchDescription:
2222
DeclareLaunchArgument(
2323
name="robot_name",
2424
default_value="lbr",
25-
description="The robot's name.",
25+
description="The robot's name. Links in the tf tree will be prefixed as <robot_name>_link. Same applies to joints.",
26+
),
27+
DeclareLaunchArgument(
28+
name="namespace",
29+
default_value="lbr",
30+
description="Nodes in this launch file will be spawned with this namespace.",
2631
),
2732
DeclareLaunchArgument(
2833
name="ctrl_cfg_pkg",
@@ -48,11 +53,6 @@ def generate_launch_description() -> LaunchDescription:
4853
default_value="lbr_description",
4954
description="Package containing the initial_joint_positions.yaml file.",
5055
),
51-
DeclareLaunchArgument(
52-
name="namespace",
53-
default_value="lbr",
54-
description="The namespace of the robot.",
55-
),
5656
DeclareLaunchArgument(
5757
name="init_jnt_pos",
5858
default_value="ros2_control/initial_joint_positions.yaml",
@@ -103,9 +103,6 @@ def generate_launch_description() -> LaunchDescription:
103103
/ LaunchConfiguration("ctrl_cfg"),
104104
],
105105
namespace=LaunchConfiguration("namespace"),
106-
remappings=[
107-
("~/robot_description", "robot_description"),
108-
],
109106
),
110107
Node(
111108
package="controller_manager",

0 commit comments

Comments
 (0)