void MapMaintener::pauseMapCallback( const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback ) { menu_handler.setVisible(h_start, true); menu_handler.setVisible(h_pause, false); menu_handler.setVisible(h_stop, true); menu_handler.reApply( *server); server->applyChanges(); mappingActive = false; }
void modeCb( const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback ) { menu_handler.setCheckState( h_mode_last, MenuHandler::UNCHECKED ); h_mode_last = feedback->menu_entry_id; std::string namesss=feedback->control_name; ROS_INFO("Name: %s", namesss.c_str()); ROS_INFO("last %i", h_mode_last); menu_handler.setCheckState( h_mode_last, MenuHandler::CHECKED ); menu_handler.reApply( *server ); server->applyChanges(); }
// Marker callback void MapMaintener::update_tf(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback ) { //InteractiveMarker int_marker; //server->get("object_menu", int_marker); if(mapPointCloud.features.cols() == 0) { nav_msgs::Odometry odom; odom.pose.pose = feedback->pose; publishLock.lock(); TObjectToMap = PointMatcher_ros::odomMsgToEigenMatrix<float>(odom); publishLock.unlock(); //int_marker.description = "Move to the zone of interest"; menu_handler.reApply( *server); server->applyChanges(); } else { //int_marker.description = "Reset the map to apply change"; menu_handler.reApply( *server); server->applyChanges(); } }