コード例 #1
0
ファイル: main.cpp プロジェクト: CURG/rgbdslam
///Connect Signals and Slots for the ui control
void ui_connections(QObject* ui, GraphManager* graph_mgr, OpenNIListener* listener)
{
  Qt::ConnectionType ctype = Qt::AutoConnection;
  if (ParameterServer::instance()->get<bool>("concurrent_io")) 
    ctype = Qt::DirectConnection;
  QObject::connect(ui, SIGNAL(reset()), graph_mgr, SLOT(reset()), ctype);
  QObject::connect(ui, SIGNAL(optimizeGraph()), graph_mgr, SLOT(optimizeGraph()), ctype);
  QObject::connect(ui, SIGNAL(togglePause()), listener, SLOT(togglePause()), ctype);
  QObject::connect(ui, SIGNAL(toggleBagRecording()), listener, SLOT(toggleBagRecording()), ctype);
  QObject::connect(ui, SIGNAL(getOneFrame()), listener, SLOT(getOneFrame()), ctype);
  QObject::connect(ui, SIGNAL(deleteLastFrame()), graph_mgr, SLOT(deleteLastFrame()), ctype);
  QObject::connect(ui, SIGNAL(sendAllClouds()), graph_mgr, SLOT(sendAllClouds()), ctype);
  QObject::connect(ui, SIGNAL(saveAllClouds(QString)), graph_mgr, SLOT(saveAllClouds(QString)), ctype);
  QObject::connect(ui, SIGNAL(saveOctomapSig(QString)), graph_mgr, SLOT(saveOctomap(QString)), ctype);
  QObject::connect(ui, SIGNAL(saveAllFeatures(QString)), graph_mgr, SLOT(saveAllFeatures(QString)), ctype);
  QObject::connect(ui, SIGNAL(saveIndividualClouds(QString)), graph_mgr, SLOT(saveIndividualClouds(QString)), ctype);
  QObject::connect(ui, SIGNAL(saveTrajectory(QString)), graph_mgr, SLOT(saveTrajectory(QString)), ctype);
  QObject::connect(ui, SIGNAL(toggleMapping(bool)), graph_mgr, SLOT(toggleMapping(bool)), ctype);
  QObject::connect(ui, SIGNAL(saveG2OGraph(QString)), graph_mgr, SLOT(saveG2OGraph(QString)), ctype);
}
コード例 #2
0
bool RosUi::services(rgbd_slam::rgbdslam_ros_ui::Request  &req,
                     rgbd_slam::rgbdslam_ros_ui::Response &res )
{
  ROS_INFO_STREAM("Got Service Request. Command: " << req.command);
  if     (req.command == "reset"          ){ Q_EMIT reset(); }
  else if(req.command == "quick_save"     ){ Q_EMIT saveAllClouds(filename); }
  else if(req.command == "save_g2o_graph" ){ Q_EMIT saveG2OGraph("graph.g2o"); }
  else if(req.command == "save_trajectory"){ Q_EMIT saveTrajectory("trajectory"); }
  else if(req.command == "send_all"       ){ Q_EMIT sendAllClouds();}
  else if(req.command == "frame"          ){ Q_EMIT getOneFrame(); }
  else if(req.command == "delete_frame"   ){ Q_EMIT deleteLastFrame(); }
  else if(req.command == "optimize"       ){ Q_EMIT optimizeGraph(); }
  else if(req.command == "reload_config"  ){ ParameterServer::instance()->getValues();}
  else{
      ROS_ERROR("Invalid service call command: %s", req.command.c_str());
      ROS_ERROR("RGBDSLAM's services have changed in Feb '13, please revise your service calls");
      ROS_INFO("Valid commands are: {\n - reset\n - frame\n - quick_save\n -  send_all\n -  delete_frame\n -  optimize\n -  reload_config\n - save_trajectory\n}");
      return false;
  }
  return true;
}
コード例 #3
0
ファイル: qt_gui.cpp プロジェクト: SHFB/rgbdslam
void Graphical_UI::sendAll() {
    Q_EMIT sendAllClouds();
    QString message = tr("Sending Whole Model");
    statusBar()->showMessage(message);
}