Skip to content

Commit

Permalink
Added mapping launch file
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-gt committed May 6, 2024
1 parent 9bfe4f2 commit f8755e2
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/rove_zed/config/zed_mapping.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Parameters to override zed_wrapper parameters
/**:
ros__parameters:
mapping:
mapping_enabled: true # True to enable mapping and fused point cloud pubblication
resolution: 0.05 # maps resolution in meters [min: 0.01f - max: 0.2f]
max_mapping_range: 5.0 # maximum depth range while mapping in meters (-1 for automatic calculation) [2.0, 20.0]
fused_pointcloud_freq: 1.0 # frequency of the publishing of the fused colored point cloud
clicked_point_topic: "/clicked_point" # Topic published by Rviz when a point of the cloud is clicked. Used for plane detection
pd_max_distance_threshold: 0.15 # Plane detection: controls the spread of plane by checking the position difference.
pd_normal_similarity_threshold: 15.0 # Plane detection: controls the spread of plane by checking the angle difference
29 changes: 29 additions & 0 deletions src/rove_zed/launch/zed_mapping.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from pathlib import Path
import yaml
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch_ros.actions import Node
from ament_index_python.packages import get_package_share_directory
import os

def generate_launch_description():

camera_model = 'zed2i'

pkg_zed_wrapper = get_package_share_directory('zed_wrapper')
launch_file_path = os.path.join(pkg_zed_wrapper, 'launch', 'zed_camera.launch.py')

# Parse yml config file to iterable array
pkg_rove_zed = get_package_share_directory('rove_zed')
config_override_path = os.path.join(pkg_rove_zed, 'config', 'zed_mapping.yaml')

return LaunchDescription([
IncludeLaunchDescription(
launch_description_source=launch_file_path,
launch_arguments=[ # `ros2 launch rove_zed zed_body_trck.launch.py --show-arguments`
['camera_model', camera_model],
['camera_name', camera_model],
['ros_params_override_path', config_override_path]
]
)
])

0 comments on commit f8755e2

Please sign in to comment.