Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions src/rosmac/assets/presets/nav2-diffbot/nav2-diffbot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ def generate_launch_description():
pkg_nav2 = get_package_share_directory("nav2_bringup")

gz_sim = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(pkg_ros_gz_sim, "launch", "gz_sim.launch.py")
),
PythonLaunchDescriptionSource(os.path.join(pkg_ros_gz_sim, "launch", "gz_sim.launch.py")),
launch_arguments={"gz_args": f"-s --headless-rendering -r {WORLD}"}.items(),
)

Expand All @@ -54,36 +52,36 @@ def generate_launch_description():
("/model/vehicle_blue/odometry", "/odom"),
("/model/vehicle_blue/tf", "/tf"),
],
parameters=[
{"qos_overrides./model/vehicle_blue.subscriber.reliability": "reliable"}
],
parameters=[{"qos_overrides./model/vehicle_blue.subscriber.reliability": "reliable"}],
output="screen",
)

static_tf = Node(
package="tf2_ros",
executable="static_transform_publisher",
arguments=[
"--x", "0.648573", "--z", "0.675",
"--frame-id", "base_link", "--child-frame-id", "lidar_link",
"--x",
"0.648573",
"--z",
"0.675",
"--frame-id",
"base_link",
"--child-frame-id",
"lidar_link",
],
parameters=[{"use_sim_time": True}],
)

slam = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(pkg_slam, "launch", "online_async_launch.py")
),
PythonLaunchDescriptionSource(os.path.join(pkg_slam, "launch", "online_async_launch.py")),
launch_arguments={
"use_sim_time": "true",
"slam_params_file": SLAM_PARAMS,
}.items(),
)

nav2 = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(pkg_nav2, "launch", "navigation_launch.py")
),
PythonLaunchDescriptionSource(os.path.join(pkg_nav2, "launch", "navigation_launch.py")),
launch_arguments={"use_sim_time": "true"}.items(),
)

Expand Down
4 changes: 3 additions & 1 deletion src/rosmac/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ def _start_viz(cfg: Config) -> None:

@app.command()
def viz(
layout: str | None = typer.Option(None, "--layout", help="Preset layout name (panda|diffbot|nav2)"),
layout: str | None = typer.Option(
None, "--layout", help="Preset layout name (panda|diffbot|nav2)"
),
) -> None:
"""Connect Foxglove visualization (start VM foxglove_bridge + open app)."""
cfg = load()
Expand Down
8 changes: 6 additions & 2 deletions tests/unit/test_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ def test_ensure_installed_only_missing(monkeypatch) -> None:
cfg = Config()
monkeypatch.setattr(deps, "installed_packages", lambda _cfg: {"ros-humble-nav2-msgs"})
called: list[list[str]] = []
monkeypatch.setattr(deps, "install_missing", lambda _cfg, pkgs, timeout=1800: called.append(pkgs))
monkeypatch.setattr(
deps, "install_missing", lambda _cfg, pkgs, timeout=1800: called.append(pkgs)
)
# 이미 있는 것 + 없는 것 → 없는 것만 설치, 반환
out = deps.ensure_installed(cfg, ["ros-humble-nav2-msgs", "ros-humble-moveit-msgs"])
assert out == ["ros-humble-moveit-msgs"]
Expand All @@ -38,7 +40,9 @@ def test_ensure_installed_noop_when_all_present(monkeypatch) -> None:
cfg = Config()
monkeypatch.setattr(deps, "installed_packages", lambda _cfg: {"ros-humble-nav2-msgs"})
called: list[list[str]] = []
monkeypatch.setattr(deps, "install_missing", lambda _cfg, pkgs, timeout=1800: called.append(pkgs))
monkeypatch.setattr(
deps, "install_missing", lambda _cfg, pkgs, timeout=1800: called.append(pkgs)
)
assert deps.ensure_installed(cfg, ["ros-humble-nav2-msgs"]) == []
assert deps.ensure_installed(cfg, []) == []
assert called == [] # 전부 있으면 micromamba install 호출 안 함 (멱등)
Expand Down
Loading