Removed not used octomap_ros dependency

This commit is contained in:
matlabbe
2018-09-29 13:51:48 -04:00
parent ec97b3c83d
commit bc0a13748c
5 changed files with 30 additions and 30 deletions
+10 -10
View File
@@ -24,7 +24,7 @@ find_package(catkin REQUIRED COMPONENTS
# Optional components # Optional components
find_package(costmap_2d) find_package(costmap_2d)
find_package(octomap_ros) find_package(octomap_msgs)
find_package(rviz) find_package(rviz)
find_package(find_object_2d) find_package(find_object_2d)
@@ -128,9 +128,9 @@ SET(optional_dependencies "")
IF(costmap_2d_FOUND) IF(costmap_2d_FOUND)
SET(optional_dependencies ${optional_dependencies} costmap_2d) SET(optional_dependencies ${optional_dependencies} costmap_2d)
ENDIF(costmap_2d_FOUND) ENDIF(costmap_2d_FOUND)
IF(octomap_ros_FOUND) IF(octomap_msgs_FOUND)
SET(optional_dependencies ${optional_dependencies} octomap_ros) SET(optional_dependencies ${optional_dependencies} octomap_msgs)
ENDIF(octomap_ros_FOUND) ENDIF(octomap_msgs_FOUND)
IF(rviz_FOUND) IF(rviz_FOUND)
SET(optional_dependencies ${optional_dependencies} rviz) SET(optional_dependencies ${optional_dependencies} rviz)
ENDIF(rviz_FOUND) ENDIF(rviz_FOUND)
@@ -219,17 +219,17 @@ SET(rtabmap_ros_lib_src
ENDIF(costmap_2d_FOUND) ENDIF(costmap_2d_FOUND)
# If octomap is found, add definition # If octomap is found, add definition
IF(octomap_ros_FOUND) IF(octomap_msgs_FOUND)
MESSAGE(STATUS "WITH octomap") MESSAGE(STATUS "WITH octomap_msgs")
include_directories( include_directories(
${octomap_ros_INCLUDE_DIRS} ${octomap_msgs_INCLUDE_DIRS}
) )
SET(Libraries SET(Libraries
${octomap_ros_LIBRARIES} ${octomap_msgs_LIBRARIES}
${Libraries} ${Libraries}
) )
ADD_DEFINITIONS("-DWITH_OCTOMAP_ROS") ADD_DEFINITIONS("-DWITH_OCTOMAP_MSGS")
ENDIF(octomap_ros_FOUND) ENDIF(octomap_msgs_FOUND)
IF(QT4_FOUND OR Qt5_FOUND) IF(QT4_FOUND OR Qt5_FOUND)
SET(Libraries SET(Libraries
+3 -3
View File
@@ -57,7 +57,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "MapsManager.h" #include "MapsManager.h"
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
#include <octomap_msgs/GetOctomap.h> #include <octomap_msgs/GetOctomap.h>
#endif #endif
@@ -160,7 +160,7 @@ private:
bool cancelGoalCallback(std_srvs::Empty::Request& req, std_srvs::Empty::Response& res); bool cancelGoalCallback(std_srvs::Empty::Request& req, std_srvs::Empty::Response& res);
bool setLabelCallback(rtabmap_ros::SetLabel::Request& req, rtabmap_ros::SetLabel::Response& res); bool setLabelCallback(rtabmap_ros::SetLabel::Request& req, rtabmap_ros::SetLabel::Response& res);
bool listLabelsCallback(rtabmap_ros::ListLabels::Request& req, rtabmap_ros::ListLabels::Response& res); bool listLabelsCallback(rtabmap_ros::ListLabels::Request& req, rtabmap_ros::ListLabels::Response& res);
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
bool octomapBinaryCallback(octomap_msgs::GetOctomap::Request &req, octomap_msgs::GetOctomap::Response &res); bool octomapBinaryCallback(octomap_msgs::GetOctomap::Request &req, octomap_msgs::GetOctomap::Response &res);
bool octomapFullCallback(octomap_msgs::GetOctomap::Request &req, octomap_msgs::GetOctomap::Response &res); bool octomapFullCallback(octomap_msgs::GetOctomap::Request &req, octomap_msgs::GetOctomap::Response &res);
#endif #endif
@@ -256,7 +256,7 @@ private:
ros::ServiceServer cancelGoalSrv_; ros::ServiceServer cancelGoalSrv_;
ros::ServiceServer setLabelSrv_; ros::ServiceServer setLabelSrv_;
ros::ServiceServer listLabelsSrv_; ros::ServiceServer listLabelsSrv_;
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
ros::ServiceServer octomapBinarySrv_; ros::ServiceServer octomapBinarySrv_;
ros::ServiceServer octomapFullSrv_; ros::ServiceServer octomapFullSrv_;
#endif #endif
+2 -2
View File
@@ -38,7 +38,7 @@
<build_depend>rtabmap</build_depend> <build_depend>rtabmap</build_depend>
<build_depend>move_base_msgs</build_depend> <build_depend>move_base_msgs</build_depend>
<build_depend>costmap_2d</build_depend> <build_depend>costmap_2d</build_depend>
<build_depend>octomap_ros</build_depend> <build_depend>octomap_msgs</build_depend>
<build_depend>image_geometry</build_depend> <build_depend>image_geometry</build_depend>
<build_depend>find_object_2d</build_depend> <build_depend>find_object_2d</build_depend>
<build_depend>message_generation</build_depend> <build_depend>message_generation</build_depend>
@@ -71,7 +71,7 @@
<run_depend>rtabmap</run_depend> <run_depend>rtabmap</run_depend>
<run_depend>move_base_msgs</run_depend> <run_depend>move_base_msgs</run_depend>
<run_depend>costmap_2d</run_depend> <run_depend>costmap_2d</run_depend>
<run_depend>octomap_ros</run_depend> <run_depend>octomap_msgs</run_depend>
<run_depend>image_geometry</run_depend> <run_depend>image_geometry</run_depend>
<run_depend>find_object_2d</run_depend> <run_depend>find_object_2d</run_depend>
<run_depend>message_runtime</run_depend> <run_depend>message_runtime</run_depend>
+3 -3
View File
@@ -59,7 +59,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <rtabmap/core/Registration.h> #include <rtabmap/core/Registration.h>
#include <rtabmap/core/Graph.h> #include <rtabmap/core/Graph.h>
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
#ifdef RTABMAP_OCTOMAP #ifdef RTABMAP_OCTOMAP
#include <octomap_msgs/conversions.h> #include <octomap_msgs/conversions.h>
#include <rtabmap/core/OctoMap.h> #include <rtabmap/core/OctoMap.h>
@@ -532,7 +532,7 @@ void CoreWrapper::onInit()
cancelGoalSrv_ = nh.advertiseService("cancel_goal", &CoreWrapper::cancelGoalCallback, this); cancelGoalSrv_ = nh.advertiseService("cancel_goal", &CoreWrapper::cancelGoalCallback, this);
setLabelSrv_ = nh.advertiseService("set_label", &CoreWrapper::setLabelCallback, this); setLabelSrv_ = nh.advertiseService("set_label", &CoreWrapper::setLabelCallback, this);
listLabelsSrv_ = nh.advertiseService("list_labels", &CoreWrapper::listLabelsCallback, this); listLabelsSrv_ = nh.advertiseService("list_labels", &CoreWrapper::listLabelsCallback, this);
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
#ifdef RTABMAP_OCTOMAP #ifdef RTABMAP_OCTOMAP
octomapBinarySrv_ = nh.advertiseService("octomap_binary", &CoreWrapper::octomapBinaryCallback, this); octomapBinarySrv_ = nh.advertiseService("octomap_binary", &CoreWrapper::octomapBinaryCallback, this);
octomapFullSrv_ = nh.advertiseService("octomap_full", &CoreWrapper::octomapFullCallback, this); octomapFullSrv_ = nh.advertiseService("octomap_full", &CoreWrapper::octomapFullCallback, this);
@@ -2889,7 +2889,7 @@ void CoreWrapper::publishGlobalPath(const ros::Time & stamp)
} }
} }
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
#ifdef RTABMAP_OCTOMAP #ifdef RTABMAP_OCTOMAP
bool CoreWrapper::octomapBinaryCallback( bool CoreWrapper::octomapBinaryCallback(
octomap_msgs::GetOctomap::Request &req, octomap_msgs::GetOctomap::Request &req,
+12 -12
View File
@@ -46,7 +46,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <pcl_conversions/pcl_conversions.h> #include <pcl_conversions/pcl_conversions.h>
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
#ifdef RTABMAP_OCTOMAP #ifdef RTABMAP_OCTOMAP
#include <octomap_msgs/conversions.h> #include <octomap_msgs/conversions.h>
#include <octomap/ColorOcTree.h> #include <octomap/ColorOcTree.h>
@@ -104,7 +104,7 @@ void MapsManager::init(ros::NodeHandle & nh, ros::NodeHandle & pnh, const std::s
ROS_INFO("%s(maps): cloud_subtract_filtering = %s", name.c_str(), cloudSubtractFiltering_?"true":"false"); ROS_INFO("%s(maps): cloud_subtract_filtering = %s", name.c_str(), cloudSubtractFiltering_?"true":"false");
ROS_INFO("%s(maps): cloud_subtract_filtering_min_neighbors = %d", name.c_str(), cloudSubtractFilteringMinNeighbors_); ROS_INFO("%s(maps): cloud_subtract_filtering_min_neighbors = %d", name.c_str(), cloudSubtractFilteringMinNeighbors_);
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
#ifdef RTABMAP_OCTOMAP #ifdef RTABMAP_OCTOMAP
octomap_ = new OctoMap(occupancyGrid_->getCellSize(), 0.5, occupancyGrid_->isFullUpdate(), occupancyGrid_->getUpdateError()); octomap_ = new OctoMap(occupancyGrid_->getCellSize(), 0.5, occupancyGrid_->isFullUpdate(), occupancyGrid_->getUpdateError());
pnh.param("octomap_tree_depth", octomapTreeDepth_, octomapTreeDepth_); pnh.param("octomap_tree_depth", octomapTreeDepth_, octomapTreeDepth_);
@@ -148,7 +148,7 @@ void MapsManager::init(ros::NodeHandle & nh, ros::NodeHandle & pnh, const std::s
projMapPub_ = nht->advertise<nav_msgs::OccupancyGrid>("proj_map", 1, latch); projMapPub_ = nht->advertise<nav_msgs::OccupancyGrid>("proj_map", 1, latch);
scanMapPub_ = nht->advertise<sensor_msgs::PointCloud2>("scan_map", 1, latch); scanMapPub_ = nht->advertise<sensor_msgs::PointCloud2>("scan_map", 1, latch);
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
#ifdef RTABMAP_OCTOMAP #ifdef RTABMAP_OCTOMAP
octoMapPubBin_ = nht->advertise<octomap_msgs::Octomap>("octomap_binary", 1, latch); octoMapPubBin_ = nht->advertise<octomap_msgs::Octomap>("octomap_binary", 1, latch);
octoMapPubFull_ = nht->advertise<octomap_msgs::Octomap>("octomap_full", 1, latch); octoMapPubFull_ = nht->advertise<octomap_msgs::Octomap>("octomap_full", 1, latch);
@@ -166,7 +166,7 @@ MapsManager::~MapsManager() {
delete occupancyGrid_; delete occupancyGrid_;
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
#ifdef RTABMAP_OCTOMAP #ifdef RTABMAP_OCTOMAP
if(octomap_) if(octomap_)
{ {
@@ -265,7 +265,7 @@ void MapsManager::backwardCompatibilityParameters(ros::NodeHandle & pnh, Paramet
parameterMoved(pnh, "grid_eroded", Parameters::kGridGlobalEroded(), parameters); parameterMoved(pnh, "grid_eroded", Parameters::kGridGlobalEroded(), parameters);
parameterMoved(pnh, "grid_footprint_radius", Parameters::kGridGlobalFootprintRadius(), parameters); parameterMoved(pnh, "grid_footprint_radius", Parameters::kGridGlobalFootprintRadius(), parameters);
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
#ifdef RTABMAP_OCTOMAP #ifdef RTABMAP_OCTOMAP
parameterMoved(pnh, "octomap_ground_is_obstacle", Parameters::kGridGroundIsObstacle(), parameters); parameterMoved(pnh, "octomap_ground_is_obstacle", Parameters::kGridGroundIsObstacle(), parameters);
parameterMoved(pnh, "octomap_occupancy_thr", Parameters::kGridGlobalOccupancyThr(), parameters); parameterMoved(pnh, "octomap_occupancy_thr", Parameters::kGridGlobalOccupancyThr(), parameters);
@@ -278,7 +278,7 @@ void MapsManager::setParameters(const rtabmap::ParametersMap & parameters)
parameters_ = parameters; parameters_ = parameters;
occupancyGrid_->parseParameters(parameters_); occupancyGrid_->parseParameters(parameters_);
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
#ifdef RTABMAP_OCTOMAP #ifdef RTABMAP_OCTOMAP
if(octomap_) if(octomap_)
{ {
@@ -351,7 +351,7 @@ void MapsManager::clear()
groundClouds_.clear(); groundClouds_.clear();
obstacleClouds_.clear(); obstacleClouds_.clear();
occupancyGrid_->clear(); occupancyGrid_->clear();
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
#ifdef RTABMAP_OCTOMAP #ifdef RTABMAP_OCTOMAP
octomap_->clear(); octomap_->clear();
#endif #endif
@@ -418,7 +418,7 @@ std::map<int, rtabmap::Transform> MapsManager::updateMapCaches(
scanMapPub_.getNumSubscribers() != 0; scanMapPub_.getNumSubscribers() != 0;
} }
#ifndef WITH_OCTOMAP_ROS #ifndef WITH_OCTOMAP_MSGS
updateOctomap = false; updateOctomap = false;
#endif #endif
#ifndef RTABMAP_OCTOMAP #ifndef RTABMAP_OCTOMAP
@@ -487,7 +487,7 @@ std::map<int, rtabmap::Transform> MapsManager::updateMapCaches(
ROS_WARN("Many occupancy grids should be loaded (~%d), this may take a while to update the map(s)...", int(filteredPoses.size()-gridMaps_.size())); ROS_WARN("Many occupancy grids should be loaded (~%d), this may take a while to update the map(s)...", int(filteredPoses.size()-gridMaps_.size()));
longUpdate = true; longUpdate = true;
} }
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
#ifdef RTABMAP_OCTOMAP #ifdef RTABMAP_OCTOMAP
if(updateOctomap && octomap_->addedNodes().size() < 5) if(updateOctomap && octomap_->addedNodes().size() < 5)
{ {
@@ -642,7 +642,7 @@ std::map<int, rtabmap::Transform> MapsManager::updateMapCaches(
} }
} }
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
#ifdef RTABMAP_OCTOMAP #ifdef RTABMAP_OCTOMAP
if(updateOctomap && if(updateOctomap &&
(iter->first < 0 || (iter->first < 0 ||
@@ -680,7 +680,7 @@ std::map<int, rtabmap::Transform> MapsManager::updateMapCaches(
occupancyGrid_->update(filteredPoses); occupancyGrid_->update(filteredPoses);
} }
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
#ifdef RTABMAP_OCTOMAP #ifdef RTABMAP_OCTOMAP
if(updateOctomap) if(updateOctomap)
{ {
@@ -1108,7 +1108,7 @@ void MapsManager::publishMaps(
obstacleClouds_.clear(); obstacleClouds_.clear();
} }
#ifdef WITH_OCTOMAP_ROS #ifdef WITH_OCTOMAP_MSGS
#ifdef RTABMAP_OCTOMAP #ifdef RTABMAP_OCTOMAP
if(octoMapPubBin_.getNumSubscribers() || if(octoMapPubBin_.getNumSubscribers() ||
octoMapPubFull_.getNumSubscribers() || octoMapPubFull_.getNumSubscribers() ||