From c83cff14c9479f5cffe2553b2dc0bdf7cc067018 Mon Sep 17 00:00:00 2001 From: Reza Kermani Date: Thu, 17 Oct 2024 00:04:25 -0400 Subject: [PATCH] update realsense examples for ros2 (#1224) * update realsense examples * Modifiying realsense2 namespace instead. * single quote str --------- Co-authored-by: matlabbe --- rtabmap_examples/launch/realsense_d435i_color.launch.py | 7 +++---- rtabmap_examples/launch/realsense_d435i_infra.launch.py | 5 +++-- rtabmap_examples/launch/realsense_d435i_stereo.launch.py | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/rtabmap_examples/launch/realsense_d435i_color.launch.py b/rtabmap_examples/launch/realsense_d435i_color.launch.py index 298b800f4..276673ea1 100644 --- a/rtabmap_examples/launch/realsense_d435i_color.launch.py +++ b/rtabmap_examples/launch/realsense_d435i_color.launch.py @@ -2,8 +2,6 @@ # A realsense D435i # Install realsense2 ros2 package (ros-$ROS_DISTRO-realsense2-camera) # Example: -# $ ros2 launch realsense2_camera rs_launch.py enable_gyro:=true enable_accel:=true unite_imu_method:=1 enable_sync:=true -# # $ ros2 launch rtabmap_examples realsense_d435i_color.launch.py import os @@ -39,9 +37,10 @@ def generate_launch_description(): PythonLaunchDescriptionSource([os.path.join( get_package_share_directory('realsense2_camera'), 'launch'), '/rs_launch.py']), - launch_arguments={'enable_gyro': 'true', + launch_arguments={'camera_namespace': '', + 'enable_gyro': 'true', 'enable_accel': 'true', - 'unite_imu_method': '1', + 'unite_imu_method': '2', 'align_depth.enable': 'true', 'enable_sync': 'true', 'rgb_camera.profile': '640x360x30'}.items(), diff --git a/rtabmap_examples/launch/realsense_d435i_infra.launch.py b/rtabmap_examples/launch/realsense_d435i_infra.launch.py index 140e995b5..91013e212 100644 --- a/rtabmap_examples/launch/realsense_d435i_infra.launch.py +++ b/rtabmap_examples/launch/realsense_d435i_infra.launch.py @@ -37,9 +37,10 @@ def generate_launch_description(): PythonLaunchDescriptionSource([os.path.join( get_package_share_directory('realsense2_camera'), 'launch'), '/rs_launch.py']), - launch_arguments={'enable_gyro': 'true', + launch_arguments={'camera_namespace': '', + 'enable_gyro': 'true', 'enable_accel': 'true', - 'unite_imu_method': '1', + 'unite_imu_method': '2', 'enable_infra1': 'true', 'enable_infra2': 'true', 'enable_sync': 'true'}.items(), diff --git a/rtabmap_examples/launch/realsense_d435i_stereo.launch.py b/rtabmap_examples/launch/realsense_d435i_stereo.launch.py index ce8795547..944f96373 100644 --- a/rtabmap_examples/launch/realsense_d435i_stereo.launch.py +++ b/rtabmap_examples/launch/realsense_d435i_stereo.launch.py @@ -37,9 +37,10 @@ def generate_launch_description(): PythonLaunchDescriptionSource([os.path.join( get_package_share_directory('realsense2_camera'), 'launch'), '/rs_launch.py']), - launch_arguments={'enable_gyro': 'true', + launch_arguments={'camera_namespace': '', + 'enable_gyro': 'true', 'enable_accel': 'true', - 'unite_imu_method': '1', + 'unite_imu_method': '2', 'enable_infra1': 'true', 'enable_infra2': 'true', 'enable_sync': 'true'}.items(),