41 #include <QStackedLayout> 42 #include <QListWidget> 43 #include <QListWidgetItem> 47 #include <QPushButton> 48 #include <QCloseEvent> 49 #include <QMessageBox> 74 if (args.count(
"debug"))
78 std::string moveit_ros_visualization_package_path =
ros::package::getPath(
"moveit_ros_visualization");
79 moveit_ros_visualization_package_path +=
"/icons/classes/MotionPlanning.png";
80 this->setWindowIcon(QIcon(moveit_ros_visualization_package_path.c_str()));
83 QHBoxLayout* layout =
new QHBoxLayout();
84 layout->setAlignment(Qt::AlignTop);
92 middle_frame_->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
105 if (args.count(
"urdf_path"))
110 if (args.count(
"config_pkg"))
148 rviz_container_->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
152 splitter_ =
new QSplitter(Qt::Horizontal,
this);
153 splitter_->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
165 this->setLayout(layout);
168 this->setWindowTitle(
"MoveIt! Setup Assistant");
171 QApplication::processEvents();
412 QHBoxLayout* rviz_layout =
new QHBoxLayout();
424 const robot_model::LinkModel* lm =
config_data_->getRobotModel()->getLinkModel(link_name);
425 if (!lm->getShapes().empty())
435 if (!
config_data_->getRobotModel()->hasJointModelGroup(group_name))
438 const robot_model::JointModelGroup* joint_model_group =
config_data_->getRobotModel()->getJointModelGroup(group_name);
439 if (joint_model_group)
441 const std::vector<const robot_model::LinkModel*>& link_models = joint_model_group->getLinkModels();
443 for (std::vector<const robot_model::LinkModel*>::const_iterator link_it = link_models.begin();
444 link_it < link_models.end(); ++link_it)
455 const std::vector<std::string>& links =
config_data_->getRobotModel()->getLinkModelNamesWithCollisionGeometry();
470 for (std::vector<std::string>::const_iterator link_it = links.begin(); link_it < links.end(); ++link_it)
472 if ((*link_it).empty())
487 if (QMessageBox::question(
this,
"Exit Setup Assistant",
488 QString(
"Are you sure you want to exit the MoveIt! Setup Assistant?"),
489 QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel)
505 QMessageBox::critical(
this,
"Error",
"An error occurred and was caught by Qt notify event handler.", QMessageBox::Ok);
void unsetLinkColor(const std::string &link_name)
ViewController * getCurrent() const
virtual ViewManager * getViewManager() const
void initialize(Ogre::SceneManager *scene_manager, DisplayContext *manager)
virtual bool setValue(const QVariant &new_value)
void setFixedFrame(const QString &frame)
Ogre::SceneManager * getSceneManager() const
virtual Property * subProp(const QString &sub_name)
void addDisplay(Display *display, bool enabled)
static const std::string MOVEIT_ROBOT_STATE
ROSLIB_DECL std::string getPath(const std::string &package_name)
void setName(const QString &name)
This class is shared with all widgets and contains the common configuration data needed for generatin...
void setLinkColor(const std::string &link_name, const QColor &color)
static const std::string ROBOT_DESCRIPTION
ROSCPP_DECL void spinOnce()