-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcreate_location_file.launch.py
More file actions
executable file
·59 lines (55 loc) · 2.24 KB
/
create_location_file.launch.py
File metadata and controls
executable file
·59 lines (55 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration
def generate_launch_description():
return LaunchDescription([
########## Customizable parameters ##########
DeclareLaunchArgument(
# ロボットを動かす場合true,動かさない場合false
'use_robot', default_value='true'
),
DeclareLaunchArgument(
# ロボットの名前を指定
# 'robot_name', default_value='sobit_pro'
# 'robot_name', default_value='sobit_edu'
# 'robot_name', default_value='sobit_mini'
# 'robot_name', default_value='sobit_light'
# 'robot_name', default_value='hsr_sim'
'robot_name', default_value='hsrb_robot'
),
DeclareLaunchArgument(
# mapのファイルパス
'map', default_value=os.path.join(get_package_share_directory("sobits_slam"), 'map', 'map_example.yaml')
),
DeclareLaunchArgument(
'use_rviz', default_value='True'
),
#############################################
# Create Location File
Node(
package='sobits_slam',
executable='location_setting',
name='location_setting',
output='screen',
parameters=[
{
'use_robot': LaunchConfiguration('use_robot'),
'robot_name': LaunchConfiguration('robot_name')
}
]
),
IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(get_package_share_directory("sobits_nav"), 'launch', 'nav2.launch.py')),
launch_arguments={
'map' : LaunchConfiguration('map'),
'robot_name' : LaunchConfiguration('robot_name'),
'location_file_path' : "",
'use_rviz' : LaunchConfiguration('use_rviz'),
}.items(),
),
])