mirs
Toggle main menu visibility
読み取り中…
検索中…
一致する文字列を見つけられません
ekf_slam_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で統合し、SLAM Toolboxによる地図作成と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
# mirs_launch.py
38
IncludeLaunchDescription(
39
PythonLaunchDescriptionSource(
40
PathJoinSubstitution([mirs_pkg,
'launch'
,
'mirs_launch.py'
])
41
),
42
launch_arguments={
43
'enable_slam_toolbox'
:
'true'
,
44
'enable_rviz'
:
'true'
,
45
'enable_ekf_local'
:
'true'
,
46
'enable_static_base_link_to_imu_link_tf'
:
'true'
,
47
}.items()
48
)
49
])
ekf_slam_launch.generate_launch_description
generate_launch_description()
定義
ekf_slam_launch.py:31
launch
ekf_slam_launch.py
構築:
1.18.0