Skip to content

Commit

Permalink
ci(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Dec 20, 2024
1 parent 6c257a9 commit a2b9c00
Showing 1 changed file with 13 additions and 39 deletions.
52 changes: 13 additions & 39 deletions common_sensor_launch/launch/nebula_node_container.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,17 @@ def create_parameter_dict(*args):
)
assert os.path.exists(
sensor_calib_fp
), "Sensor calib file under calibration/ was not found: {}".format(
sensor_calib_fp
)
), "Sensor calib file under calibration/ was not found: {}".format(sensor_calib_fp)
else: # Robosense
sensor_calib_fp = ""

# Pointcloud preprocessor parameters
distortion_corrector_node_param = ParameterFile(
param_file=LaunchConfiguration("distortion_correction_node_param_path").perform(
context
),
param_file=LaunchConfiguration("distortion_correction_node_param_path").perform(context),
allow_substs=True,
)
ring_outlier_filter_node_param = ParameterFile(
param_file=LaunchConfiguration("ring_outlier_filter_node_param_path").perform(
context
),
param_file=LaunchConfiguration("ring_outlier_filter_node_param_path").perform(context),
allow_substs=True,
)

Expand Down Expand Up @@ -151,9 +145,7 @@ def create_parameter_dict(*args):
# ("robosense_points", "pointcloud_raw_ex"), #for robosense
# ("pandar_points", "pointcloud_raw_ex"), # for hesai
],
extra_arguments=[
{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}
],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)
)

Expand All @@ -178,9 +170,7 @@ def create_parameter_dict(*args):
("output", "self_cropped/pointcloud_ex"),
],
parameters=[cropbox_parameters],
extra_arguments=[
{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}
],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)
)

Expand All @@ -202,9 +192,7 @@ def create_parameter_dict(*args):
("output", "mirror_cropped/pointcloud_ex"),
],
parameters=[cropbox_parameters],
extra_arguments=[
{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}
],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)
)

Expand All @@ -223,19 +211,15 @@ def create_parameter_dict(*args):
("~/output/pointcloud", "rectified/pointcloud_ex"),
],
parameters=[distortion_corrector_node_param],
extra_arguments=[
{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}
],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)
)

# Ring Outlier Filter is the last component in the pipeline, so control the output frame here
if LaunchConfiguration("output_as_sensor_frame").perform(context).lower() == "true":
ring_outlier_output_frame = {"output_frame": LaunchConfiguration("frame_id")}
else:
ring_outlier_output_frame = {
"output_frame": ""
} # keep the output frame as the input frame
ring_outlier_output_frame = {"output_frame": ""} # keep the output frame as the input frame
nodes.append(
ComposableNode(
package="autoware_pointcloud_preprocessor",
Expand All @@ -246,9 +230,7 @@ def create_parameter_dict(*args):
("output", "pointcloud_before_sync"),
],
parameters=[ring_outlier_filter_node_param, ring_outlier_output_frame],
extra_arguments=[
{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}
],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)
)

Expand All @@ -271,9 +253,7 @@ def generate_launch_description():
def add_launch_arg(name: str, default_value=None, description=None):
# a default_value of None is equivalent to not passing that kwarg at all
launch_arguments.append(
DeclareLaunchArgument(
name, default_value=default_value, description=description
)
DeclareLaunchArgument(name, default_value=default_value, description=description)
)

common_sensor_share_dir = get_package_share_directory("common_sensor_launch")
Expand All @@ -294,20 +274,14 @@ def add_launch_arg(name: str, default_value=None, description=None):
add_launch_arg("gnss_port", "2380", "device gnss port number")
add_launch_arg("packet_mtu_size", "1500", "packet mtu size")
add_launch_arg("rotation_speed", "600", "rotational frequency")
add_launch_arg(
"dual_return_distance_threshold", "0.1", "dual return distance threshold"
)
add_launch_arg("dual_return_distance_threshold", "0.1", "dual return distance threshold")
add_launch_arg("frame_id", "lidar", "frame id")
add_launch_arg("input_frame", LaunchConfiguration("base_frame"), "use for cropbox")
add_launch_arg("output_frame", LaunchConfiguration("base_frame"), "use for cropbox")
add_launch_arg("use_multithread", "False", "use multithread")
add_launch_arg(
"use_intra_process", "False", "use ROS 2 component container communication"
)
add_launch_arg("use_intra_process", "False", "use ROS 2 component container communication")
add_launch_arg("lidar_container_name", "nebula_node_container")
add_launch_arg(
"output_as_sensor_frame", "True", "output final pointcloud in sensor frame"
)
add_launch_arg("output_as_sensor_frame", "True", "output final pointcloud in sensor frame")
add_launch_arg(
"vehicle_mirror_param_file",
description="path to the file of vehicle mirror position yaml",
Expand Down

0 comments on commit a2b9c00

Please sign in to comment.