Skip to content

Commit

Permalink
chore: fix pre-commit errors
Browse files Browse the repository at this point in the history
Signed-off-by: Tomohito Ando <[email protected]>
  • Loading branch information
TomohitoAndo committed Jan 10, 2025
1 parent 6295f20 commit 1320292
Showing 1 changed file with 0 additions and 58 deletions.
58 changes: 0 additions & 58 deletions aip_x2_gen2_launch/launch/nebula_node_container.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@ def get_vehicle_info(context):
p["max_height_offset"] = gp["vehicle_height"]
return p


def get_vehicle_mirror_info(context):
path = LaunchConfiguration("vehicle_mirror_param_file").perform(context)
with open(path, "r") as f:
p = yaml.safe_load(f)["/**"]["ros__parameters"]
return p


def launch_setup(context, *args, **kwargs):
def load_composable_node_param(param_path):
with open(LaunchConfiguration(param_path).perform(context), "r") as f:
Expand Down Expand Up @@ -154,51 +146,6 @@ def str2vector(string):
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)

mirror_info = load_composable_node_param("vehicle_mirror_param_file")
right = mirror_info["right"]
cropbox_parameters.update(
min_x=right["min_longitudinal_offset"],
max_x=right["max_longitudinal_offset"],
min_y=right["min_lateral_offset"],
max_y=right["max_lateral_offset"],
min_z=right["min_height_offset"],
max_z=right["max_height_offset"],
)

right_mirror_crop_component = ComposableNode(
package="pointcloud_preprocessor",
plugin="pointcloud_preprocessor::CropBoxFilterComponent",
name="crop_box_filter_mirror_right",
remappings=[
("input", "self_cropped/pointcloud_ex"),
("output", "right_mirror_cropped/pointcloud_ex"),
],
parameters=[cropbox_parameters],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)

left = mirror_info["left"]
cropbox_parameters.update(
min_x=left["min_longitudinal_offset"],
max_x=left["max_longitudinal_offset"],
min_y=left["min_lateral_offset"],
max_y=left["max_lateral_offset"],
min_z=left["min_height_offset"],
max_z=left["max_height_offset"],
)

left_mirror_crop_component = ComposableNode(
package="pointcloud_preprocessor",
plugin="pointcloud_preprocessor::CropBoxFilterComponent",
name="crop_box_filter_mirror_left",
remappings=[
("input", "right_mirror_cropped/pointcloud_ex"),
("output", "mirror_cropped/pointcloud_ex"),
],
parameters=[cropbox_parameters],
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)

undistort_component = ComposableNode(
package="pointcloud_preprocessor",
plugin="pointcloud_preprocessor::DistortionCorrectorComponent",
Expand Down Expand Up @@ -275,8 +222,6 @@ def str2vector(string):
glog_component,
nebula_component,
self_crop_component,
# right_mirror_crop_component,
# left_mirror_crop_component,
undistort_component,
],
)
Expand Down Expand Up @@ -343,9 +288,6 @@ def add_launch_arg(name: str, default_value=None, description=None):
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(
"vehicle_mirror_param_file", description="path to the file of vehicle mirror position yaml"
)
add_launch_arg("diag_span", "1000")
add_launch_arg("use_multithread", "False", "use multithread")
add_launch_arg("use_intra_process", "False", "use ROS 2 component container communication")
Expand Down

0 comments on commit 1320292

Please sign in to comment.