47 #include <moveit_task_constructor_msgs/GetSolution.h>
57 #include <OgreSceneNode.h>
63 task_list_model_.reset(
new TaskListModel);
67 connect(task_list_model_.get(), SIGNAL(rowsInserted(QModelIndex,
int,
int)),
this,
68 SLOT(onTasksInserted(QModelIndex,
int,
int)));
69 connect(task_list_model_.get(), SIGNAL(rowsAboutToBeRemoved(QModelIndex,
int,
int)),
this,
70 SLOT(onTasksRemoved(QModelIndex,
int,
int)));
71 connect(task_list_model_.get(), SIGNAL(dataChanged(QModelIndex, QModelIndex)),
this,
72 SLOT(onTaskDataChanged(QModelIndex, QModelIndex)));
75 "Robot Description",
"robot_description",
"The name of the ROS parameter where the URDF for the robot is loaded",
76 this, SLOT(changedRobotDescription()),
this);
79 "Task Solution Topic",
"", ros::message_traits::datatype<moveit_task_constructor_msgs::Solution>(),
80 "The topic on which task solutions (moveit_msgs::Solution messages) are received",
this,
81 SLOT(changedTaskSolutionTopic()),
this);
83 trajectory_visual_.reset(
new TaskSolutionVisualization(
this,
this));
84 connect(trajectory_visual_.get(), SIGNAL(activeStageChanged(
size_t)), task_list_model_.get(),
85 SLOT(highlightStage(
size_t)));
87 tasks_property_ =
new rviz::Property(
"Tasks", QVariant(),
"Tasks received on monitored topic",
this);
96 Display::onInitialize();
143 Display::save(config);
147 Display::load(config);
157 Display::onDisable();
162 Display::fixedFrameChanged();
170 Ogre::Vector3 position;
171 Ogre::Quaternion orientation;
181 Display::update(wall_dt, ros_dt);
187 BoolProperty::setName(name);
226 }
catch (
const std::invalid_argument& e) {
245 if (!solution_topic.endsWith(QString(
"/").
append(SOLUTION_TOPIC))) {
247 QString(
"Invalid topic. Expecting a name ending on \"/%1\"").arg(
SOLUTION_TOPIC));
251 base_ns_ = solution_topic.toStdString().substr(0, solution_topic.length() - strlen(SOLUTION_TOPIC));
267 if (parent.isValid())
271 for (; first <= last; ++first) {
272 QModelIndex idx =
m->index(first, 0, parent);
278 if (parent.isValid())
281 for (; first <= last; ++first)
288 if (topLeft.parent().isValid())
291 for (
int row = topLeft.row(); row <= bottomRight.row(); ++row) {
295 if (topLeft.column() <= 0 && 0 <= bottomRight.column())
296 child->
setName(topLeft.sibling(row, 0).data().toString());
297 if (topLeft.column() <= 1 && 1 <= bottomRight.column())