Skip to content

Commit

Permalink
fix: xx1 launch
Browse files Browse the repository at this point in the history
Signed-off-by: badai-nguyen <[email protected]>
  • Loading branch information
badai-nguyen committed Dec 26, 2023
1 parent ca44474 commit 8e3ac8b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
10 changes: 5 additions & 5 deletions aip_xx1_launch/launch/lidar.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<arg name="vehicle_mirror_param_file"/>
<arg name="use_pointcloud_container" default="false" description="launch pointcloud container"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>
<arg name="launch_blockage_diag" default="true"/>
<arg name="enable_blockage_diag" default="true"/>

<group>
<push-ros-namespace namespace="lidar"/>
Expand All @@ -30,7 +30,7 @@
<arg name="horizontal_ring_id" value="64"/>
<arg name="is_channel_order_top2down" value="false"/>
<arg name="horizontal_resolution" value="0.4"/>
<arg name="launch_blockage_diag" value="$(var launch_blockage_diag)"/>
<arg name="enable_blockage_diag" value="$(var enable_blockage_diag)"/>
</include>
</group>

Expand All @@ -54,7 +54,7 @@
<arg name="horizontal_ring_id" value="0"/>
<arg name="is_channel_order_top2down" value="false"/>
<arg name="horizontal_resolution" value="0.4"/>
<arg name="launch_blockage_diag" value="$(var launch_blockage_diag)"/>
<arg name="enable_blockage_diag" value="$(var enable_blockage_diag)"/>
</include>
</group>

Expand All @@ -78,7 +78,7 @@
<arg name="horizontal_ring_id" value="0"/>
<arg name="is_channel_order_top2down" value="false"/>
<arg name="horizontal_resolution" value="0.4"/>
<arg name="launch_blockage_diag" value="$(var launch_blockage_diag)"/>
<arg name="enable_blockage_diag" value="$(var enable_blockage_diag)"/>
</include>
</group>

Expand All @@ -102,7 +102,7 @@
<arg name="horizontal_ring_id" value="0"/>
<arg name="is_channel_order_top2down" value="false"/>
<arg name="horizontal_resolution" value="0.4"/>
<arg name="launch_blockage_diag" value="$(var launch_blockage_diag)"/>
<arg name="enable_blockage_diag" value="$(var enable_blockage_diag)"/>
</include>
</group>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@
dust_kernel_size: 2
dust_buffering_frames: 10
dust_buffering_interval: 1
distance_coefficient: 327.67
horizontal_resolution: 0.4
11 changes: 6 additions & 5 deletions common_sensor_launch/launch/nebula_node_container.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@ def get_vehicle_info(context):
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:
return yaml.safe_load(f)["/**"]["ros__parameters"]

def create_parameter_dict(*args):
result = {}
for x in args:
Expand Down Expand Up @@ -273,10 +272,10 @@ def create_parameter_dict(*args):
blockage_diag_loader = LoadComposableNodes(
composable_node_descriptions=[blockage_diag_component],
target_container=target_container,
condition=IfCondition(LaunchConfiguration("launch_blockage_diag")),
condition=IfCondition(LaunchConfiguration("enable_blockage_diag")),
)

return [container, component_loader, driver_component_loader,blockage_diag_loader]
return [container, component_loader, driver_component_loader, blockage_diag_loader]


def generate_launch_description():
Expand Down Expand Up @@ -315,11 +314,13 @@ def add_launch_arg(name: str, default_value=None, description=None):
add_launch_arg("use_intra_process", "False", "use ROS 2 component container communication")
add_launch_arg("use_pointcloud_container", "false")
add_launch_arg("container_name", "nebula_node_container")


add_launch_arg("enable_blockage_diag", "true")
add_launch_arg("angle_range", "[0.0, 360]")
add_launch_arg("horizontal_ring_id", "64")
add_launch_arg("vertical_bins", "128")
add_launch_arg("is_channel_order_top2down", "true")
add_launch_arg("horizontal_resolution", "0.4")
add_launch_arg(
"blockage_diagnostics_param_file",
[FindPackageShare("common_sensor_launch"), "/config/blockage_diagnostics_param_file.yaml"],
Expand Down

0 comments on commit 8e3ac8b

Please sign in to comment.