90 lines
2.6 KiB
Python
90 lines
2.6 KiB
Python
from launch import LaunchDescription
|
|
from launch.actions import DeclareLaunchArgument
|
|
from launch.substitutions import LaunchConfiguration
|
|
from launch_ros.actions import Node
|
|
|
|
def generate_launch_description():
|
|
"""Launch file for scene graph room classification nodes."""
|
|
|
|
# Declare the use_sim_time launch argument (defaults to true for simulation/rosbag play)
|
|
use_sim_time = LaunchConfiguration('use_sim_time', default='true')
|
|
|
|
use_sim_time_arg = DeclareLaunchArgument(
|
|
'use_sim_time',
|
|
default_value='true',
|
|
description='Use simulation (bag) clock if true'
|
|
)
|
|
|
|
common_params = [{'use_sim_time': use_sim_time}]
|
|
|
|
# Object Detection Node
|
|
object_detection_node = Node(
|
|
package='scene_graph_generation_pipeline',
|
|
executable='object_detection_node',
|
|
name='object_detection_node',
|
|
output='screen',
|
|
parameters=common_params,
|
|
remappings=[]
|
|
)
|
|
|
|
# Object Localization Node
|
|
object_localization_node = Node(
|
|
package='scene_graph_generation_pipeline',
|
|
executable='object_localization_node',
|
|
name='object_localization_node',
|
|
output='screen',
|
|
parameters=common_params,
|
|
remappings=[]
|
|
)
|
|
|
|
# Scene Graph Fusion Node
|
|
scene_graph_fusion_node = Node(
|
|
package='scene_graph_generation_pipeline',
|
|
executable='scene_graph_fusion_node',
|
|
name='scene_graph_fusion_node',
|
|
output='screen',
|
|
parameters=common_params,
|
|
remappings=[]
|
|
)
|
|
|
|
# Odom Vizualization Node
|
|
odom_vizualization_node = Node(
|
|
package='scene_graph_generation_pipeline',
|
|
executable='odom_vizualization_node',
|
|
name='odom_vizualization_node',
|
|
output='screen',
|
|
parameters=common_params,
|
|
remappings=[]
|
|
)
|
|
|
|
# Room Classification Node
|
|
room_classification_node = Node(
|
|
package='scene_graph_generation_pipeline',
|
|
executable='room_classification_node',
|
|
name='room_classification_node',
|
|
output='screen',
|
|
parameters=common_params,
|
|
remappings=[]
|
|
)
|
|
|
|
# Room Segmentation Node
|
|
room_segmentation_node = Node(
|
|
package='scene_graph_generation_pipeline',
|
|
executable='room_segmentation_node',
|
|
name='room_segmentation_node',
|
|
output='screen',
|
|
parameters=common_params,
|
|
remappings=[]
|
|
)
|
|
|
|
return LaunchDescription([
|
|
use_sim_time_arg,
|
|
object_detection_node,
|
|
object_localization_node,
|
|
scene_graph_fusion_node,
|
|
odom_vizualization_node,
|
|
room_classification_node,
|
|
room_segmentation_node
|
|
])
|
|
|