void DataRateCheckerPlugin::load(const rviz::Config& config) {
      rviz::Panel::load(config);
      QString topic;
      int min_frequency;
      if(config.mapGetString ("Topic", &topic))
      {
        // Extract selected topic name from combo box
        std::string selected_topic = topic.toStdString();
        if (selected_topic != kBlankTopic.toStdString() && selected_topic != "") {
          UpdateTopicList();
          int topic_index = ui_.topic_combo_box_->findText(topic);
          // If the load topic doesn't exist, load it anyway to wait for the topic to become active
          if (topic_index == -1) {
            QStringList dummy_topic_list;
            dummy_topic_list << topic;
            ui_.topic_combo_box_->addItems(dummy_topic_list);
            topic_index = ui_.topic_combo_box_->findText(topic);
          }
          ui_.topic_combo_box_->setCurrentIndex(topic_index);
          topic_sub_ = node_handle_.subscribe(selected_topic,
                                              1,
                                              &DataRateCheckerPlugin::MessageCallback,
                                              this);

          timer_ = node_handle_.createWallTimer(ros::WallDuration(1.0),
                                                &DataRateCheckerPlugin::TimerCallback,
                                                this);
        }
      }
      if(config.mapGetInt ("Min rate", &min_frequency)) {
        ui_.min_frequency_spin_box_->setValue(min_frequency);
      }
    } // DataRateCheckerPlugin::load
 void TransformableMarkerOperatorAction::load( const rviz::Config& config )
 {
   rviz::Panel::load( config );
   QString server_name;
   config.mapGetString( "ServerName", &server_name );
   server_name_editor_->setText(server_name);
 }
void
TfVisualCalcPanel::load(const rviz::Config& p_config)
{
  rviz::Panel::load(p_config);
  QString tfVisualCalcViewString;
  if (p_config.mapGetString("TfVisualCalcView", &tfVisualCalcViewString)) {
    m_calcView->fromYAMLString(tfVisualCalcViewString.toStdString());
  }
}
예제 #4
0
// Load all configuration data for this panel from the given Config object.
void TeleopPanel::load( const rviz::Config& config )
{
  rviz::Panel::load( config );
  QString topic;
  if( config.mapGetString( "Topic", &topic ))
  {
    output_topic_editor_->setText( topic );
    updateTopic();
  }
}
void AddWayPoint::load(const rviz::Config& config)
{
  /*! \brief Setting up the configurations for the Panel of the RViz enviroment.
   */
  rviz::Panel::load(config);
  QString text_entry;
  ROS_INFO_STREAM("rviz: Initializing the user interaction planning panel");
  if (config.mapGetString("TextEntry", &text_entry))
  {
    ROS_INFO_STREAM("Loaded TextEntry with value: " << text_entry.toStdString());
  }

  ROS_INFO_STREAM("rviz Initialization Finished reading config file");
}