this shit ON FIRE

This commit is contained in:
2025-08-24 15:24:28 +02:00
parent 77fc1bb186
commit 902de6a12b
6 changed files with 998 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
from launch import LaunchDescription
from launch_ros.actions import Node
import math
################### user configure parameters for ros2 start ###################
# Topics/Frames
frame_id = 'velodyne'
topic_preprocessing_in = 'velodyne_points'
topic_preprocessing_out = 'filtered_points'
# Preprocessing
x_min = 0.0
x_max = 20.0
z_min = -0.5
z_max = 1.5
tan_h_fov = math.pi / 4 # ±45°
tan_v_fov = math.pi / 6 # ±30°
# Clustering
z_dim_scale = 0.2
cluster_tolerance = 0.2
min_cluster_size = 10
max_cluster_size = 1000
################### user configure parameters for ros2 end #####################
cloud_preprocessing_params = [
{"topic_in": topic_preprocessing_in},
{"topic_out": topic_preprocessing_out},
{"x_min": x_min},
{"x_max": x_max},
{"z_min": z_min},
{"z_max": z_max},
{"tan_h_fov": tan_h_fov},
{"tan_v_fov": tan_v_fov}
]
cloud_clustering_params = [
{"topic_in": topic_preprocessing_out},
{"frame_id": frame_id},
{"z_dim_scale": z_dim_scale},
{"cluster_tolerance": cluster_tolerance},
{"min_cluster_size": min_cluster_size},
{"max_cluster_size": max_cluster_size}
]
def generate_launch_description():
return LaunchDescription([
Node(
package='target_tracking',
executable='cloud_preprocessing_node',
name='cloud_preprocessing',
parameters=cloud_preprocessing_params,
output={
'stdout': 'screen',
'stderr': 'screen',
}
),
Node(
package='target_tracking',
executable='cloud_clustering_node',
name='cloud_clustering',
parameters=cloud_clustering_params,
output={
'stdout': 'screen',
'stderr': 'screen',
}
)
])