mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Labels shown in the GUI (added also "Label current location..." action in Detection menu)
This commit is contained in:
@@ -289,6 +289,12 @@ void RtabmapThread::mainLoop()
|
||||
case kStateCancellingGoal:
|
||||
_rtabmap->clearPath();
|
||||
break;
|
||||
case kStateLabelling:
|
||||
if(!_rtabmap->labelLocation(atoi(parameters.at("id").c_str()), parameters.at("label").c_str()))
|
||||
{
|
||||
this->post(new RtabmapLabelErrorEvent(atoi(parameters.at("id").c_str()), parameters.at("label").c_str()));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
UFATAL("Invalid state !?!?");
|
||||
break;
|
||||
@@ -500,6 +506,14 @@ void RtabmapThread::handleEvent(UEvent* event)
|
||||
ULOGGER_DEBUG("CMD_CANCEL_GOAL");
|
||||
pushNewState(kStateCancellingGoal);
|
||||
}
|
||||
else if(cmd == RtabmapEventCmd::kCmdLabel)
|
||||
{
|
||||
ULOGGER_DEBUG("CMD_LABEL");
|
||||
ParametersMap param;
|
||||
param.insert(ParametersPair("label", rtabmapEvent->getStr()));
|
||||
param.insert(ParametersPair("id", uNumber2Str(rtabmapEvent->getInt())));
|
||||
pushNewState(kStateLabelling, param);
|
||||
}
|
||||
else
|
||||
{
|
||||
UWARN("Cmd %d unknown!", cmd);
|
||||
|
||||
Reference in New Issue
Block a user