From 5c00ce5d0e75aa529f47932ba177c39eceb16811 Mon Sep 17 00:00:00 2001
From: bpwilcox <bpwilcox@eng.ucsd.edu>
Date: Fri, 31 May 2019 10:14:57 -0700
Subject: [PATCH] re-enable obstacle layer (#762)

---
 nav2_bringup/launch/nav2_params.yaml       | 4 ++--
 nav2_costmap_2d/plugins/obstacle_layer.cpp | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/nav2_bringup/launch/nav2_params.yaml b/nav2_bringup/launch/nav2_params.yaml
index e3d53837..cfbfcae1 100644
--- a/nav2_bringup/launch/nav2_params.yaml
+++ b/nav2_bringup/launch/nav2_params.yaml
@@ -95,7 +95,7 @@ local_costmap:
       robot_radius: 0.17
       inflation_layer.cost_scaling_factor: 3.0
       obstacle_layer:
-        enabled: False
+        enabled: True
       always_send_full_costmap: True
       observation_sources: scan
       scan:
@@ -119,7 +119,7 @@ global_costmap:
     ros__parameters:
       robot_radius: 0.17
       obstacle_layer:
-        enabled: False
+        enabled: True
       always_send_full_costmap: True
       observation_sources: scan
       scan:
diff --git a/nav2_costmap_2d/plugins/obstacle_layer.cpp b/nav2_costmap_2d/plugins/obstacle_layer.cpp
index eabdced3..3097a907 100644
--- a/nav2_costmap_2d/plugins/obstacle_layer.cpp
+++ b/nav2_costmap_2d/plugins/obstacle_layer.cpp
@@ -186,7 +186,7 @@ void ObstacleLayer::onInitialize()
       source.c_str(), topic.c_str(),
       global_frame_.c_str(), expected_update_rate, observation_keep_time);
 
-    rmw_qos_profile_t custom_qos_profile = rmw_qos_profile_default;
+    rmw_qos_profile_t custom_qos_profile = rmw_qos_profile_sensor_data;
     custom_qos_profile.depth = 50;
 
     // create a callback for the topic
-- 
GitLab