mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-05 01:07:49 +08:00
fixed MapsManager's topics not remapped when using rtabmap nodelet
This commit is contained in:
@@ -69,7 +69,7 @@ public:
|
|||||||
int getQueueSize() const {return queueSize_;}
|
int getQueueSize() const {return queueSize_;}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void setupCallbacks(ros::NodeHandle & nh, ros::NodeHandle & pnh);
|
void setupCallbacks(ros::NodeHandle & nh, ros::NodeHandle & pnh, const std::string & name);
|
||||||
virtual void commonDepthCallback(
|
virtual void commonDepthCallback(
|
||||||
const nav_msgs::OdometryConstPtr & odomMsg,
|
const nav_msgs::OdometryConstPtr & odomMsg,
|
||||||
const rtabmap_ros::UserDataConstPtr & userDataMsg,
|
const rtabmap_ros::UserDataConstPtr & userDataMsg,
|
||||||
@@ -154,6 +154,7 @@ private:
|
|||||||
bool subscribedToScan2d_;
|
bool subscribedToScan2d_;
|
||||||
bool subscribedToScan3d_;
|
bool subscribedToScan3d_;
|
||||||
bool subscribedToOdomInfo_;
|
bool subscribedToOdomInfo_;
|
||||||
|
std::string name_;
|
||||||
|
|
||||||
//for depth callback
|
//for depth callback
|
||||||
image_transport::SubscriberFilter imageSub_;
|
image_transport::SubscriberFilter imageSub_;
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
PREFIX##ExactSync_->registerCallback(boost::bind(&CommonDataSubscriber::PREFIX##Callback, this, _1, _2)); \
|
PREFIX##ExactSync_->registerCallback(boost::bind(&CommonDataSubscriber::PREFIX##Callback, this, _1, _2)); \
|
||||||
} \
|
} \
|
||||||
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s", \
|
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s", \
|
||||||
ros::this_node::getName().c_str(), \
|
name_.c_str(), \
|
||||||
APPROX?"approx":"exact", \
|
APPROX?"approx":"exact", \
|
||||||
SUB0.getTopic().c_str(), \
|
SUB0.getTopic().c_str(), \
|
||||||
SUB1.getTopic().c_str());
|
SUB1.getTopic().c_str());
|
||||||
@@ -119,7 +119,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
PREFIX##ExactSync_->registerCallback(boost::bind(&CommonDataSubscriber::PREFIX##Callback, this, _1, _2, _3)); \
|
PREFIX##ExactSync_->registerCallback(boost::bind(&CommonDataSubscriber::PREFIX##Callback, this, _1, _2, _3)); \
|
||||||
} \
|
} \
|
||||||
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s", \
|
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s", \
|
||||||
ros::this_node::getName().c_str(), \
|
name_.c_str(), \
|
||||||
APPROX?"approx":"exact", \
|
APPROX?"approx":"exact", \
|
||||||
SUB0.getTopic().c_str(), \
|
SUB0.getTopic().c_str(), \
|
||||||
SUB1.getTopic().c_str(), \
|
SUB1.getTopic().c_str(), \
|
||||||
@@ -139,7 +139,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
PREFIX##ExactSync_->registerCallback(boost::bind(&CommonDataSubscriber::PREFIX##Callback, this, _1, _2, _3, _4)); \
|
PREFIX##ExactSync_->registerCallback(boost::bind(&CommonDataSubscriber::PREFIX##Callback, this, _1, _2, _3, _4)); \
|
||||||
} \
|
} \
|
||||||
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s,\n %s", \
|
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s,\n %s", \
|
||||||
ros::this_node::getName().c_str(), \
|
name_.c_str(), \
|
||||||
APPROX?"approx":"exact", \
|
APPROX?"approx":"exact", \
|
||||||
SUB0.getTopic().c_str(), \
|
SUB0.getTopic().c_str(), \
|
||||||
SUB1.getTopic().c_str(), \
|
SUB1.getTopic().c_str(), \
|
||||||
@@ -160,7 +160,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
PREFIX##ExactSync_->registerCallback(boost::bind(&CommonDataSubscriber::PREFIX##Callback, this, _1, _2, _3, _4, _5)); \
|
PREFIX##ExactSync_->registerCallback(boost::bind(&CommonDataSubscriber::PREFIX##Callback, this, _1, _2, _3, _4, _5)); \
|
||||||
} \
|
} \
|
||||||
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s,\n %s,\n %s", \
|
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s,\n %s,\n %s", \
|
||||||
ros::this_node::getName().c_str(), \
|
name_.c_str(), \
|
||||||
approxSync?"approx":"exact", \
|
approxSync?"approx":"exact", \
|
||||||
SUB0.getTopic().c_str(), \
|
SUB0.getTopic().c_str(), \
|
||||||
SUB1.getTopic().c_str(), \
|
SUB1.getTopic().c_str(), \
|
||||||
@@ -182,7 +182,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
PREFIX##ExactSync_->registerCallback(boost::bind(&CommonDataSubscriber::PREFIX##Callback, this, _1, _2, _3, _4, _5, _6)); \
|
PREFIX##ExactSync_->registerCallback(boost::bind(&CommonDataSubscriber::PREFIX##Callback, this, _1, _2, _3, _4, _5, _6)); \
|
||||||
} \
|
} \
|
||||||
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s,\n %s,\n %s,\n %s", \
|
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s,\n %s,\n %s,\n %s", \
|
||||||
ros::this_node::getName().c_str(), \
|
name_.c_str(), \
|
||||||
APPROX?"approx":"exact", \
|
APPROX?"approx":"exact", \
|
||||||
SUB0.getTopic().c_str(), \
|
SUB0.getTopic().c_str(), \
|
||||||
SUB1.getTopic().c_str(), \
|
SUB1.getTopic().c_str(), \
|
||||||
|
|||||||
@@ -45,11 +45,12 @@ class OccupancyGrid;
|
|||||||
|
|
||||||
class MapsManager {
|
class MapsManager {
|
||||||
public:
|
public:
|
||||||
MapsManager(bool usePublicNamespace);
|
MapsManager();
|
||||||
virtual ~MapsManager();
|
virtual ~MapsManager();
|
||||||
|
void init(ros::NodeHandle & nh, ros::NodeHandle & pnh, const std::string & name, bool usePublicNamespace);
|
||||||
void clear();
|
void clear();
|
||||||
bool hasSubscribers() const;
|
bool hasSubscribers() const;
|
||||||
void backwardCompatibilityParameters(rtabmap::ParametersMap & parameters) const;
|
void backwardCompatibilityParameters(ros::NodeHandle & pnh, rtabmap::ParametersMap & parameters) const;
|
||||||
void setParameters(const rtabmap::ParametersMap & parameters);
|
void setParameters(const rtabmap::ParametersMap & parameters);
|
||||||
|
|
||||||
std::map<int, rtabmap::Transform> getFilteredPoses(
|
std::map<int, rtabmap::Transform> getFilteredPoses(
|
||||||
|
|||||||
@@ -123,13 +123,14 @@ CommonDataSubscriber::CommonDataSubscriber(bool gui) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void CommonDataSubscriber::setupCallbacks(ros::NodeHandle & nh, ros::NodeHandle & pnh)
|
void CommonDataSubscriber::setupCallbacks(ros::NodeHandle & nh, ros::NodeHandle & pnh, const std::string & name)
|
||||||
{
|
{
|
||||||
bool subscribeScan2d = false;
|
bool subscribeScan2d = false;
|
||||||
bool subscribeScan3d = false;
|
bool subscribeScan3d = false;
|
||||||
bool subscribeOdomInfo = false;
|
bool subscribeOdomInfo = false;
|
||||||
bool subscribeUserData = false;
|
bool subscribeUserData = false;
|
||||||
int rgbdCameras = 1;
|
int rgbdCameras = 1;
|
||||||
|
name_ = name;
|
||||||
|
|
||||||
// ROS related parameters (private)
|
// ROS related parameters (private)
|
||||||
pnh.param("subscribe_depth", subscribedToDepth_, subscribedToDepth_);
|
pnh.param("subscribe_depth", subscribedToDepth_, subscribedToDepth_);
|
||||||
@@ -201,9 +202,9 @@ void CommonDataSubscriber::setupCallbacks(ros::NodeHandle & nh, ros::NodeHandle
|
|||||||
rgbdCameras = 1;
|
rgbdCameras = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ROS_INFO("%s: queue_size = %d", ros::this_node::getName().c_str(), queueSize_);
|
ROS_INFO("%s: queue_size = %d", name.c_str(), queueSize_);
|
||||||
ROS_INFO("%s: rgbd_cameras = %d", ros::this_node::getName().c_str(), rgbdCameras);
|
ROS_INFO("%s: rgbd_cameras = %d", name.c_str(), rgbdCameras);
|
||||||
ROS_INFO("%s: approx_sync = %s", ros::this_node::getName().c_str(), approxSync_?"true":"false");
|
ROS_INFO("%s: approx_sync = %s", name.c_str(), approxSync_?"true":"false");
|
||||||
|
|
||||||
bool subscribeOdom = odomFrameId.empty();
|
bool subscribeOdom = odomFrameId.empty();
|
||||||
if(subscribedToDepth_)
|
if(subscribedToDepth_)
|
||||||
@@ -372,7 +373,7 @@ void CommonDataSubscriber::warningLoop()
|
|||||||
"published (\"$ rostopic hz my_topic\") and the timestamps in their "
|
"published (\"$ rostopic hz my_topic\") and the timestamps in their "
|
||||||
"header are set. If topics are coming from different computers, make sure "
|
"header are set. If topics are coming from different computers, make sure "
|
||||||
"the clocks of the computers are synchronized (\"ntpdate\"). %s%s",
|
"the clocks of the computers are synchronized (\"ntpdate\"). %s%s",
|
||||||
ros::this_node::getName().c_str(),
|
name_.c_str(),
|
||||||
approxSync_?
|
approxSync_?
|
||||||
uFormat("If topics are not published at the same rate, you could increase \"queue_size\" parameter (current=%d).", queueSize_).c_str():
|
uFormat("If topics are not published at the same rate, you could increase \"queue_size\" parameter (current=%d).", queueSize_).c_str():
|
||||||
"Parameter \"approx_sync\" is false, which means that input topics should have all the exact timestamp for the callback to be called.",
|
"Parameter \"approx_sync\" is false, which means that input topics should have all the exact timestamp for the callback to be called.",
|
||||||
|
|||||||
+5
-4
@@ -101,7 +101,6 @@ CoreWrapper::CoreWrapper() :
|
|||||||
scanCloudMaxPoints_(0),
|
scanCloudMaxPoints_(0),
|
||||||
scanCloudNormalK_(0),
|
scanCloudNormalK_(0),
|
||||||
mapToOdom_(rtabmap::Transform::getIdentity()),
|
mapToOdom_(rtabmap::Transform::getIdentity()),
|
||||||
mapsManager_(true),
|
|
||||||
transformThread_(0),
|
transformThread_(0),
|
||||||
tfThreadRunning_(false),
|
tfThreadRunning_(false),
|
||||||
stereoToDepth_(false),
|
stereoToDepth_(false),
|
||||||
@@ -119,6 +118,8 @@ void CoreWrapper::onInit()
|
|||||||
ros::NodeHandle & nh = getNodeHandle();
|
ros::NodeHandle & nh = getNodeHandle();
|
||||||
ros::NodeHandle & pnh = getPrivateNodeHandle();
|
ros::NodeHandle & pnh = getPrivateNodeHandle();
|
||||||
|
|
||||||
|
mapsManager_.init(nh, pnh, getName(), true);
|
||||||
|
|
||||||
bool publishTf = true;
|
bool publishTf = true;
|
||||||
double tfDelay = 0.05; // 20 Hz
|
double tfDelay = 0.05; // 20 Hz
|
||||||
double tfTolerance = 0.1; // 100 ms
|
double tfTolerance = 0.1; // 100 ms
|
||||||
@@ -331,7 +332,7 @@ void CoreWrapper::onInit()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Backward compatibility (MapsManager)
|
// Backward compatibility (MapsManager)
|
||||||
mapsManager_.backwardCompatibilityParameters(parameters_);
|
mapsManager_.backwardCompatibilityParameters(pnh, parameters_);
|
||||||
|
|
||||||
bool subscribeScan2d = false;
|
bool subscribeScan2d = false;
|
||||||
bool subscribeScan3d = false;
|
bool subscribeScan3d = false;
|
||||||
@@ -448,7 +449,7 @@ void CoreWrapper::onInit()
|
|||||||
Parameters::kOptimizerIterations().c_str(), mapFrameId_.c_str());
|
Parameters::kOptimizerIterations().c_str(), mapFrameId_.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
setupCallbacks(nh, pnh); // do it at the end
|
setupCallbacks(nh, pnh, getName()); // do it at the end
|
||||||
if(!this->isDataSubscribed())
|
if(!this->isDataSubscribed())
|
||||||
{
|
{
|
||||||
bool isRGBD = uStr2Bool(parameters_.at(Parameters::kRGBDEnabled()).c_str());
|
bool isRGBD = uStr2Bool(parameters_.at(Parameters::kRGBDEnabled()).c_str());
|
||||||
@@ -466,7 +467,7 @@ void CoreWrapper::onInit()
|
|||||||
image_transport::TransportHints hintsRgb("raw", ros::TransportHints(), rgb_pnh);
|
image_transport::TransportHints hintsRgb("raw", ros::TransportHints(), rgb_pnh);
|
||||||
defaultSub_ = rgb_it.subscribe("image", 1, &CoreWrapper::defaultCallback, this);
|
defaultSub_ = rgb_it.subscribe("image", 1, &CoreWrapper::defaultCallback, this);
|
||||||
|
|
||||||
NODELET_INFO("\n%s subscribed to:\n %s", ros::this_node::getName().c_str(), defaultSub_.getTopic().c_str());
|
NODELET_INFO("\n%s subscribed to:\n %s", getName().c_str(), defaultSub_.getTopic().c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -171,7 +171,7 @@ GuiWrapper::GuiWrapper(int & argc, char** argv) :
|
|||||||
goalPathSync_->registerCallback(boost::bind(&GuiWrapper::goalPathCallback, this, _1, _2));
|
goalPathSync_->registerCallback(boost::bind(&GuiWrapper::goalPathCallback, this, _1, _2));
|
||||||
goalReachedTopic_ = nh.subscribe("goal_reached", 1, &GuiWrapper::goalReachedCallback, this);
|
goalReachedTopic_ = nh.subscribe("goal_reached", 1, &GuiWrapper::goalReachedCallback, this);
|
||||||
|
|
||||||
setupCallbacks(nh, pnh); // do it at the end
|
setupCallbacks(nh, pnh, ros::this_node::getName()); // do it at the end
|
||||||
if(!this->isDataSubscribed())
|
if(!this->isDataSubscribed())
|
||||||
{
|
{
|
||||||
defaultSub_ = nh.subscribe("odom", queueSize_, &GuiWrapper::defaultCallback, this);
|
defaultSub_ = nh.subscribe("odom", queueSize_, &GuiWrapper::defaultCallback, this);
|
||||||
|
|||||||
@@ -49,12 +49,13 @@ class MapAssembler
|
|||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MapAssembler() :
|
MapAssembler()
|
||||||
mapsManager_(false)
|
|
||||||
{
|
{
|
||||||
ros::NodeHandle pnh("~");
|
ros::NodeHandle pnh("~");
|
||||||
|
|
||||||
ros::NodeHandle nh;
|
ros::NodeHandle nh;
|
||||||
|
|
||||||
|
mapsManager_.init(nh, pnh, ros::this_node::getName(), false);
|
||||||
|
|
||||||
mapDataTopic_ = nh.subscribe("mapData", 1, &MapAssembler::mapDataReceivedCallback, this);
|
mapDataTopic_ = nh.subscribe("mapData", 1, &MapAssembler::mapDataReceivedCallback, this);
|
||||||
|
|
||||||
// private service
|
// private service
|
||||||
|
|||||||
+25
-20
@@ -57,7 +57,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
using namespace rtabmap;
|
using namespace rtabmap;
|
||||||
|
|
||||||
MapsManager::MapsManager(bool usePublicNamespace) :
|
MapsManager::MapsManager() :
|
||||||
cloudOutputVoxelized_(true),
|
cloudOutputVoxelized_(true),
|
||||||
cloudSubtractFiltering_(false),
|
cloudSubtractFiltering_(false),
|
||||||
cloudSubtractFilteringMinNeighbors_(2),
|
cloudSubtractFilteringMinNeighbors_(2),
|
||||||
@@ -77,10 +77,10 @@ MapsManager::MapsManager(bool usePublicNamespace) :
|
|||||||
octomapTreeDepth_(16),
|
octomapTreeDepth_(16),
|
||||||
octomapOccupancyThr_(0.5)
|
octomapOccupancyThr_(0.5)
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
ros::NodeHandle nh;
|
void MapsManager::init(ros::NodeHandle & nh, ros::NodeHandle & pnh, const std::string & name, bool usePublicNamespace)
|
||||||
ros::NodeHandle pnh("~");
|
{
|
||||||
|
|
||||||
// common grid map stuff
|
// common grid map stuff
|
||||||
pnh.param("grid_cell_size", gridCellSize_, gridCellSize_); // m
|
pnh.param("grid_cell_size", gridCellSize_, gridCellSize_); // m
|
||||||
if(gridCellSize_ <= 0)
|
if(gridCellSize_ <= 0)
|
||||||
@@ -113,7 +113,6 @@ MapsManager::MapsManager(bool usePublicNamespace) :
|
|||||||
pnh.param("cloud_subtract_filtering", cloudSubtractFiltering_, cloudSubtractFiltering_);
|
pnh.param("cloud_subtract_filtering", cloudSubtractFiltering_, cloudSubtractFiltering_);
|
||||||
pnh.param("cloud_subtract_filtering_min_neighbors", cloudSubtractFilteringMinNeighbors_, cloudSubtractFilteringMinNeighbors_);
|
pnh.param("cloud_subtract_filtering_min_neighbors", cloudSubtractFilteringMinNeighbors_, cloudSubtractFilteringMinNeighbors_);
|
||||||
|
|
||||||
std::string name = ros::this_node::getName();
|
|
||||||
ROS_INFO("%s(maps): grid_cell_size = %f", name.c_str(), gridCellSize_);
|
ROS_INFO("%s(maps): grid_cell_size = %f", name.c_str(), gridCellSize_);
|
||||||
ROS_INFO("%s(maps): grid_incremental = %s", name.c_str(), gridIncremental_?"true":"false");
|
ROS_INFO("%s(maps): grid_incremental = %s", name.c_str(), gridIncremental_?"true":"false");
|
||||||
ROS_INFO("%s(maps): grid_size = %f", name.c_str(), gridSize_);
|
ROS_INFO("%s(maps): grid_size = %f", name.c_str(), gridSize_);
|
||||||
@@ -155,23 +154,31 @@ MapsManager::MapsManager(bool usePublicNamespace) :
|
|||||||
pnh.param("latch", latch, latch);
|
pnh.param("latch", latch, latch);
|
||||||
|
|
||||||
// mapping topics
|
// mapping topics
|
||||||
ros::NodeHandle nht(usePublicNamespace?"":"~");
|
ros::NodeHandle * nht;
|
||||||
gridMapPub_ = nht.advertise<nav_msgs::OccupancyGrid>("grid_map", 1, latch);
|
if(usePublicNamespace)
|
||||||
cloudMapPub_ = nht.advertise<sensor_msgs::PointCloud2>("cloud_map", 1, latch);
|
{
|
||||||
cloudObstaclesPub_ = nht.advertise<sensor_msgs::PointCloud2>("cloud_obstacles", 1, latch);
|
nht = &nh;
|
||||||
cloudGroundPub_ = nht.advertise<sensor_msgs::PointCloud2>("cloud_ground", 1, latch);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nht = &pnh;
|
||||||
|
}
|
||||||
|
gridMapPub_ = nht->advertise<nav_msgs::OccupancyGrid>("grid_map", 1, latch);
|
||||||
|
cloudMapPub_ = nht->advertise<sensor_msgs::PointCloud2>("cloud_map", 1, latch);
|
||||||
|
cloudObstaclesPub_ = nht->advertise<sensor_msgs::PointCloud2>("cloud_obstacles", 1, latch);
|
||||||
|
cloudGroundPub_ = nht->advertise<sensor_msgs::PointCloud2>("cloud_ground", 1, latch);
|
||||||
|
|
||||||
// deprecated
|
// deprecated
|
||||||
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_ROS
|
||||||
#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);
|
||||||
octoMapCloud_ = nht.advertise<sensor_msgs::PointCloud2>("octomap_occupied_space", 1, latch);
|
octoMapCloud_ = nht->advertise<sensor_msgs::PointCloud2>("octomap_occupied_space", 1, latch);
|
||||||
octoMapEmptySpace_ = nht.advertise<sensor_msgs::PointCloud2>("octomap_empty_space", 1, latch);
|
octoMapEmptySpace_ = nht->advertise<sensor_msgs::PointCloud2>("octomap_empty_space", 1, latch);
|
||||||
octoMapProj_ = nht.advertise<nav_msgs::OccupancyGrid>("octomap_grid", 1, latch);
|
octoMapProj_ = nht->advertise<nav_msgs::OccupancyGrid>("octomap_grid", 1, latch);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -234,10 +241,8 @@ void parameterMoved(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapsManager::backwardCompatibilityParameters(ParametersMap & parameters) const
|
void MapsManager::backwardCompatibilityParameters(ros::NodeHandle & pnh, ParametersMap & parameters) const
|
||||||
{
|
{
|
||||||
ros::NodeHandle pnh("~");
|
|
||||||
|
|
||||||
// removed
|
// removed
|
||||||
if(pnh.hasParam("cloud_frustum_culling"))
|
if(pnh.hasParam("cloud_frustum_culling"))
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -322,7 +322,7 @@ void OdometryROS::warningLoop(const std::string & subscribedTopicsMsg, bool appr
|
|||||||
ROS_WARN("%s: Did not receive data since 5 seconds! Make sure the input topics are "
|
ROS_WARN("%s: Did not receive data since 5 seconds! Make sure the input topics are "
|
||||||
"published (\"$ rostopic hz my_topic\") and the timestamps in their "
|
"published (\"$ rostopic hz my_topic\") and the timestamps in their "
|
||||||
"header are set. %s%s",
|
"header are set. %s%s",
|
||||||
ros::this_node::getName().c_str(),
|
getName().c_str(),
|
||||||
approxSync?"":"Parameter \"approx_sync\" is false, which means that input "
|
approxSync?"":"Parameter \"approx_sync\" is false, which means that input "
|
||||||
"topics should have all the exact timestamp for the callback to be called.",
|
"topics should have all the exact timestamp for the callback to be called.",
|
||||||
subscribedTopicsMsg.c_str());
|
subscribedTopicsMsg.c_str());
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ private:
|
|||||||
exactSync2_->registerCallback(boost::bind(&RGBDOdometry::callbackRGBD2, this, _1, _2));
|
exactSync2_->registerCallback(boost::bind(&RGBDOdometry::callbackRGBD2, this, _1, _2));
|
||||||
}
|
}
|
||||||
subscribedTopicsMsg = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s",
|
subscribedTopicsMsg = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s",
|
||||||
ros::this_node::getName().c_str(),
|
getName().c_str(),
|
||||||
approxSync?"approx":"exact",
|
approxSync?"approx":"exact",
|
||||||
rgbd_image1_sub_.getTopic().c_str(),
|
rgbd_image1_sub_.getTopic().c_str(),
|
||||||
rgbd_image2_sub_.getTopic().c_str());
|
rgbd_image2_sub_.getTopic().c_str());
|
||||||
@@ -153,7 +153,7 @@ private:
|
|||||||
|
|
||||||
subscribedTopicsMsg =
|
subscribedTopicsMsg =
|
||||||
uFormat("\n%s subscribed to:\n %s",
|
uFormat("\n%s subscribed to:\n %s",
|
||||||
ros::this_node::getName().c_str(),
|
getName().c_str(),
|
||||||
rgbdSub_.getTopic().c_str());
|
rgbdSub_.getTopic().c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,7 +184,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
subscribedTopicsMsg = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s",
|
subscribedTopicsMsg = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s",
|
||||||
ros::this_node::getName().c_str(),
|
getName().c_str(),
|
||||||
approxSync?"approx":"exact",
|
approxSync?"approx":"exact",
|
||||||
image_mono_sub_.getTopic().c_str(),
|
image_mono_sub_.getTopic().c_str(),
|
||||||
image_depth_sub_.getTopic().c_str(),
|
image_depth_sub_.getTopic().c_str(),
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
subscribedTopicsMsg = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s, \n %s",
|
subscribedTopicsMsg = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s, \n %s",
|
||||||
ros::this_node::getName().c_str(),
|
getName().c_str(),
|
||||||
approxSync?"approx":"exact",
|
approxSync?"approx":"exact",
|
||||||
image_mono_sub_.getTopic().c_str(),
|
image_mono_sub_.getTopic().c_str(),
|
||||||
image_depth_sub_.getTopic().c_str(),
|
image_depth_sub_.getTopic().c_str(),
|
||||||
@@ -163,7 +163,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
subscribedTopicsMsg = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s, \n %s",
|
subscribedTopicsMsg = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s, \n %s",
|
||||||
ros::this_node::getName().c_str(),
|
getName().c_str(),
|
||||||
approxSync?"approx":"exact",
|
approxSync?"approx":"exact",
|
||||||
image_mono_sub_.getTopic().c_str(),
|
image_mono_sub_.getTopic().c_str(),
|
||||||
image_depth_sub_.getTopic().c_str(),
|
image_depth_sub_.getTopic().c_str(),
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
std::string subscribedTopicsMsg = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s,\n %s",
|
std::string subscribedTopicsMsg = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s,\n %s",
|
||||||
ros::this_node::getName().c_str(),
|
getName().c_str(),
|
||||||
approxSync?"approx":"exact",
|
approxSync?"approx":"exact",
|
||||||
imageRectLeft_.getTopic().c_str(),
|
imageRectLeft_.getTopic().c_str(),
|
||||||
imageRectRight_.getTopic().c_str(),
|
imageRectRight_.getTopic().c_str(),
|
||||||
|
|||||||
Reference in New Issue
Block a user