Skip to content

Commit

Permalink
rviz_config -> rviz_cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
mhubii committed Oct 20, 2024
1 parent 62a5cfa commit 0115ba2
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ Full documentation available on [Read the Docs](https://lbr-stack.readthedocs.io
```shell
source install/setup.bash
ros2 launch lbr_bringup rviz.launch.py \
rviz_config_pkg:=lbr_bringup \
rviz_config:=config/mock.rviz
rviz_cfg_pkg:=lbr_bringup \
rviz_cfg:=config/mock.rviz
```

Now, run the [demos](https://lbr-stack.readthedocs.io/en/latest/lbr_fri_ros2_stack/lbr_demos/doc/lbr_demos.html). To get started with the real robot, checkout the [Hardware Setup](https://lbr-stack.readthedocs.io/en/latest/lbr_fri_ros2_stack/lbr_fri_ros2_stack/doc/hardware_setup.html).
Expand Down
8 changes: 4 additions & 4 deletions lbr_bringup/doc/lbr_bringup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ This launch file will spin up ``RViz`` for visualization. It will (see `rviz.lau
.. code:: bash
ros2 launch lbr_bringup rviz.launch.py \
rviz_config_pkg:=lbr_bringup \
rviz_config:=config/mock.rviz # [gazebo.rviz, hardware.rviz, mock.rviz]
rviz_cfg_pkg:=lbr_bringup \
rviz_cfg:=config/mock.rviz # [gazebo.rviz, hardware.rviz, mock.rviz]
.. note::
List all arguments for the launch file via ``ros2 launch lbr_bringup rviz.launch.py -s``.
Expand Down Expand Up @@ -156,8 +156,8 @@ The below shows an example of the `rviz.launch.py <https://github.com/lbr-stack/
ld = LaunchDescription()
# launch arguments
ld.add_action(RVizMixin.arg_rviz_config())
ld.add_action(RVizMixin.arg_rviz_config_pkg())
ld.add_action(RVizMixin.arg_rviz_cfg())
ld.add_action(RVizMixin.arg_rviz_cfg_pkg())
# rviz
ld.add_action(RVizMixin.node_rviz())
Expand Down
4 changes: 2 additions & 2 deletions lbr_bringup/launch/move_group.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def hidden_setup(context: LaunchContext) -> List[LaunchDescriptionEntity]:

# RViz if desired
rviz = RVizMixin.node_rviz(
rviz_config_pkg=f"{model}_moveit_config",
rviz_config="config/moveit.rviz",
rviz_cfg_pkg=f"{model}_moveit_config",
rviz_cfg="config/moveit.rviz",
parameters=LBRMoveGroupMixin.params_rviz(
moveit_configs=moveit_configs_builder.to_moveit_configs()
)
Expand Down
4 changes: 2 additions & 2 deletions lbr_bringup/launch/rviz.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ def generate_launch_description() -> LaunchDescription:
ld = LaunchDescription()

# launch arguments
ld.add_action(RVizMixin.arg_rviz_config())
ld.add_action(RVizMixin.arg_rviz_config_pkg())
ld.add_action(RVizMixin.arg_rviz_cfg())
ld.add_action(RVizMixin.arg_rviz_cfg_pkg())

# rviz
ld.add_action(RVizMixin.node_rviz())
Expand Down
26 changes: 13 additions & 13 deletions lbr_bringup/lbr_bringup/rviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,32 @@ def arg_rviz(default_value: str = "false") -> DeclareLaunchArgument:
)

@staticmethod
def arg_rviz_config_pkg(
def arg_rviz_cfg_pkg(
default_value: str = "lbr_bringup",
) -> DeclareLaunchArgument:
return DeclareLaunchArgument(
name="rviz_config_pkg",
name="rviz_cfg_pkg",
default_value=default_value,
description="The RViz configuration file.",
description="The package containing the RViz configuration file.",
)

@staticmethod
def arg_rviz_config(
def arg_rviz_cfg(
default_value: str = "config/mock.rviz",
) -> DeclareLaunchArgument:
return DeclareLaunchArgument(
name="rviz_config",
name="rviz_cfg",
default_value=default_value,
description="The RViz configuration file.",
description="The RViz configuration file relative to rviz_cfg_pkg.",
)

@staticmethod
def node_rviz(
rviz_config_pkg: Optional[
Union[LaunchConfiguration, str]
] = LaunchConfiguration("rviz_config_pkg", default="lbr_bringup"),
rviz_config: Optional[Union[LaunchConfiguration, str]] = LaunchConfiguration(
"rviz_config", default="config/mock.rviz"
rviz_cfg_pkg: Optional[Union[LaunchConfiguration, str]] = LaunchConfiguration(
"rviz_cfg_pkg", default="lbr_bringup"
),
rviz_cfg: Optional[Union[LaunchConfiguration, str]] = LaunchConfiguration(
"rviz_cfg", default="config/mock.rviz"
),
**kwargs,
) -> Node:
Expand All @@ -53,8 +53,8 @@ def node_rviz(
"-d",
PathJoinSubstitution(
[
FindPackageShare(rviz_config_pkg),
rviz_config,
FindPackageShare(rviz_cfg_pkg),
rviz_cfg,
]
),
],
Expand Down

0 comments on commit 0115ba2

Please sign in to comment.