simulation
Toggle main menu visibility
読み取り中…
検索中…
一致する文字列を見つけられません
coverage_3d.launch.py
[詳解]
1
"""Gazeboで3D地図による位置推定、Nav2、BLE入力付きの清掃範囲走行を起動する。"""
2
3
from
launch
import
LaunchDescription
4
from
launch.actions
import
DeclareLaunchArgument, IncludeLaunchDescription
5
from
launch.launch_description_sources
import
PythonLaunchDescriptionSource
6
from
launch.substitutions
import
LaunchConfiguration, PathJoinSubstitution
7
from
launch_ros.substitutions
import
FindPackageShare
8
9
10
def
generate_launch_description
():
11
nav2_params = PathJoinSubstitution([
12
FindPackageShare(
'simulation'
),
'config'
,
'nodding_nav2.yaml'
])
13
behavior_tree = PathJoinSubstitution([
14
FindPackageShare(
'simulation'
),
'behavior_trees'
,
15
'navigate_coverage_return_home.xml'
])
16
return
LaunchDescription([
17
DeclareLaunchArgument(
'world'
, default_value=
''
),
18
DeclareLaunchArgument(
19
'database_path'
,
20
default_value=
'/home/developer/ws/maps/forest_3d.db'
),
21
DeclareLaunchArgument(
22
'rtabmap_initial_pose'
, default_value=
'0 0 0 0 0 0'
),
23
DeclareLaunchArgument(
'nav2_params_file'
, default_value=nav2_params),
24
DeclareLaunchArgument(
'enable_ble'
, default_value=
'true'
),
25
DeclareLaunchArgument(
'enable_monitor'
, default_value=
'true'
),
26
DeclareLaunchArgument(
'enable_rviz'
, default_value=
'true'
),
27
DeclareLaunchArgument(
'enable_rtabmap_viz'
, default_value=
'true'
),
28
IncludeLaunchDescription(
29
PythonLaunchDescriptionSource(PathJoinSubstitution([
30
FindPackageShare(
'simulation'
),
'launch'
,
'simulation_launch.py'
])),
31
launch_arguments={
32
'enable_slam'
:
'false'
,
33
'enable_nav2'
:
'true'
,
34
'enable_nodding_lidar'
:
'true'
,
35
'enable_ground_segmentation'
:
'true'
,
36
'enable_teleop'
:
'false'
,
37
'enable_rtabmap_viz'
: LaunchConfiguration(
'enable_rtabmap_viz'
),
38
'enable_rviz'
: LaunchConfiguration(
'enable_rviz'
),
39
'world'
: LaunchConfiguration(
'world'
),
40
'database_path'
: LaunchConfiguration(
'database_path'
),
41
'rtabmap_initial_pose'
: LaunchConfiguration(
'rtabmap_initial_pose'
),
42
'nav2_params_file'
: LaunchConfiguration(
'nav2_params_file'
),
43
}.items()),
44
IncludeLaunchDescription(
45
PythonLaunchDescriptionSource(PathJoinSubstitution([
46
FindPackageShare(
'coverage'
),
'launch'
,
'coverage.launch.py'
])),
47
launch_arguments={
48
'enable_mirs'
:
'false'
,
49
'enable_coverage_server'
:
'true'
,
50
'behavior_tree'
: behavior_tree,
51
'enable_ble'
: LaunchConfiguration(
'enable_ble'
),
52
'enable_monitor'
: LaunchConfiguration(
'enable_monitor'
),
53
'use_rviz'
:
'false'
,
54
'use_sim_time'
:
'true'
,
55
'monitor_profile'
:
'3d'
,
56
'nav2_params_file'
: LaunchConfiguration(
'nav2_params_file'
),
57
}.items()),
58
])
coverage_3d.generate_launch_description
generate_launch_description()
定義
coverage_3d.launch.py:10
launch
coverage_3d.launch.py
構築:
1.18.0