Labels shown in the GUI (added also "Label current location..." action in Detection menu)

This commit is contained in:
matlabbe
2015-07-26 15:50:39 -04:00
parent a15ae81651
commit b358ffd45d
12 changed files with 277 additions and 48 deletions

View File

@@ -77,7 +77,8 @@ public:
kCmdTriggerNewMap,
kCmdPause,
kCmdGoal, // params: label or location ID
kCmdCancelGoal};
kCmdCancelGoal,
kCmdLabel}; // // params: label or location ID
public:
RtabmapEventCmd(Cmd cmd, const std::string & strValue = "", int intValue = 0, const ParametersMap & parameters = ParametersMap()) :
UEvent(0),
@@ -190,6 +191,22 @@ private:
std::vector<std::pair<int, Transform> > _poses;
};
class RtabmapLabelErrorEvent : public UEvent
{
public:
RtabmapLabelErrorEvent(int id, const std::string & label):
UEvent(id),
_label(label){}
virtual ~RtabmapLabelErrorEvent() {}
int id() const {return this->getCode();}
const std::string & label() const {return _label;}
virtual std::string getClassName() const {return std::string("RtabmapLabelErrorEvent");}
private:
std::string _label;
};
} // namespace rtabmap
#endif /* RTABMAPEVENT_H_ */

View File

@@ -75,7 +75,8 @@ public:
kStateTriggeringMap,
kStateAddingUserData,
kStateSettingGoal,
kStateCancellingGoal
kStateCancellingGoal,
kStateLabelling
};
public: