simulation
Toggle main menu visibility
読み取り中…
検索中…
一致する文字列を見つけられません
diagnose_3d.launch.py
[詳解]
1
"""3Dセンサの処理を指定した段階まで起動する。Nav2と清掃範囲走行は起動しない。"""
2
3
from
launch
import
LaunchDescription
4
from
launch.actions
import
(
5
DeclareLaunchArgument, IncludeLaunchDescription, SetEnvironmentVariable,
6
)
7
from
launch.conditions
import
IfCondition
8
from
launch.launch_description_sources
import
PythonLaunchDescriptionSource
9
from
launch.substitutions
import
LaunchConfiguration, PathJoinSubstitution
10
from
launch_ros.actions
import
Node
11
from
launch_ros.substitutions
import
FindPackageShare
12
13
14
def
generate_launch_description
():
15
return
LaunchDescription([
16
DeclareLaunchArgument(
17
'stage'
, default_value=
'scan'
,
18
description=
'scan, cloud, filtered, assembled, or localization'
),
19
DeclareLaunchArgument(
'world'
, default_value=
''
),
20
DeclareLaunchArgument(
21
'database_path'
, default_value=
'/home/developer/ws/maps/forest_3d.db'
),
22
DeclareLaunchArgument(
'cloud_assembling_time'
, default_value=
'2.0'
),
23
DeclareLaunchArgument(
'icp_min_height'
, default_value=
'0.5'
),
24
DeclareLaunchArgument(
'enable_foxglove_bridge'
, default_value=
'false'
),
25
DeclareLaunchArgument(
'enable_monitor'
, default_value=
'true'
),
26
SetEnvironmentVariable(
'ROS_DOMAIN_ID'
,
'91'
),
27
IncludeLaunchDescription(
28
PythonLaunchDescriptionSource(PathJoinSubstitution([
29
FindPackageShare(
'simulation'
),
'launch'
,
'simulation_launch.py'
])),
30
launch_arguments={
31
'enable_nodding_lidar'
:
'true'
,
32
'enable_slam'
:
'false'
,
33
'enable_nav2'
:
'false'
,
34
'enable_rviz'
:
'false'
,
35
'enable_rtabmap_viz'
:
'false'
,
36
'enable_foxglove_bridge'
: LaunchConfiguration(
'enable_foxglove_bridge'
),
37
'bridge_config_file'
: PathJoinSubstitution([
38
FindPackageShare(
'simulation'
),
'config'
,
39
'diagnose_3d_bridge.yaml'
]),
40
'diagnostic_stage'
: LaunchConfiguration(
'stage'
),
41
'world'
: LaunchConfiguration(
'world'
),
42
'database_path'
: LaunchConfiguration(
'database_path'
),
43
'cloud_assembling_time'
: LaunchConfiguration(
'cloud_assembling_time'
),
44
'icp_min_height'
: LaunchConfiguration(
'icp_min_height'
),
45
'rtabmap_initial_pose'
:
'0 0 0 0 0 0'
,
46
}.items()),
47
Node(
48
package=
'coverage'
, executable=
'coverage_monitor'
,
49
name=
'coverage_monitor'
, output=
'screen'
,
50
parameters=[{
51
'use_sim_time'
:
True
,
52
'profile'
:
'sensor'
,
53
'diagnostic_stage'
: LaunchConfiguration(
'stage'
),
54
}],
55
condition=IfCondition(LaunchConfiguration(
'enable_monitor'
))),
56
])
diagnose_3d.generate_launch_description
generate_launch_description()
定義
diagnose_3d.launch.py:14
launch
diagnose_3d.launch.py
構築:
1.18.0