mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
* Updating examples and README * updated main readme * odom: Added always_check_imu_tf parameter. sync: increased default sync_queue_size from 2 to 5 (to be more flexible to different hardware), added input and output diagnostics. rtabmap_viz: fixed node with same name redeclared warning. * update readme * Added husky demo * converted demo_robot_mapping.launch to ros2 * Converted stereo_outdoor demo from ros1 to ros2 * Converted multi-session demo to ros2 * Converted demo_find_object launch to ros2 * renamed files * uniformized default qos, increased sync_queue_size default to 10 * Added vlp16 + imu example * Added husky 3D lidar demos * moved demos in subdir * Added vlp16+zed example * rtabmap_viz: ignore odom update if tf not ready when not using topic (to avoid showing red screen). Added champ VSLAM demo. * forwarded camera_model arg for zed examples, removed qos for turtlebot4 demo * pointcloud_to_depthimage: added more error logs, removed output camera_info published twice and match ros1 namespaces * Created two base general examples for 3D lidar usage, then create hardware specific examples on top of them. * Added isaac sim demo * Final update of all demos. Fixed MapCloud rviz plugin crashing when floor/ceiling filtering is used and resulting cloud is empty. * Fixed 2d scan deskewing output frame, moved nav2 params under "params" folder, added number of topics processed/dropped for odometry, added icp_odometry option for turtlebot3 scan-only demo. * rtabmap_demos: added README with examples * Added TOC * bump version to 0.21.9
80 lines
3.0 KiB
Python
80 lines
3.0 KiB
Python
# Requirements:
|
|
# A realsense D435i
|
|
# Install realsense2 ros2 package (ros-$ROS_DISTRO-realsense2-camera)
|
|
# Example:
|
|
# $ ros2 launch rtabmap_examples realsense_d435i_infra.launch.py
|
|
|
|
import os
|
|
|
|
from ament_index_python.packages import get_package_share_directory
|
|
|
|
from launch import LaunchDescription
|
|
from launch_ros.actions import Node, SetParameter
|
|
from launch.actions import IncludeLaunchDescription
|
|
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
|
|
from launch.launch_description_sources import PythonLaunchDescriptionSource
|
|
from launch.substitutions import LaunchConfiguration
|
|
|
|
def generate_launch_description():
|
|
parameters=[{
|
|
'frame_id':'camera_link',
|
|
'subscribe_depth':True,
|
|
'subscribe_odom_info':True,
|
|
'approx_sync':False,
|
|
'wait_imu_to_init':True}]
|
|
|
|
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')]
|
|
|
|
return LaunchDescription([
|
|
|
|
# Launch arguments
|
|
DeclareLaunchArgument(
|
|
'unite_imu_method', default_value='2',
|
|
description='0-None, 1-copy, 2-linear_interpolation. Use unite_imu_method:="1" if imu topics stop being published.'),
|
|
|
|
#Hack to disable IR emitter
|
|
SetParameter(name='depth_module.emitter_enabled', value=0),
|
|
|
|
# Launch camera driver
|
|
IncludeLaunchDescription(
|
|
PythonLaunchDescriptionSource([os.path.join(
|
|
get_package_share_directory('realsense2_camera'), 'launch'),
|
|
'/rs_launch.py']),
|
|
launch_arguments={'camera_namespace': '',
|
|
'enable_gyro': 'true',
|
|
'enable_accel': 'true',
|
|
'unite_imu_method': LaunchConfiguration('unite_imu_method'),
|
|
'enable_infra1': 'true',
|
|
'enable_infra2': 'true',
|
|
'enable_sync': 'true'}.items(),
|
|
),
|
|
|
|
Node(
|
|
package='rtabmap_odom', executable='rgbd_odometry', output='screen',
|
|
parameters=parameters,
|
|
remappings=remappings),
|
|
|
|
Node(
|
|
package='rtabmap_slam', executable='rtabmap', output='screen',
|
|
parameters=parameters,
|
|
remappings=remappings,
|
|
arguments=['-d']),
|
|
|
|
Node(
|
|
package='rtabmap_viz', executable='rtabmap_viz', output='screen',
|
|
parameters=parameters,
|
|
remappings=remappings),
|
|
|
|
# Compute quaternion of the IMU
|
|
Node(
|
|
package='imu_filter_madgwick', executable='imu_filter_madgwick_node', output='screen',
|
|
parameters=[{'use_mag': False,
|
|
'world_frame':'enu',
|
|
'publish_tf':False}],
|
|
remappings=[('imu/data_raw', '/camera/imu')]),
|
|
])
|