40 #include <QVBoxLayout> 41 #include <QFormLayout> 42 #include <QApplication> 53 QVBoxLayout* layout =
new QVBoxLayout();
54 layout->setAlignment(Qt::AlignTop);
60 "Configure your 3D sensors to work with Moveit! " 62 "href='http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/perception_pipeline/" 63 "perception_pipeline_tutorial.html'>Perception Documentation</a> " 66 layout->addWidget(header);
69 QSpacerItem* blank_space =
new QSpacerItem(1, 8);
70 layout->addSpacerItem(blank_space);
73 QLabel* plugin_field_title =
new QLabel(
this);
74 plugin_field_title->setText(
"Optionally choose a type of 3D sensor plugin to configure:");
75 layout->addWidget(plugin_field_title);
86 QFormLayout* point_cloud_form_layout =
new QFormLayout();
87 point_cloud_form_layout->setContentsMargins(0, 15, 0, 15);
133 QFormLayout* depth_map_form_layout =
new QFormLayout();
134 depth_map_form_layout->setContentsMargins(0, 15, 0, 15);
184 layout->setAlignment(Qt::AlignTop);
187 this->setLayout(layout);
207 config_data_->addGenericParameterToSensorPluginConfig(
"sensor_plugin",
"occupancy_map_monitor/" 208 "PointCloudOctomapUpdater");
209 config_data_->addGenericParameterToSensorPluginConfig(
"point_cloud_topic",
211 config_data_->addGenericParameterToSensorPluginConfig(
"max_range",
213 config_data_->addGenericParameterToSensorPluginConfig(
"point_subsample",
215 config_data_->addGenericParameterToSensorPluginConfig(
"padding_offset",
217 config_data_->addGenericParameterToSensorPluginConfig(
"padding_scale",
219 config_data_->addGenericParameterToSensorPluginConfig(
"max_update_rate",
221 config_data_->addGenericParameterToSensorPluginConfig(
"filtered_cloud_topic",
229 config_data_->addGenericParameterToSensorPluginConfig(
"sensor_plugin",
"occupancy_map_monitor/" 230 "DepthImageOctomapUpdater");
231 config_data_->addGenericParameterToSensorPluginConfig(
"image_topic",
233 config_data_->addGenericParameterToSensorPluginConfig(
"queue_size",
235 config_data_->addGenericParameterToSensorPluginConfig(
"near_clipping_plane_distance",
237 config_data_->addGenericParameterToSensorPluginConfig(
"far_clipping_plane_distance",
239 config_data_->addGenericParameterToSensorPluginConfig(
"shadow_threshold",
241 config_data_->addGenericParameterToSensorPluginConfig(
"padding_scale",
243 config_data_->addGenericParameterToSensorPluginConfig(
"padding_offset",
247 config_data_->addGenericParameterToSensorPluginConfig(
"max_update_rate",
286 static bool hasLoaded =
false;
302 std::vector<std::map<std::string, GenericParameter> > sensors_vec_map =
config_data_->getSensorPluginConfig();
303 for (std::size_t i = 0; i < sensors_vec_map.size(); ++i)
305 if (sensors_vec_map[i][
"sensor_plugin"].getValue() == std::string(
"occupancy_map_monitor/PointCloudOctomapUpdater"))
309 max_range_field_->setText(QString(sensors_vec_map[i][
"max_range"].getValue().c_str()));
316 else if (sensors_vec_map[i][
"sensor_plugin"].getValue() ==
317 std::string(
"occupancy_map_monitor/DepthImageOctomapUpdater"))
320 image_topic_field_->setText(QString(sensors_vec_map[i][
"image_topic"].getValue().c_str()));
321 queue_size_field_->setText(QString(sensors_vec_map[i][
"queue_size"].getValue().c_str()));
322 near_clipping_field_->setText(QString(sensors_vec_map[i][
"near_clipping_plane_distance"].getValue().c_str()));
323 far_clipping_field_->setText(QString(sensors_vec_map[i][
"far_clipping_plane_distance"].getValue().c_str()));
328 QString(sensors_vec_map[i][
"filtered_cloud_topic"].getValue().c_str()));
334 if (sensors_vec_map.size() == 2)