mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-11 20:19:50 +08:00
rtabmap_demos tests and docs (#1462)
* rtabmap_demos tests and docs * added bag testing * added rtabmap_examples launch tests * updating demo bag download paths * added netherdrone demo * Fixed rgb-only callback with lidar rejected. Updated lidar params * Added back OrbitOriented rviz view to ros2, with optional octomap wll clipping * fixing ci * lidar demo added intermediate_nodes option * added netherdrone as demo test * running rtabmap_demos tests on ci * added rtabmap_launch tests, fixed ground_truth_base_frame_id usage * ficing rolling * updating demo test harnest * densify golden trajectories to avoid tf missing * fixing tf steps * updated min icp ratio for netherdrone demo * fixing image_transport arg->params * export pose opt=0 * lets process all frames * updated netherdrone golden * fixing publishers queue size just for tests * added playdback demo doc * Adding more logs to debug ci * Fixing QOS for CI to reliable, added find-object demo test * name threads * fixing camera info expected transient on lyrical/rolling. Fixing find_object not appearing idle * 30 Hz polling backward comp * fixing test tf sim lock * fixing lyrical qos bag parsing * faster replay * lockstep * fixing clock deadlock * Added test on shutdown * updated netherdrone golden poses * Extended stereo outdoor test * updated shutdown test * updated test * multi-thread flaky test * adding backtrace when test fails * increased closure slack for netherdrone * g2o gauss newton on stereo * adjusted maximum optimizer iterations * updated default iterations * Added netherdrone in list of demos
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Requirements:
|
||||
# find_object_2d package installed
|
||||
# Download rosbag:
|
||||
# * demo_find_object.db3: https://drive.google.com/file/d/1web54yQkxeGFr2UwOjKeoajGGDm0fZXT/view?usp=drive_link
|
||||
# * demo_find_object_bag.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/demo_find_object_bag.zip
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
@@ -9,7 +9,7 @@
|
||||
# $ ros2 launch rtabmap_demos find_object_demo.launch.py
|
||||
#
|
||||
# Rosbag:
|
||||
# $ ros2 bag play demo_find_object.db3 --clock
|
||||
# $ ros2 bag play demo_find_object_bag --clock
|
||||
#
|
||||
|
||||
from launch import LaunchDescription
|
||||
@@ -38,6 +38,15 @@ def generate_launch_description():
|
||||
'RGBD/NeighborLinkRefining': 'true', # Do odometry correction with consecutive laser scans
|
||||
'Reg/Strategy': '1', # 0=Visual, 1=ICP, 2=Visual+ICP
|
||||
'Reg/Force3DoF': 'true', # 2D SLAM
|
||||
# The objects find_object_2d detects become landmarks (see find_object_to_landmarks.py,
|
||||
# which sets their covariance from these, as rtabmap does for its own markers).
|
||||
# Range and bearing only (GTSAM): the objects' orientation is the least reliable
|
||||
# part of find_object_2d's estimate. Linear: the range variance (m^2), angular:
|
||||
# the bearing variance (rad^2).
|
||||
'Marker/VarianceLinear': '0.001',
|
||||
'Marker/VarianceAngular': '0.01',
|
||||
'Marker/VarianceOrientationIgnored': 'true',
|
||||
'Optimizer/Strategy': '2', # GTSAM
|
||||
}
|
||||
|
||||
remappings=[
|
||||
@@ -63,6 +72,7 @@ def generate_launch_description():
|
||||
# Launch arguments
|
||||
DeclareLaunchArgument('rtabmap_viz', default_value='false', description='Launch RTAB-Map UI (optional).'),
|
||||
DeclareLaunchArgument('rviz', default_value='true', description='Launch RVIZ (optional).'),
|
||||
DeclareLaunchArgument('find_object_gui', default_value='true', description='Show the Find-Object window (false: headless).'),
|
||||
DeclareLaunchArgument('localization', default_value='false', description='Launch in localization mode.'),
|
||||
DeclareLaunchArgument('rviz_cfg', default_value=config_rviz, description='Configuration path of rviz2.'),
|
||||
|
||||
@@ -73,12 +83,16 @@ def generate_launch_description():
|
||||
# Uncompress images for find_object
|
||||
Node(
|
||||
package='image_transport', executable='republish', name='republish_rgb', output='screen',
|
||||
# The transports: as arguments up to humble, as parameters from jazzy.
|
||||
arguments=['compressed', 'raw'],
|
||||
parameters=[{'in_transport': 'compressed', 'out_transport': 'raw'}],
|
||||
remappings=[('in/compressed', '/camera/data_throttled_image/compressed'),
|
||||
('out', '/camera/data_throttled_image')]),
|
||||
Node(
|
||||
package='image_transport', executable='republish', name='republish_depth', output='screen',
|
||||
# The transports: as arguments up to humble, as parameters from jazzy.
|
||||
arguments=['compressedDepth', 'raw'],
|
||||
parameters=[{'in_transport': 'compressedDepth', 'out_transport': 'raw'}],
|
||||
remappings=[('in/compressedDepth', '/camera/data_throttled_image_depth/compressedDepth'),
|
||||
('out', '/camera/data_throttled_image_depth')]),
|
||||
|
||||
@@ -119,11 +133,15 @@ def generate_launch_description():
|
||||
# Find-Object
|
||||
Node(
|
||||
package='find_object_2d', executable='find_object_2d', output='screen',
|
||||
parameters=[{'gui': True,
|
||||
parameters=[{'gui': LaunchConfiguration('find_object_gui'),
|
||||
'subscribe_depth': True,
|
||||
'settings_path': config_find_object,
|
||||
'objects_path': data_find_object}],
|
||||
remappings=[('rgb/image_rect_color', '/camera/data_throttled_image'),
|
||||
('depth_registered/image_raw', '/camera/data_throttled_image_depth'),
|
||||
('depth_registered/camera_info', '/camera/data_throttled_camera_info')]),
|
||||
# Its detections as landmarks for rtabmap (landmark_detections)
|
||||
Node(
|
||||
package='rtabmap_demos', executable='find_object_to_landmarks.py', output='screen',
|
||||
parameters=[parameters]),
|
||||
])
|
||||
@@ -87,6 +87,10 @@ def generate_launch_description():
|
||||
'robot_ns', default_value='a200_0000',
|
||||
description='Robot namespace.'),
|
||||
|
||||
DeclareLaunchArgument(
|
||||
'rtabmap_viz', default_value='true', choices=['true', 'false'],
|
||||
description='Start rtabmap_viz.'),
|
||||
|
||||
# Nodes to launch
|
||||
Node(
|
||||
package='rtabmap_sync', executable='rgbd_sync', output='screen',
|
||||
@@ -121,6 +125,7 @@ def generate_launch_description():
|
||||
remappings=remappings),
|
||||
|
||||
Node(
|
||||
condition=IfCondition(LaunchConfiguration('rtabmap_viz')),
|
||||
package='rtabmap_viz', executable='rtabmap_viz', output='screen',
|
||||
namespace=robot_ns,
|
||||
parameters=[rtabmap_parameters, shared_parameters,
|
||||
|
||||
@@ -100,6 +100,10 @@ def generate_launch_description():
|
||||
'robot_ns', default_value='a200_0000',
|
||||
description='Robot namespace.'),
|
||||
|
||||
DeclareLaunchArgument(
|
||||
'rtabmap_viz', default_value='true', choices=['true', 'false'],
|
||||
description='Start rtabmap_viz.'),
|
||||
|
||||
DeclareLaunchArgument(
|
||||
'use_camera', default_value='true',
|
||||
description='Use camera for global loop closure / re-localization.'),
|
||||
@@ -139,6 +143,7 @@ def generate_launch_description():
|
||||
remappings=remappings),
|
||||
|
||||
Node(
|
||||
condition=IfCondition(LaunchConfiguration('rtabmap_viz')),
|
||||
package='rtabmap_viz', executable='rtabmap_viz', output='screen',
|
||||
namespace=robot_ns,
|
||||
parameters=[rtabmap_parameters, shared_parameters,
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument
|
||||
from launch.substitutions import LaunchConfiguration
|
||||
from launch.conditions import IfCondition
|
||||
from launch_ros.actions import Node
|
||||
|
||||
|
||||
@@ -97,6 +98,10 @@ def generate_launch_description():
|
||||
'robot_ns', default_value='a200_0000',
|
||||
description='Robot namespace.'),
|
||||
|
||||
DeclareLaunchArgument(
|
||||
'rtabmap_viz', default_value='true', choices=['true', 'false'],
|
||||
description='Start rtabmap_viz.'),
|
||||
|
||||
# Nodes to launch
|
||||
Node(
|
||||
package='rtabmap_sync', executable='rgbd_sync', output='screen',
|
||||
@@ -127,6 +132,7 @@ def generate_launch_description():
|
||||
arguments=['-d']),
|
||||
|
||||
Node(
|
||||
condition=IfCondition(LaunchConfiguration('rtabmap_viz')),
|
||||
package='rtabmap_viz', executable='rtabmap_viz', output='screen',
|
||||
namespace=robot_ns,
|
||||
parameters=[rtabmap_parameters, shared_parameters,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# Requirements:
|
||||
# Download one or more rosbags:
|
||||
# * map1.db3: https://drive.google.com/file/d/1XajzWm0u1Tk7m7x63ybcKVMXj80r5P6r/view?usp=drive_link
|
||||
# * map2.db3: https://drive.google.com/file/d/1_FxEalE2O-DQKq2tRpLIpDn5Mbvu0jZc/view?usp=drive_link
|
||||
# * map3.db3: https://drive.google.com/file/d/1dJzMOoRPA28gQZUIWCeAa08Qn4wG9oRw/view?usp=drive_link
|
||||
# * map4.db3: https://drive.google.com/file/d/19Y6yye0ndIIwdhEWMwTdoiSy9WlKS44c/view?usp=drive_link
|
||||
# * map5.db3: https://drive.google.com/file/d/1zCx4Q4SftPplQtW1xeG-W3OkbTxwd5GD/view?usp=drive_link
|
||||
# * map1_bag.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/map1_bag.zip
|
||||
# * map2_bag.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/map2_bag.zip
|
||||
# * map3_bag.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/map3_bag.zip
|
||||
# * map4_bag.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/map4_bag.zip
|
||||
# * map5_bag.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/map5_bag.zip
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
@@ -13,12 +13,12 @@
|
||||
# $ ros2 launch rtabmap_demos multisession_mapping_demo.launch.py
|
||||
#
|
||||
# Rosbag:
|
||||
# $ ros2 bag play map1.db3 --clock
|
||||
# $ ros2 bag play map1_bag --clock
|
||||
# when done, you can play the next bag(s):
|
||||
# $ ros2 bag play map2.db3 --clock
|
||||
# $ ros2 bag play map3.db3 --clock
|
||||
# $ ros2 bag play map4.db3 --clock
|
||||
# $ ros2 bag play map5.db3 --clock
|
||||
# $ ros2 bag play map2_bag --clock
|
||||
# $ ros2 bag play map3_bag --clock
|
||||
# $ ros2 bag play map4_bag --clock
|
||||
# $ ros2 bag play map5_bag --clock
|
||||
#
|
||||
# Refer to this paper for more info: https://arxiv.org/abs/2407.15305
|
||||
#
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
# Description:
|
||||
# 3D lidar SLAM with an Ouster OS1-32 turning on a motorized mast (a dynamixel
|
||||
# joint), carried by a drone frame. The mast rotation sweeps the lidar's 32 beams
|
||||
# over the whole sphere, but it also moves the lidar by a few degrees during each
|
||||
# sweep: scans are deskewed point by point with TF, using the IMU orientation for
|
||||
# the base and the joint states for the mast. This is rtabmap_examples'
|
||||
# lidar3d_assemble.launch.py, set up for the bag: scans are assembled over half a
|
||||
# turn of the mast, so each node of the map holds a full sphere.
|
||||
#
|
||||
# Note: the camera's rotation relative to the lidar (box_link -> camera_link in the
|
||||
# bags' TF) was calibrated with rtabmap's rtabmap-lidarCameraCalibration tool; its
|
||||
# translation is as measured.
|
||||
#
|
||||
# Requirements:
|
||||
# Download one or more rosbags, the consecutive minutes of the same run:
|
||||
# * netherdrone_ouster_vertige_bag_0.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/netherdrone_ouster_vertige_bag_0.zip
|
||||
# * netherdrone_ouster_vertige_bag_1.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/netherdrone_ouster_vertige_bag_1.zip
|
||||
# * netherdrone_ouster_vertige_bag_2.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/netherdrone_ouster_vertige_bag_2.zip
|
||||
# * netherdrone_ouster_vertige_bag_3.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/netherdrone_ouster_vertige_bag_3.zip
|
||||
# * netherdrone_ouster_vertige_bag_4.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/netherdrone_ouster_vertige_bag_4.zip
|
||||
# * netherdrone_ouster_vertige_bag_5.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/netherdrone_ouster_vertige_bag_5.zip
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# SLAM:
|
||||
# $ ros2 launch rtabmap_demos netherdrone_lidar3d_demo.launch.py
|
||||
#
|
||||
# Rosbag:
|
||||
# $ ros2 bag play netherdrone_ouster_vertige_bag_0 --clock
|
||||
# or, to play the bags one after the other:
|
||||
# $ ros2 bag play netherdrone_ouster_vertige_bag_0 --clock && \
|
||||
# ros2 bag play netherdrone_ouster_vertige_bag_1 --clock && \
|
||||
# ros2 bag play netherdrone_ouster_vertige_bag_2 --clock && \
|
||||
# ros2 bag play netherdrone_ouster_vertige_bag_3 --clock && \
|
||||
# ros2 bag play netherdrone_ouster_vertige_bag_4 --clock && \
|
||||
# ros2 bag play netherdrone_ouster_vertige_bag_5 --clock
|
||||
#
|
||||
|
||||
import os
|
||||
|
||||
from ament_index_python.packages import get_package_share_directory
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
|
||||
from launch.conditions import IfCondition
|
||||
from launch.launch_description_sources import PythonLaunchDescriptionSource
|
||||
from launch.substitutions import LaunchConfiguration, PythonExpression
|
||||
from launch_ros.actions import Node
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
|
||||
lidar3d_assemble_launch = os.path.join(
|
||||
get_package_share_directory('rtabmap_examples'), 'launch', 'lidar3d_assemble.launch.py')
|
||||
config_rviz = os.path.join(
|
||||
get_package_share_directory('rtabmap_demos'), 'config', 'demo_lidar3d.rviz')
|
||||
config_rtabmap_viz = os.path.join(
|
||||
get_package_share_directory('rtabmap_demos'), 'config', 'demo_lidar3d_gui.ini')
|
||||
|
||||
camera = LaunchConfiguration('camera')
|
||||
rgbd_image_topic = PythonExpression(
|
||||
["'/camera/rgbd_image' if '", camera, "'.lower() == 'true' else ''"])
|
||||
|
||||
|
||||
return LaunchDescription([
|
||||
|
||||
# Launch arguments
|
||||
DeclareLaunchArgument('rtabmap_viz', default_value='true', description='Launch RTAB-Map UI (optional).'),
|
||||
DeclareLaunchArgument('rtabmap_viz_cfg', default_value=config_rtabmap_viz, description='Configuration path of rtabmap_viz.'),
|
||||
DeclareLaunchArgument('rviz', default_value='true', description='Launch RVIZ (optional).'),
|
||||
DeclareLaunchArgument('rviz_cfg', default_value=config_rviz, description='Configuration path of rviz2.'),
|
||||
DeclareLaunchArgument('localization', default_value='false', description='Launch in localization mode.'),
|
||||
DeclareLaunchArgument('voxel_size', default_value='0.3',
|
||||
description='Voxel size (m) of the downsampled lidar point cloud. In this bag, the median range is 5-7 m and the farthest points are ~23 m.'),
|
||||
DeclareLaunchArgument('camera', default_value='true',
|
||||
description='Add the camera images to the map, with a depth made from the lidar, for visual loop closure detection (bag-of-words). Registration stays lidar only.'),
|
||||
DeclareLaunchArgument('lidar_range_min', default_value='0.84',
|
||||
description='Lidar points closer than this (m) are ignored. About 6% of each scan hits the drone itself, all within 0.6 m; the surroundings start at ~0.9 m.'),
|
||||
DeclareLaunchArgument('assembler_voxel_size', default_value='0.05',
|
||||
description='Voxel size (m) of the assembled clouds added to the map; 0 keeps every point (larger database, e.g., for camera-lidar calibration).'),
|
||||
DeclareLaunchArgument('assembling_time', default_value='4.3',
|
||||
description='How long (s) scans are assembled before being added to the map. The mast turns at 42 deg/s: 4.3 s is half a turn, in which the lidar\'s scanning plane sweeps the whole sphere.'),
|
||||
DeclareLaunchArgument('intermediate_nodes', default_value='false',
|
||||
description='Also save every odometry pose (10 Hz) between the map\'s nodes in the database.'),
|
||||
|
||||
IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(lidar3d_assemble_launch),
|
||||
launch_arguments={
|
||||
'use_sim_time': 'true',
|
||||
'frame_id': 'base_link',
|
||||
'lidar_topic': '/os_cloud_node/points',
|
||||
# The fixed frame for deskewing (base_link_stabilized) is made from its
|
||||
# orientation.
|
||||
'imu_topic': '/imu/data_filtered',
|
||||
'voxel_size': LaunchConfiguration('voxel_size'),
|
||||
'max_correspondence_distance': '1.0',
|
||||
'icp_outlier_ratio': '0.3',
|
||||
'odom_key_frame_threshold': '0.9',
|
||||
'min_loop_closure_overlap': '0.1',
|
||||
'odom_local_map_size': '20000',
|
||||
'assembler_voxel_size': LaunchConfiguration('assembler_voxel_size'),
|
||||
'rgbd_image_topic': rgbd_image_topic,
|
||||
# The images are raw (k1=-0.34): rectify them, so that the lidar projected
|
||||
# into them as their depth (gen_depth) lines up.
|
||||
'rectify_images': 'true',
|
||||
'gen_depth': camera,
|
||||
'lidar_range_min': LaunchConfiguration('lidar_range_min'),
|
||||
'expected_update_rate': '15.0', # the Ouster runs at 10 Hz
|
||||
'assembling_time': LaunchConfiguration('assembling_time'),
|
||||
# Look TF up at every point's own time ("t" field) rather than
|
||||
# interpolating between the first and last points of the sweep: exact,
|
||||
# for more TF lookups.
|
||||
'deskewing_slerp': 'false',
|
||||
'rtabmap_viz': LaunchConfiguration('rtabmap_viz'),
|
||||
'rtabmap_viz_cfg': LaunchConfiguration('rtabmap_viz_cfg'),
|
||||
'localization': LaunchConfiguration('localization'),
|
||||
'intermediate_nodes': LaunchConfiguration('intermediate_nodes'),
|
||||
}.items()),
|
||||
|
||||
# Camera image and calibration, together in one topic for rtabmap. Both have
|
||||
# the same stamps. The camera has no depth: rtabmap makes it from the lidar.
|
||||
Node(
|
||||
condition=IfCondition(camera),
|
||||
package='rtabmap_sync', executable='rgb_sync', output='screen',
|
||||
parameters=[{
|
||||
'use_sim_time': True,
|
||||
'approx_sync': False,
|
||||
'image_transport': 'compressed'}],
|
||||
remappings=[('rgb/image', '/camera/image_raw'),
|
||||
('rgb/camera_info', '/camera/camera_info'),
|
||||
('rgbd_image', '/camera/rgbd_image')]),
|
||||
|
||||
# Orientation from the gyro and accelerometer of /imu/data_raw. Its own
|
||||
# orientation (despite the name, it has one) is off from the accelerometer by a
|
||||
# constant ~2 deg in roll and ~4 deg in pitch, so it is not used.
|
||||
Node(
|
||||
package='imu_complementary_filter', executable='complementary_filter_node', output='screen',
|
||||
parameters=[{
|
||||
'use_sim_time': True,
|
||||
'use_mag': False,
|
||||
'publish_tf': False,
|
||||
'do_bias_estimation': True,
|
||||
'do_adaptive_gain': True}],
|
||||
remappings=[('imu/data_raw', '/imu/data_raw'),
|
||||
('imu/data', '/imu/data_filtered')]),
|
||||
|
||||
Node(
|
||||
package='rviz2', executable='rviz2', name='rviz2', output='screen',
|
||||
condition=IfCondition(LaunchConfiguration('rviz')),
|
||||
parameters=[{'use_sim_time': True}],
|
||||
arguments=['-d', LaunchConfiguration('rviz_cfg')]),
|
||||
])
|
||||
@@ -1,6 +1,6 @@
|
||||
# Requirements:
|
||||
# Download rosbag:
|
||||
# * demo_mapping.db3: https://drive.google.com/file/d/1v9qJ2U7GlYhqBJr7OQHWbDSCfgiVaLWb/view?usp=drive_link
|
||||
# * demo_mapping_bag.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/demo_mapping_bag.zip
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
@@ -8,7 +8,7 @@
|
||||
# $ ros2 launch rtabmap_demos robot_mapping_demo.launch.py rviz:=true rtabmap_viz:=true
|
||||
#
|
||||
# Rosbag:
|
||||
# $ ros2 bag play demo_mapping.db3 --clock
|
||||
# $ ros2 bag play demo_mapping_bag --clock
|
||||
#
|
||||
|
||||
from launch import LaunchDescription
|
||||
@@ -43,11 +43,11 @@ def generate_launch_description():
|
||||
'RGBD/OptimizeFromGraphEnd': 'false', # Optimize graph from initial node so /map -> /odom transform will be generated
|
||||
'RGBD/OptimizeMaxError': '4', # Reject any loop closure causing large errors (>3x link's covariance) in the map
|
||||
'Reg/Force3DoF': 'true', # 2D SLAM
|
||||
'Grid/FromDepth': 'false', # Create 2D occupancy grid from laser scan
|
||||
'Grid/Sensor': '0', # Create 2D occupancy grid from laser scan
|
||||
'Mem/STMSize': '30', # increased to 30 to avoid adding too many loop closures on just seen locations
|
||||
'RGBD/LocalRadius': '5', # limit length of proximity detections
|
||||
'Icp/CorrespondenceRatio': '0.2', # minimum scan overlap to accept loop closure
|
||||
'Icp/PM': 'false',
|
||||
'Icp/Strategy': '0', # 0=PCL, 1=libpointmatcher
|
||||
'Icp/PointToPlane': 'false',
|
||||
'Icp/MaxCorrespondenceDistance': '0.15',
|
||||
'Icp/VoxelSize': '0.05'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Requirements:
|
||||
# Download one or both rosbags:
|
||||
# * stereo_outdoorA.db3: https://drive.google.com/file/d/1O7mCXg_sw4tZY1S88a-n96O6OulmqvqI/view?usp=drive_link
|
||||
# * stereo_outdoorB.db3: https://drive.google.com/file/d/1mSu7418Fkbe-hIz2-3Mi936PrWuD2un_/view?usp=drive_link
|
||||
# * stereo_outdoorA_bag.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/stereo_outdoorA_bag.zip
|
||||
# * stereo_outdoorB_bag.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/stereo_outdoorB_bag.zip
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
@@ -9,9 +9,9 @@
|
||||
# $ ros2 launch rtabmap_demos stereo_outdoor_demo.launch.py rviz:=true rtabmap_viz:=true
|
||||
#
|
||||
# Rosbag:
|
||||
# $ ros2 bag play stereo_outdoorA.db3 --clock
|
||||
# $ ros2 bag play stereo_outdoorA_bag --clock
|
||||
# when done, you can play the secon bag:
|
||||
# $ ros2 bag play stereo_outdoorB.db3 --clock
|
||||
# $ ros2 bag play stereo_outdoorB_bag --clock
|
||||
#
|
||||
|
||||
from launch import LaunchDescription
|
||||
@@ -44,6 +44,7 @@ def generate_launch_description():
|
||||
'OdomF2M/MaxSize': '1000',
|
||||
'GFTT/MinDistance': '10',
|
||||
'GFTT/QualityLevel': '0.00001',
|
||||
'Optimizer/Iterations': '30', # With g2o (rtabmap built without GTSAM), Levenberg-Marquardt needs ~25 iterations to converge on this graph
|
||||
#'Kp/DetectorStrategy': '6', # Uncommment to match ros1 noetic results, but opencv should be built with xfeatures2d
|
||||
#'Vis/FeatureType': '6' # Uncommment to match ros1 noetic results, but opencv should be built with xfeatures2d
|
||||
}
|
||||
@@ -72,13 +73,17 @@ def generate_launch_description():
|
||||
Node(
|
||||
package='image_transport', executable='republish', name='republish_left', output='screen',
|
||||
namespace='stereo_camera',
|
||||
# The transports: as arguments up to humble, as parameters from jazzy.
|
||||
arguments=['compressed', 'raw'],
|
||||
parameters=[{'in_transport': 'compressed', 'out_transport': 'raw'}],
|
||||
remappings=[('in/compressed', 'left/image_raw_throttle/compressed'),
|
||||
('out', 'left/image_raw')]),
|
||||
Node(
|
||||
package='image_transport', executable='republish', name='republish_right', output='screen',
|
||||
namespace='stereo_camera',
|
||||
# The transports: as arguments up to humble, as parameters from jazzy.
|
||||
arguments=['compressed', 'raw'],
|
||||
parameters=[{'in_transport': 'compressed', 'out_transport': 'raw'}],
|
||||
remappings=[('in/compressed', 'right/image_raw_throttle/compressed'),
|
||||
('out', 'right/image_raw')]),
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Requirements:
|
||||
# Download one or both rosbags:
|
||||
# * stereo_outdoorA.db3: https://drive.google.com/file/d/1O7mCXg_sw4tZY1S88a-n96O6OulmqvqI/view?usp=drive_link
|
||||
# * stereo_outdoorB.db3: https://drive.google.com/file/d/1mSu7418Fkbe-hIz2-3Mi936PrWuD2un_/view?usp=drive_link
|
||||
# * stereo_outdoorA_bag.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/stereo_outdoorA_bag.zip
|
||||
# * stereo_outdoorB_bag.zip: https://github.com/introlab/rtabmap_ros/releases/download/0.23.13/stereo_outdoorB_bag.zip
|
||||
#
|
||||
# This is the "composition" variant of stereo_outdoor_demo.launch.py: the whole
|
||||
# pipeline (image_proc rectification, stereo synchronization, visual odometry
|
||||
@@ -16,9 +16,9 @@
|
||||
# $ ros2 launch rtabmap_demos stereo_outdoor_demo_composition.launch.py rviz:=true rtabmap_viz:=true
|
||||
#
|
||||
# Rosbag:
|
||||
# $ ros2 bag play stereo_outdoorA.db3 --clock
|
||||
# $ ros2 bag play stereo_outdoorA_bag --clock
|
||||
# when done, you can play the secon bag:
|
||||
# $ ros2 bag play stereo_outdoorB.db3 --clock
|
||||
# $ ros2 bag play stereo_outdoorB_bag --clock
|
||||
#
|
||||
|
||||
from launch import LaunchDescription
|
||||
@@ -123,13 +123,17 @@ def generate_launch_description():
|
||||
Node(
|
||||
package='image_transport', executable='republish', name='republish_left', output='screen',
|
||||
namespace='stereo_camera',
|
||||
# The transports: as arguments up to humble, as parameters from jazzy.
|
||||
arguments=['compressed', 'raw'],
|
||||
parameters=[{'in_transport': 'compressed', 'out_transport': 'raw'}],
|
||||
remappings=[('in/compressed', 'left/image_raw_throttle/compressed'),
|
||||
('out', 'left/image_raw')]),
|
||||
Node(
|
||||
package='image_transport', executable='republish', name='republish_right', output='screen',
|
||||
namespace='stereo_camera',
|
||||
# The transports: as arguments up to humble, as parameters from jazzy.
|
||||
arguments=['compressed', 'raw'],
|
||||
parameters=[{'in_transport': 'compressed', 'out_transport': 'raw'}],
|
||||
remappings=[('in/compressed', 'right/image_raw_throttle/compressed'),
|
||||
('out', 'right/image_raw')]),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user