mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 16:57:46 +08:00
husky lidar3d demo: added option to disable camera
This commit is contained in:
@@ -43,6 +43,8 @@ ARGUMENTS = [
|
|||||||
description='Ignition World'),
|
description='Ignition World'),
|
||||||
DeclareLaunchArgument('robot_ns', default_value='a200_0000',
|
DeclareLaunchArgument('robot_ns', default_value='a200_0000',
|
||||||
description='Robot namespace'),
|
description='Robot namespace'),
|
||||||
|
DeclareLaunchArgument('use_camera', default_value='true',
|
||||||
|
description='Use camera for global loop closure / re-localization.'),
|
||||||
]
|
]
|
||||||
|
|
||||||
def generate_launch_description():
|
def generate_launch_description():
|
||||||
@@ -86,6 +88,7 @@ def generate_launch_description():
|
|||||||
('rtabmap_viz', LaunchConfiguration('rtabmap_viz')),
|
('rtabmap_viz', LaunchConfiguration('rtabmap_viz')),
|
||||||
('localization', LaunchConfiguration('localization')),
|
('localization', LaunchConfiguration('localization')),
|
||||||
('use_sim_time', 'true'),
|
('use_sim_time', 'true'),
|
||||||
|
('use_camera', LaunchConfiguration('use_camera')),
|
||||||
('robot_ns', LaunchConfiguration('robot_ns'))
|
('robot_ns', LaunchConfiguration('robot_ns'))
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ def generate_launch_description():
|
|||||||
use_sim_time = LaunchConfiguration('use_sim_time')
|
use_sim_time = LaunchConfiguration('use_sim_time')
|
||||||
localization = LaunchConfiguration('localization')
|
localization = LaunchConfiguration('localization')
|
||||||
robot_ns = LaunchConfiguration('robot_ns')
|
robot_ns = LaunchConfiguration('robot_ns')
|
||||||
|
use_camera = LaunchConfiguration('use_camera')
|
||||||
|
|
||||||
icp_odom_parameters={
|
icp_odom_parameters={
|
||||||
'odom_frame_id':'icp_odom',
|
'odom_frame_id':'icp_odom',
|
||||||
@@ -43,7 +44,9 @@ def generate_launch_description():
|
|||||||
}
|
}
|
||||||
|
|
||||||
rtabmap_parameters={
|
rtabmap_parameters={
|
||||||
'subscribe_rgbd':True,
|
'subscribe_rgb':False,
|
||||||
|
'subscribe_depth':False,
|
||||||
|
'subscribe_rgbd': use_camera,
|
||||||
'subscribe_scan_cloud':True,
|
'subscribe_scan_cloud':True,
|
||||||
'use_action_for_goal':True,
|
'use_action_for_goal':True,
|
||||||
'odom_sensor_sync': True,
|
'odom_sensor_sync': True,
|
||||||
@@ -88,7 +91,7 @@ def generate_launch_description():
|
|||||||
DeclareLaunchArgument(
|
DeclareLaunchArgument(
|
||||||
'use_sim_time', default_value='false', choices=['true', 'false'],
|
'use_sim_time', default_value='false', choices=['true', 'false'],
|
||||||
description='Use simulation (Gazebo) clock if true'),
|
description='Use simulation (Gazebo) clock if true'),
|
||||||
|
|
||||||
DeclareLaunchArgument(
|
DeclareLaunchArgument(
|
||||||
'localization', default_value='false', choices=['true', 'false'],
|
'localization', default_value='false', choices=['true', 'false'],
|
||||||
description='Launch rtabmap in localization mode (a map should have been already created).'),
|
description='Launch rtabmap in localization mode (a map should have been already created).'),
|
||||||
@@ -97,8 +100,13 @@ def generate_launch_description():
|
|||||||
'robot_ns', default_value='a200_0000',
|
'robot_ns', default_value='a200_0000',
|
||||||
description='Robot namespace.'),
|
description='Robot namespace.'),
|
||||||
|
|
||||||
|
DeclareLaunchArgument(
|
||||||
|
'use_camera', default_value='true',
|
||||||
|
description='Use camera for global loop closure / re-localization.'),
|
||||||
|
|
||||||
# Nodes to launch
|
# Nodes to launch
|
||||||
Node(
|
Node(
|
||||||
|
condition=IfCondition(use_camera),
|
||||||
package='rtabmap_sync', executable='rgbd_sync', output='screen',
|
package='rtabmap_sync', executable='rgbd_sync', output='screen',
|
||||||
namespace=robot_ns,
|
namespace=robot_ns,
|
||||||
parameters=[{'approx_sync':False, 'use_sim_time':use_sim_time}],
|
parameters=[{'approx_sync':False, 'use_sim_time':use_sim_time}],
|
||||||
|
|||||||
Reference in New Issue
Block a user