mirs
Toggle main menu visibility
読み取り中…
検索中…
一致する文字列を見つけられません
ekf_nav_launch.py
[詳解]
1
2
# Copyright 2026 mirs260x
3
#
4
# Permission is hereby granted, free of charge, to any person obtaining a copy
5
# of this software and associated documentation files (the "Software"), to deal
6
# in the Software without restriction, including without limitation the rights
7
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
# copies of the Software, and to permit persons to whom the Software is
9
# furnished to do so, subject to the following conditions:
10
#
11
# The above copyright notice and this permission notice shall be included in
12
# all copies or substantial portions of the Software.
13
#
14
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
# THE SOFTWARE.
21
22
23
"""IMUと車輪オドメトリをEKFで統合し、Nav2による走行とRVizの表示を起動する。"""
24
from
launch
import
LaunchDescription
25
from
launch.actions
import
DeclareLaunchArgument, IncludeLaunchDescription
26
from
launch.launch_description_sources
import
PythonLaunchDescriptionSource
27
from
launch.substitutions
import
LaunchConfiguration, PathJoinSubstitution
28
from
launch_ros.substitutions
import
FindPackageShare
29
30
31
def
generate_launch_description
():
32
33
mirs_pkg = FindPackageShare(
'mirs'
)
34
35
return
LaunchDescription([
36
37
DeclareLaunchArgument(
38
'map'
,
39
default_value=PathJoinSubstitution([mirs_pkg,
'maps'
,
'es.yaml'
])
40
),
41
42
# mirs_launch.py
43
IncludeLaunchDescription(
44
PythonLaunchDescriptionSource(
45
PathJoinSubstitution([mirs_pkg,
'launch'
,
'mirs_launch.py'
])
46
),
47
launch_arguments={
48
'map'
: LaunchConfiguration(
'map'
),
49
'enable_rviz'
:
'true'
,
50
'enable_nav2'
:
'true'
,
51
'enable_ekf_local'
:
'true'
,
52
'enable_static_base_link_to_imu_link_tf'
:
'true'
,
53
}.items()
54
)
55
])
ekf_nav_launch.generate_launch_description
generate_launch_description()
定義
ekf_nav_launch.py:31
launch
ekf_nav_launch.py
構築:
1.18.0