fix: isolate RTAB-Map occupancy output during navigation
This commit is contained in:
@@ -26,11 +26,16 @@ def launch_setup(context, *args, **kwargs):
|
|||||||
if not os.path.isfile(database_path):
|
if not os.path.isfile(database_path):
|
||||||
raise RuntimeError(f'3D localization database was not found: {database_path}')
|
raise RuntimeError(f'3D localization database was not found: {database_path}')
|
||||||
|
|
||||||
remappings=[
|
remappings = [
|
||||||
('/tf', 'tf'),
|
('/tf', 'tf'),
|
||||||
('/tf_static', 'tf_static'),
|
('/tf_static', 'tf_static'),
|
||||||
('odom', 'icp_odom'),
|
('odom', 'icp_odom'),
|
||||||
('scan_cloud', '/lidar_filtered')]
|
('scan_cloud', '/lidar_filtered'),
|
||||||
|
]
|
||||||
|
# Nav2 map_server owns /map during navigation and publishes the complete
|
||||||
|
# saved PGM map. Keep RTAB-Map's local occupancy update separate so it
|
||||||
|
# cannot race map_server and replace the navigation map intermittently.
|
||||||
|
rtabmap_remappings = [*remappings, ('map', '/rtabmap/map')]
|
||||||
|
|
||||||
# Directories
|
# Directories
|
||||||
pkg_localization = get_package_share_directory(
|
pkg_localization = get_package_share_directory(
|
||||||
@@ -72,7 +77,7 @@ def launch_setup(context, *args, **kwargs):
|
|||||||
'odom_frame_id': 'icp_odom',
|
'odom_frame_id': 'icp_odom',
|
||||||
'publish_tf': True,
|
'publish_tf': True,
|
||||||
}],
|
}],
|
||||||
remappings=remappings,
|
remappings=rtabmap_remappings,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user