From 07db7d5900c716c368ab3ad4a567e3ced9d26c7f Mon Sep 17 00:00:00 2001 From: JeongBong Seo Date: Mon, 22 Apr 2019 11:47:16 +0900 Subject: [PATCH] DRAFT nav2-costmap-2d-0.1.7.inc: Fix compile errors --- .../navigation2/nav2-costmap-2d-0.1.7.inc | 7 ++++ .../0001-Fix-build-errors.patch | 39 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 includes-ros2/navigation2/nav2-costmap-2d-0.1.7.inc create mode 100644 includes-ros2/navigation2/nav2-costmap-2d/0001-Fix-build-errors.patch diff --git a/includes-ros2/navigation2/nav2-costmap-2d-0.1.7.inc b/includes-ros2/navigation2/nav2-costmap-2d-0.1.7.inc new file mode 100644 index 0000000..0ef06dc --- /dev/null +++ b/includes-ros2/navigation2/nav2-costmap-2d-0.1.7.inc @@ -0,0 +1,7 @@ +# Copyright (c) 2019 LG Electronics, Inc. + +FILESEXTRAPATHS_prepend := "${THISDIR}/nav2-costmap-2d:" + +SRC_URI += " \ + file://0001-Fix-build-errors.patch \ +" diff --git a/includes-ros2/navigation2/nav2-costmap-2d/0001-Fix-build-errors.patch b/includes-ros2/navigation2/nav2-costmap-2d/0001-Fix-build-errors.patch new file mode 100644 index 0000000..0dab429 --- /dev/null +++ b/includes-ros2/navigation2/nav2-costmap-2d/0001-Fix-build-errors.patch @@ -0,0 +1,39 @@ +From eb5c6d1ec04594d4de74ef0c98955b337a9f8b4d Mon Sep 17 00:00:00 2001 +From: JeongBong Seo +Date: Mon, 22 Apr 2019 11:45:05 +0900 +Subject: Fix build errors + +--- + plugins/static_layer.cpp | 2 +- + src/costmap_2d_ros.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins/static_layer.cpp b/plugins/static_layer.cpp +index 8102458..857fded 100644 +--- a/plugins/static_layer.cpp ++++ b/plugins/static_layer.cpp +@@ -327,7 +327,7 @@ void StaticLayer::updateCosts( + geometry_msgs::msg::TransformStamped transform; + try { + transform = tf_->lookupTransform(map_frame_, global_frame_, tf2::TimePointZero); +- } catch (tf2::TransformException ex) { ++ } catch (tf2::TransformException & ex) { + RCLCPP_ERROR(node_->get_logger(), "%s", ex.what()); + return; + } +diff --git a/src/costmap_2d_ros.cpp b/src/costmap_2d_ros.cpp +index bbb2265..85c5aeb 100644 +--- a/src/costmap_2d_ros.cpp ++++ b/src/costmap_2d_ros.cpp +@@ -249,7 +249,7 @@ void Costmap2DROS::reconfigureCB() + + // If the padding has changed, call setUnpaddedRobotFootprint() to + // re-apply the padding. +- float footprint_padding; ++ float footprint_padding = .0f; + dynamic_param_client_->get_event_param("footprint_padding", footprint_padding); + + if (footprint_padding_ != footprint_padding) { +-- +2.17.1 +