feat: support Yahboom local Gazebo simulation
This commit is contained in:
@@ -4,7 +4,11 @@ LMS 전용 템플릿 저장소입니다. 설치 폴더: `[lms-nav2-yahboom-map]y
|
||||
|
||||
- 패키지: `yahboom_map`
|
||||
- 런치: `map.launch.py`
|
||||
- 이미지: `future-nav2:humble-yahboom`
|
||||
- 이미지: `future-nav2:humble-yahboom` (실차 기본)
|
||||
- 로컬 시뮬레이션: 빌드 전에 `sim_mode:=true`를 설정하면 LMS가
|
||||
`future-nav2-gazebo:humble`을 사용합니다. 기본값은 `false`입니다.
|
||||
- 시뮬레이션에서는 기존 NAV2-Gazebo에 `platform:=yahboom`을 설정하고
|
||||
NAV2-Yahboom 차량 모듈을 함께 실행합니다. 실차 Agent/Camera는 실행하지 않습니다.
|
||||
- 앱의 야붐 실행기 지원이 반영되어야 합니다.
|
||||
- 서버 과정의 야붐 전용 환경에 이 모듈과 이미지 아티팩트를 등록한 후
|
||||
LMS에서 설치 -> 빌드 -> 실행합니다.
|
||||
|
||||
@@ -4,12 +4,17 @@ from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument
|
||||
from launch.substitutions import LaunchConfiguration
|
||||
from launch_ros.actions import Node
|
||||
from launch_ros.parameter_descriptions import ParameterValue
|
||||
from nav2_common.launch import RewrittenYaml
|
||||
|
||||
def generate_launch_description():
|
||||
share = get_package_share_directory("yahboom_map")
|
||||
params = os.path.join(share, "params", "map.yaml")
|
||||
params = RewrittenYaml(source_file=params, root_key="",
|
||||
param_rewrites={"use_sim_time": LaunchConfiguration("sim_mode")},
|
||||
convert_types=True)
|
||||
nodes = [["nav2_map_server","map_server","map_server"]]
|
||||
actions = []
|
||||
actions = [DeclareLaunchArgument("sim_mode", default_value="false", choices=["true", "false"])]
|
||||
actions.append(DeclareLaunchArgument("map", description="Absolute path to a saved map YAML"))
|
||||
for package, executable, name in nodes:
|
||||
actions.append(Node(
|
||||
@@ -20,7 +25,7 @@ def generate_launch_description():
|
||||
actions.append(Node(
|
||||
package="nav2_lifecycle_manager", executable="lifecycle_manager",
|
||||
name="lifecycle_manager_yahboom_map", output="screen",
|
||||
parameters=[{"use_sim_time": False, "autostart": True,
|
||||
parameters=[{"use_sim_time": ParameterValue(LaunchConfiguration("sim_mode"), value_type=bool), "autostart": True,
|
||||
"node_names": [name for _, _, name in nodes]}],
|
||||
))
|
||||
return LaunchDescription(actions)
|
||||
|
||||
@@ -10,5 +10,6 @@
|
||||
<exec_depend>launch_ros</exec_depend>
|
||||
<exec_depend>ament_index_python</exec_depend>
|
||||
<exec_depend>nav2_bringup</exec_depend>
|
||||
<exec_depend>nav2_common</exec_depend>
|
||||
<export><build_type>ament_cmake</build_type></export>
|
||||
</package>
|
||||
|
||||
Reference in New Issue
Block a user