mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-08 02:37:45 +08:00
rtabmap: added republish_node_data input topic to request rtabmap to republish data of some nodes. max_nodes_republished parameter (default 2) limits the number of nodes republished at each update.
This commit is contained in:
@@ -39,6 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <std_msgs/Empty.h>
|
||||
#include <std_msgs/Int32.h>
|
||||
#include "std_msgs/Int32MultiArray.h"
|
||||
#include <sensor_msgs/NavSatFix.h>
|
||||
#include <nav_msgs/GetMap.h>
|
||||
#include <nav_msgs/GetPlan.h>
|
||||
@@ -165,6 +166,7 @@ private:
|
||||
void tagDetectionsAsyncCallback(const apriltag_ros::AprilTagDetectionArray & tagDetections);
|
||||
#endif
|
||||
void imuAsyncCallback(const sensor_msgs::ImuConstPtr & tagDetections);
|
||||
void republishNodeDataCallback(const std_msgs::Int32MultiArray::ConstPtr& msg);
|
||||
void interOdomCallback(const nav_msgs::OdometryConstPtr & msg);
|
||||
void interOdomInfoCallback(const nav_msgs::OdometryConstPtr & msg1, const rtabmap_ros::OdomInfoConstPtr & msg2);
|
||||
|
||||
@@ -192,8 +194,6 @@ private:
|
||||
const std::map<int, rtabmap::Transform> & nodes,
|
||||
const rtabmap::Transform & currentPose);
|
||||
|
||||
void republishMaps();
|
||||
|
||||
bool updateRtabmapCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&);
|
||||
bool resetRtabmapCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&);
|
||||
bool pauseRtabmapCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&);
|
||||
@@ -243,6 +243,7 @@ private:
|
||||
void goalFeedbackCb(const move_base_msgs::MoveBaseFeedbackConstPtr& feedback);
|
||||
void publishLocalPath(const ros::Time & stamp);
|
||||
void publishGlobalPath(const ros::Time & stamp);
|
||||
void republishMaps();
|
||||
|
||||
private:
|
||||
rtabmap::Rtabmap rtabmap_;
|
||||
@@ -371,6 +372,7 @@ private:
|
||||
ros::Subscriber imuSub_;
|
||||
std::map<double, rtabmap::Transform> imus_;
|
||||
std::string imuFrameId_;
|
||||
ros::Subscriber republishNodeDataSub_;
|
||||
|
||||
ros::Subscriber interOdomSub_;
|
||||
std::list<std::pair<nav_msgs::Odometry, rtabmap_ros::OdomInfo> > interOdoms_;
|
||||
@@ -388,6 +390,8 @@ private:
|
||||
bool alreadyRectifiedImages_;
|
||||
bool twoDMapping_;
|
||||
ros::Time previousStamp_;
|
||||
std::set<int> nodesToRepublish_;
|
||||
int maxNodesRepublished_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user