Skip to content

Commit

Permalink
Add point_cloud2_topic arg
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Sep 27, 2024
1 parent 136441d commit 483bad9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions husarion_utils/bringup_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def launch_setup(context, *args, **kwargs):

# Create the launch configuration variables
namespace = LaunchConfiguration("namespace").perform(context)
point_cloud2_topic = LaunchConfiguration("point_cloud2_topic").perform(context)
map_yaml_file = LaunchConfiguration("map").perform(context)
use_sim_time = LaunchConfiguration("use_sim_time").perform(context)
params_file = LaunchConfiguration("params_file").perform(context)
Expand All @@ -60,6 +61,10 @@ def launch_setup(context, *args, **kwargs):
source_file=params_file, replacements={"<robot_namespace>/": ""}
)

params_file = ReplaceString(
source_file=params_file, replacements={"<point_cloud2_topic>": point_cloud2_topic}
)

configured_params = ParameterFile(
RewrittenYaml(
source_file=params_file,
Expand Down Expand Up @@ -144,6 +149,11 @@ def generate_launch_description():
default_value=EnvironmentVariable("ROBOT_NAMESPACE", default_value=""),
description="Top-level namespace",
),
DeclareLaunchArgument(
"point_cloud2_topic",
default_value="",
description="Topic name for PointCloud2 messages.",
),
DeclareLaunchArgument("slam", default_value="False", description="Whether run a SLAM"),
DeclareLaunchArgument("map", description="Full path to map yaml file to load"),
DeclareLaunchArgument(
Expand Down

0 comments on commit 483bad9

Please sign in to comment.