mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
Increased version 0.10.8: modified RtabmapGlobalPathEvent interface with label
This commit is contained in:
@@ -202,13 +202,19 @@ public:
|
||||
RtabmapGlobalPathEvent(int goalId, const std::vector<std::pair<int, Transform> > & poses) :
|
||||
UEvent(goalId),
|
||||
_poses(poses) {}
|
||||
RtabmapGlobalPathEvent(int goalId, const std::string & goalLabel, const std::vector<std::pair<int, Transform> > & poses) :
|
||||
UEvent(goalId),
|
||||
_goalLabel(goalLabel),
|
||||
_poses(poses) {}
|
||||
|
||||
virtual ~RtabmapGlobalPathEvent() {}
|
||||
int getGoal() const {return this->getCode();}
|
||||
const std::string & getGoalLabel() const {return _goalLabel;}
|
||||
const std::vector<std::pair<int, Transform> > & getPoses() const {return _poses;}
|
||||
virtual std::string getClassName() const {return std::string("RtabmapGlobalPathEvent");}
|
||||
|
||||
private:
|
||||
std::string _goalLabel;
|
||||
std::vector<std::pair<int, Transform> > _poses;
|
||||
};
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ void RtabmapThread::mainLoop()
|
||||
{
|
||||
UERROR("Failed to set a goal to location=%d.", id);
|
||||
}
|
||||
this->post(new RtabmapGlobalPathEvent(id, _rtabmap->getPath()));
|
||||
this->post(new RtabmapGlobalPathEvent(id, parameters.at("label"), _rtabmap->getPath()));
|
||||
break;
|
||||
case kStateCancellingGoal:
|
||||
_rtabmap->clearPath();
|
||||
|
||||
Reference in New Issue
Block a user