Skip to content

Commit

Permalink
Revert "fix: remove x2 redundant param"
Browse files Browse the repository at this point in the history
This reverts commit fa93588.
  • Loading branch information
badai-nguyen committed Mar 18, 2024
1 parent 57612b6 commit 38eb072
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 8 additions & 0 deletions aip_x2_launch/launch/lidar.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<arg name="min_azimuth_deg" value="135.0"/>
<arg name="max_azimuth_deg" value="225.0"/>
<arg name="is_channel_order_top2down" value="true"/>
<arg name="max_distance_range" value="200.0"/>
<arg name="horizontal_resolution" value="0.4"/>
<arg name="enable_blockage_diag" value="$(var enable_blockage_diag)"/>
<arg name="calibration" value="$(find-pkg-share individual_params)/config/$(var vehicle_id)/aip_x2/pandar/front_lower.csv" />
Expand All @@ -50,6 +51,7 @@
<arg name="horizontal_ring_id" value="40" />
<arg name="return_mode" value="First" />
<arg name="is_channel_order_top2down" value="false"/>
<arg name="max_distance_range" value="7.5"/>
<arg name="horizontal_resolution" value="0.6"/>
<arg name="enable_blockage_diag" value="$(var enable_blockage_diag)"/>
<arg name="calibration" value="$(find-pkg-share individual_params)/config/$(var vehicle_id)/aip_x2/pandar/front_upper.csv" />
Expand All @@ -75,6 +77,7 @@
<arg name="min_azimuth_deg" value="225.0"/>
<arg name="max_azimuth_deg" value="315.0"/>
<arg name="is_channel_order_top2down" value="true"/>
<arg name="max_distance_range" value="200.0"/>
<arg name="horizontal_resolution" value="0.4"/>
<arg name="enable_blockage_diag" value="$(var enable_blockage_diag)"/>
<arg name="return_mode" value="Dual" />
Expand All @@ -99,6 +102,7 @@
<arg name="vertical_bins" value ="64" />
<arg name="horizontal_ring_id" value="54" />
<arg name="is_channel_order_top2down" value="false"/>
<arg name="max_distance_range" value="7.5"/>
<arg name="horizontal_resolution" value="0.6"/>
<arg name="enable_blockage_diag" value="$(var enable_blockage_diag)"/>
<arg name="return_mode" value="First" />
Expand All @@ -125,6 +129,7 @@
<arg name="min_azimuth_deg" value="45.0"/>
<arg name="max_azimuth_deg" value="135.0"/>
<arg name="is_channel_order_top2down" value="true"/>
<arg name="max_distance_range" value="200.0"/>
<arg name="horizontal_resolution" value="0.4"/>
<arg name="enable_blockage_diag" value="$(var enable_blockage_diag)"/>
<arg name="return_mode" value="Dual" />
Expand All @@ -149,6 +154,7 @@
<arg name="vertical_bins" value ="64" />
<arg name="horizontal_ring_id" value="54" />
<arg name="is_channel_order_top2down" value="false"/>
<arg name="max_distance_range" value="7.5"/>
<arg name="horizontal_resolution" value="0.6"/>
<arg name="enable_blockage_diag" value="$(var enable_blockage_diag)"/>
<arg name="return_mode" value="First" />
Expand All @@ -175,6 +181,7 @@
<arg name="min_azimuth_deg" value="135.0"/>
<arg name="max_azimuth_deg" value="225.0"/>
<arg name="is_channel_order_top2down" value="true"/>
<arg name="max_distance_range" value="200.0"/>
<arg name="horizontal_resolution" value="0.4"/>
<arg name="enable_blockage_diag" value="$(var enable_blockage_diag)"/>
<arg name="return_mode" value="Strongest" />
Expand All @@ -199,6 +206,7 @@
<arg name="vertical_bins" value ="64" />
<arg name="horizontal_ring_id" value="40" />
<arg name="is_channel_order_top2down" value="false"/>
<arg name="max_distance_range" value="7.5"/>
<arg name="horizontal_resolution" value="0.6"/>
<arg name="enable_blockage_diag" value="$(var enable_blockage_diag)"/>
<arg name="return_mode" value="First" />
Expand Down
8 changes: 2 additions & 6 deletions aip_x2_launch/launch/pandar_node_container.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ def get_pandar_monitor_info():
return p


def str2vector(string):
return [float(x) for x in string.strip("[]").split(",")]


def get_vehicle_info(context):
# TODO(TIER IV): Use Parameter Substitution after we drop Galactic support
# https://github.com/ros2/launch_ros/blob/master/launch_ros/launch_ros/substitutions/parameter.py
Expand Down Expand Up @@ -236,7 +232,6 @@ def create_parameter_dict(*args):
extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
)

distance_range = str2vector(context.perform_substitution(LaunchConfiguration("distance_range")))
blockage_diag_component = ComposableNode(
package="pointcloud_preprocessor",
plugin="pointcloud_preprocessor::BlockageDiagComponent",
Expand All @@ -251,7 +246,7 @@ def create_parameter_dict(*args):
"horizontal_ring_id": LaunchConfiguration("horizontal_ring_id"),
"vertical_bins": LaunchConfiguration("vertical_bins"),
"is_channel_order_top2down": LaunchConfiguration("is_channel_order_top2down"),
"max_distance_range": distance_range[1],
"max_distance_range": LaunchConfiguration("max_distance_range"),
"horizontal_resolution": LaunchConfiguration("horizontal_resolution"),
}
]
Expand Down Expand Up @@ -331,6 +326,7 @@ def add_launch_arg(name: str, default_value=None):
add_launch_arg("output_frame", LaunchConfiguration("base_frame"))
add_launch_arg("dual_return_filter_param_file")
add_launch_arg("horizontal_resolution", "0.4")
add_launch_arg("max_distance_range", "200.0")
add_launch_arg(
"blockage_diagnostics_param_file",
[FindPackageShare("aip_x2_launch"), "/config/blockage_diagnostics_param_file.yaml"],
Expand Down

0 comments on commit 38eb072

Please sign in to comment.