From 0f3e5d14b3feece8e8319244cbc3042aa5fa2daa Mon Sep 17 00:00:00 2001 From: Reza Kermani Date: Wed, 16 Oct 2024 13:29:29 -0400 Subject: [PATCH 1/3] update realsense examples --- .../launch/realsense_d435i_color.launch.py | 12 ++++++------ .../launch/realsense_d435i_infra.launch.py | 10 +++++----- .../launch/realsense_d435i_stereo.launch.py | 12 ++++++------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/rtabmap_examples/launch/realsense_d435i_color.launch.py b/rtabmap_examples/launch/realsense_d435i_color.launch.py index 298b800f4..3638a35c1 100644 --- a/rtabmap_examples/launch/realsense_d435i_color.launch.py +++ b/rtabmap_examples/launch/realsense_d435i_color.launch.py @@ -2,7 +2,7 @@ # 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 realsense2_camera rs_launch.py enable_gyro:=true enable_accel:=true unite_imu_method:=1 enable_sync:=true align_depth.enable:=true # # $ ros2 launch rtabmap_examples realsense_d435i_color.launch.py @@ -25,9 +25,9 @@ def generate_launch_description(): remappings=[ ('imu', '/imu/data'), - ('rgb/image', '/camera/color/image_raw'), - ('rgb/camera_info', '/camera/color/camera_info'), - ('depth/image', '/camera/aligned_depth_to_color/image_raw')] + ('rgb/image', '/camera/camera/color/image_raw'), + ('rgb/camera_info', '/camera/camera/color/camera_info'), + ('depth/image', '/camera/camera/aligned_depth_to_color/image_raw')] return LaunchDescription([ @@ -41,7 +41,7 @@ def generate_launch_description(): '/rs_launch.py']), launch_arguments={'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(), @@ -69,7 +69,7 @@ def generate_launch_description(): parameters=[{'use_mag': False, 'world_frame':'enu', 'publish_tf':False}], - remappings=[('imu/data_raw', '/camera/imu')]), + remappings=[('imu/data_raw', '/camera/camera/imu')]), # The IMU frame is missing in TF tree, add it: Node( diff --git a/rtabmap_examples/launch/realsense_d435i_infra.launch.py b/rtabmap_examples/launch/realsense_d435i_infra.launch.py index 140e995b5..bd22b2fcc 100644 --- a/rtabmap_examples/launch/realsense_d435i_infra.launch.py +++ b/rtabmap_examples/launch/realsense_d435i_infra.launch.py @@ -23,9 +23,9 @@ def generate_launch_description(): remappings=[ ('imu', '/imu/data'), - ('rgb/image', '/camera/infra1/image_rect_raw'), - ('rgb/camera_info', '/camera/infra1/camera_info'), - ('depth/image', '/camera/depth/image_rect_raw')] + ('rgb/image', '/camera/camera/infra1/image_rect_raw'), + ('rgb/camera_info', '/camera/camera/infra1/camera_info'), + ('depth/image', '/camera/camera/depth/image_rect_raw')] return LaunchDescription([ @@ -39,7 +39,7 @@ def generate_launch_description(): '/rs_launch.py']), launch_arguments={'enable_gyro': 'true', 'enable_accel': 'true', - 'unite_imu_method': '1', + 'unite_imu_method': '2', 'enable_infra1': 'true', 'enable_infra2': 'true', 'enable_sync': 'true'}.items(), @@ -67,7 +67,7 @@ def generate_launch_description(): parameters=[{'use_mag': False, 'world_frame':'enu', 'publish_tf':False}], - remappings=[('imu/data_raw', '/camera/imu')]), + remappings=[('imu/data_raw', '/camera/camera/imu')]), # The IMU frame is missing in TF tree, add it: Node( diff --git a/rtabmap_examples/launch/realsense_d435i_stereo.launch.py b/rtabmap_examples/launch/realsense_d435i_stereo.launch.py index ce8795547..d10e10b9d 100644 --- a/rtabmap_examples/launch/realsense_d435i_stereo.launch.py +++ b/rtabmap_examples/launch/realsense_d435i_stereo.launch.py @@ -22,10 +22,10 @@ def generate_launch_description(): remappings=[ ('imu', '/imu/data'), - ('left/image_rect', '/camera/infra1/image_rect_raw'), - ('left/camera_info', '/camera/infra1/camera_info'), - ('right/image_rect', '/camera/infra2/image_rect_raw'), - ('right/camera_info', '/camera/infra2/camera_info')] + ('left/image_rect', '/camera/camera/infra1/image_rect_raw'), + ('left/camera_info', '/camera/camera/infra1/camera_info'), + ('right/image_rect', '/camera/camera/infra2/image_rect_raw'), + ('right/camera_info', '/camera/camera/infra2/camera_info')] return LaunchDescription([ @@ -39,7 +39,7 @@ def generate_launch_description(): '/rs_launch.py']), launch_arguments={'enable_gyro': 'true', 'enable_accel': 'true', - 'unite_imu_method': '1', + 'unite_imu_method': '2', 'enable_infra1': 'true', 'enable_infra2': 'true', 'enable_sync': 'true'}.items(), @@ -67,7 +67,7 @@ def generate_launch_description(): parameters=[{'use_mag': False, 'world_frame':'enu', 'publish_tf':False}], - remappings=[('imu/data_raw', '/camera/imu')]), + remappings=[('imu/data_raw', '/camera/camera/imu')]), # The IMU frame is missing in TF tree, add it: Node( From 19d231012888b1333801501d147ad95ec8e58e39 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Wed, 16 Oct 2024 21:02:10 -0700 Subject: [PATCH 2/3] Modifiying realsense2 namespace instead. --- .../launch/realsense_d435i_color.launch.py | 13 ++++++------- .../launch/realsense_d435i_infra.launch.py | 11 ++++++----- .../launch/realsense_d435i_stereo.launch.py | 13 +++++++------ 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/rtabmap_examples/launch/realsense_d435i_color.launch.py b/rtabmap_examples/launch/realsense_d435i_color.launch.py index 3638a35c1..8aa86aaa7 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 align_depth.enable:=true -# # $ ros2 launch rtabmap_examples realsense_d435i_color.launch.py import os @@ -25,9 +23,9 @@ def generate_launch_description(): remappings=[ ('imu', '/imu/data'), - ('rgb/image', '/camera/camera/color/image_raw'), - ('rgb/camera_info', '/camera/camera/color/camera_info'), - ('depth/image', '/camera/camera/aligned_depth_to_color/image_raw')] + ('rgb/image', '/camera/color/image_raw'), + ('rgb/camera_info', '/camera/color/camera_info'), + ('depth/image', '/camera/aligned_depth_to_color/image_raw')] return LaunchDescription([ @@ -39,7 +37,8 @@ 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': '2', 'align_depth.enable': 'true', @@ -69,7 +68,7 @@ def generate_launch_description(): parameters=[{'use_mag': False, 'world_frame':'enu', 'publish_tf':False}], - remappings=[('imu/data_raw', '/camera/camera/imu')]), + remappings=[('imu/data_raw', '/camera/imu')]), # The IMU frame is missing in TF tree, add it: Node( diff --git a/rtabmap_examples/launch/realsense_d435i_infra.launch.py b/rtabmap_examples/launch/realsense_d435i_infra.launch.py index bd22b2fcc..e440c13d9 100644 --- a/rtabmap_examples/launch/realsense_d435i_infra.launch.py +++ b/rtabmap_examples/launch/realsense_d435i_infra.launch.py @@ -23,9 +23,9 @@ def generate_launch_description(): remappings=[ ('imu', '/imu/data'), - ('rgb/image', '/camera/camera/infra1/image_rect_raw'), - ('rgb/camera_info', '/camera/camera/infra1/camera_info'), - ('depth/image', '/camera/camera/depth/image_rect_raw')] + ('rgb/image', '/camera/infra1/image_rect_raw'), + ('rgb/camera_info', '/camera/infra1/camera_info'), + ('depth/image', '/camera/depth/image_rect_raw')] return LaunchDescription([ @@ -37,7 +37,8 @@ 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': '2', 'enable_infra1': 'true', @@ -67,7 +68,7 @@ def generate_launch_description(): parameters=[{'use_mag': False, 'world_frame':'enu', 'publish_tf':False}], - remappings=[('imu/data_raw', '/camera/camera/imu')]), + remappings=[('imu/data_raw', '/camera/imu')]), # The IMU frame is missing in TF tree, add it: Node( diff --git a/rtabmap_examples/launch/realsense_d435i_stereo.launch.py b/rtabmap_examples/launch/realsense_d435i_stereo.launch.py index d10e10b9d..775e26a6f 100644 --- a/rtabmap_examples/launch/realsense_d435i_stereo.launch.py +++ b/rtabmap_examples/launch/realsense_d435i_stereo.launch.py @@ -22,10 +22,10 @@ def generate_launch_description(): remappings=[ ('imu', '/imu/data'), - ('left/image_rect', '/camera/camera/infra1/image_rect_raw'), - ('left/camera_info', '/camera/camera/infra1/camera_info'), - ('right/image_rect', '/camera/camera/infra2/image_rect_raw'), - ('right/camera_info', '/camera/camera/infra2/camera_info')] + ('left/image_rect', '/camera/infra1/image_rect_raw'), + ('left/camera_info', '/camera/infra1/camera_info'), + ('right/image_rect', '/camera/infra2/image_rect_raw'), + ('right/camera_info', '/camera/infra2/camera_info')] return LaunchDescription([ @@ -37,7 +37,8 @@ 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': '2', 'enable_infra1': 'true', @@ -67,7 +68,7 @@ def generate_launch_description(): parameters=[{'use_mag': False, 'world_frame':'enu', 'publish_tf':False}], - remappings=[('imu/data_raw', '/camera/camera/imu')]), + remappings=[('imu/data_raw', '/camera/imu')]), # The IMU frame is missing in TF tree, add it: Node( From 1ca3e815c7a7c5355750a4f4f14e50254c12fbfe Mon Sep 17 00:00:00 2001 From: matlabbe Date: Wed, 16 Oct 2024 21:03:57 -0700 Subject: [PATCH 3/3] single quote str --- rtabmap_examples/launch/realsense_d435i_color.launch.py | 2 +- rtabmap_examples/launch/realsense_d435i_infra.launch.py | 2 +- rtabmap_examples/launch/realsense_d435i_stereo.launch.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rtabmap_examples/launch/realsense_d435i_color.launch.py b/rtabmap_examples/launch/realsense_d435i_color.launch.py index 8aa86aaa7..276673ea1 100644 --- a/rtabmap_examples/launch/realsense_d435i_color.launch.py +++ b/rtabmap_examples/launch/realsense_d435i_color.launch.py @@ -37,7 +37,7 @@ def generate_launch_description(): PythonLaunchDescriptionSource([os.path.join( get_package_share_directory('realsense2_camera'), 'launch'), '/rs_launch.py']), - launch_arguments={'camera_namespace': "", + launch_arguments={'camera_namespace': '', 'enable_gyro': 'true', 'enable_accel': 'true', 'unite_imu_method': '2', diff --git a/rtabmap_examples/launch/realsense_d435i_infra.launch.py b/rtabmap_examples/launch/realsense_d435i_infra.launch.py index e440c13d9..91013e212 100644 --- a/rtabmap_examples/launch/realsense_d435i_infra.launch.py +++ b/rtabmap_examples/launch/realsense_d435i_infra.launch.py @@ -37,7 +37,7 @@ def generate_launch_description(): PythonLaunchDescriptionSource([os.path.join( get_package_share_directory('realsense2_camera'), 'launch'), '/rs_launch.py']), - launch_arguments={'camera_namespace': "", + launch_arguments={'camera_namespace': '', 'enable_gyro': 'true', 'enable_accel': 'true', 'unite_imu_method': '2', diff --git a/rtabmap_examples/launch/realsense_d435i_stereo.launch.py b/rtabmap_examples/launch/realsense_d435i_stereo.launch.py index 775e26a6f..944f96373 100644 --- a/rtabmap_examples/launch/realsense_d435i_stereo.launch.py +++ b/rtabmap_examples/launch/realsense_d435i_stereo.launch.py @@ -37,7 +37,7 @@ def generate_launch_description(): PythonLaunchDescriptionSource([os.path.join( get_package_share_directory('realsense2_camera'), 'launch'), '/rs_launch.py']), - launch_arguments={'camera_namespace': "", + launch_arguments={'camera_namespace': '', 'enable_gyro': 'true', 'enable_accel': 'true', 'unite_imu_method': '2',