Skip to content

Commit 35a0f32

Browse files
committed
Use already-existing boolean for removing or keeping the static layer
Signed-off-by: Rosalie <rosalie.van.ark@alliander.com>
1 parent 0139a4e commit 35a0f32

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • alliander_robotics/alliander_nav2/src/alliander_nav2/launch

alliander_robotics/alliander_nav2/src/alliander_nav2/launch/nav2.launch.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,13 @@ def launch_setup(context: LaunchContext) -> list: # noqa: PLR0912, PLR0915
4949
# Define configuration:
5050
lifecycle_nodes_names = []
5151
use_map_localization = True
52-
use_slam_map_localization = False
5352
plugins = ["static_layer", "obstacle_layer", "inflation_layer"]
5453

5554
if nav2.collision_monitor:
5655
lifecycle_nodes_names.append("collision_monitor")
5756
if nav2.slam:
5857
lifecycle_nodes_names.append("slam_toolbox")
5958
use_map_localization = False
60-
use_slam_map_localization = True
6159
if nav2.gps:
6260
if not namespace_gps:
6361
raise ValueError("Namespace for GPS must be provided when using GPS.")
@@ -70,7 +68,7 @@ def launch_setup(context: LaunchContext) -> list: # noqa: PLR0912, PLR0915
7068
"amcl",
7169
]
7270
)
73-
elif not use_slam_map_localization:
71+
elif not nav2.slam:
7472
plugins.remove("static_layer")
7573
lifecycle_nodes_names.extend(
7674
[

0 commit comments

Comments
 (0)