Added remove_label service. Updated get_nodes_in_radius service (added parameter k, return also distances of nodes found)

This commit is contained in:
matlabbe
2022-01-20 19:00:05 -05:00
parent 8fff821a87
commit 0ebaaa7439
7 changed files with 65 additions and 9 deletions
+11
View File
@@ -52,6 +52,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "rtabmap_ros/GetMap.h"
#include "rtabmap_ros/SetGoal.h"
#include "rtabmap_ros/SetLabel.h"
#include "rtabmap_ros/RemoveLabel.h"
#include "rtabmap_ros/PreferencesDialogROS.h"
float max3( const float& a, const float& b, const float& c)
@@ -400,6 +401,16 @@ bool GuiWrapper::handleEvent(UEvent * anEvent)
ROS_ERROR("Can't call \"set_label\" service");
}
}
else if(cmd == rtabmap::RtabmapEventCmd::kCmdRemoveLabel)
{
UASSERT(cmdEvent->value1().isStr());
rtabmap_ros::RemoveLabel removeLabelSrv;
removeLabelSrv.request.label = cmdEvent->value1().toStr();
if(!ros::service::call("remove_label", removeLabelSrv))
{
ROS_ERROR("Can't call \"remove_label\" service");
}
}
else
{
ROS_WARN("Not handled command (%d)...", cmd);