From 6459053e3b41f549bd58f62f3ee474444438fd6b Mon Sep 17 00:00:00 2001 From: JeongBong Seo Date: Mon, 1 Apr 2019 14:47:13 +0900 Subject: [PATCH] DRAFT nav2-map-server-0.1.7.inc: Remove bullet dependency Backport https://github.com/ros-planning/navigation2/pull/594 --- .../navigation2/nav2-map-server-0.1.7.inc | 11 +++ ...ullet-dependency-from-map_server-594.patch | 79 +++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 includes-ros2/navigation2/nav2-map-server-0.1.7.inc create mode 100644 includes-ros2/navigation2/nav2-map-server/0001-removed-bullet-dependency-from-map_server-594.patch diff --git a/includes-ros2/navigation2/nav2-map-server-0.1.7.inc b/includes-ros2/navigation2/nav2-map-server-0.1.7.inc new file mode 100644 index 0000000..b2ed1b7 --- /dev/null +++ b/includes-ros2/navigation2/nav2-map-server-0.1.7.inc @@ -0,0 +1,11 @@ +# Copyright (c) 2019 LG Electronics, Inc. + +# bullet appears in both ROS_BUILD_DEPENDS and ROS_EXPORT_DEPENDS, so it's easier to remove it from DEPENDS. +DEPENDS_remove = "bullet" +ROS_EXEC_DEPENDS_remove = "bullet" + +FILESEXTRAPATHS_prepend := "${THISDIR}/nav2-map-server:" + +SRC_URI += " \ + file://0001-removed-bullet-dependency-from-map_server-594.patch \ +" diff --git a/includes-ros2/navigation2/nav2-map-server/0001-removed-bullet-dependency-from-map_server-594.patch b/includes-ros2/navigation2/nav2-map-server/0001-removed-bullet-dependency-from-map_server-594.patch new file mode 100644 index 0000000..38589c2 --- /dev/null +++ b/includes-ros2/navigation2/nav2-map-server/0001-removed-bullet-dependency-from-map_server-594.patch @@ -0,0 +1,79 @@ +From abae137977a7177704343d81814e863070986ab5 Mon Sep 17 00:00:00 2001 +From: Alberto Soragna +Date: Thu, 7 Mar 2019 20:47:48 +0000 +Subject: removed bullet dependency from map_server (#594) + +--- + CMakeLists.txt | 3 --- + package.xml | 1 - + src/occ_grid_loader.cpp | 7 +++---- + 3 files changed, 3 insertions(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cd7724a..bed6272 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,7 +5,6 @@ find_package(ament_cmake REQUIRED) + find_package(nav2_common REQUIRED) + find_package(rclcpp REQUIRED) + find_package(nav_msgs REQUIRED) +-find_package(Bullet REQUIRED) + find_package(SDL REQUIRED) + find_package(SDL_image REQUIRED) + find_package(yaml_cpp_vendor REQUIRED) +@@ -16,7 +15,6 @@ nav2_package() + + include_directories( + include +- ${BULLET_INCLUDE_DIRS} + ${SDL_INCLUDE_DIR} + ${SDL_IMAGE_INCLUDE_DIRS} + ) +@@ -76,7 +74,6 @@ target_link_libraries(${map_saver_executable} + ) + + target_link_libraries(${library_name} +- ${BULLET_LIBRARIES} + ${SDL_LIBRARY} + ${SDL_IMAGE_LIBRARIES} + ) +diff --git a/package.xml b/package.xml +index 107c0d7..8a65c81 100644 +--- a/package.xml ++++ b/package.xml +@@ -12,7 +12,6 @@ + ament_cmake + nav2_common + +- bullet + nav_msgs + std_msgs + rclcpp +diff --git a/src/occ_grid_loader.cpp b/src/occ_grid_loader.cpp +index 76b43b2..ae32b63 100644 +--- a/src/occ_grid_loader.cpp ++++ b/src/occ_grid_loader.cpp +@@ -39,7 +39,7 @@ + #include + #include + +-#include "LinearMath/btQuaternion.h" ++#include "tf2/LinearMath/Quaternion.h" + #include "SDL/SDL_image.h" + + using namespace std::chrono_literals; +@@ -136,9 +136,8 @@ void OccGridLoader::loadMapFromFile(const std::string & map_name) + msg_.info.origin.position.x = origin_[0]; + msg_.info.origin.position.y = origin_[1]; + msg_.info.origin.position.z = 0.0; +- btQuaternion q; +- // setEulerZYX(yaw, pitch, roll) +- q.setEulerZYX(origin_[2], 0, 0); ++ tf2::Quaternion q; ++ q.setRPY(0, 0, origin_[2]); + msg_.info.origin.orientation.x = q.x(); + msg_.info.origin.orientation.y = q.y(); + msg_.info.origin.orientation.z = q.z(); +-- +2.17.1 +