40 #include <QFormLayout> 41 #include <QMessageBox> 52 QVBoxLayout* layout =
new QVBoxLayout();
57 new HeaderWidget(
"Define Passive Joints",
"Specify the set of passive joints (not actuated). Joint " 58 "state is not expected to be published for these joints.",
60 layout->addWidget(header);
65 connect(
joints_widget_, SIGNAL(previewSelected(std::vector<std::string>)),
this,
76 this->setLayout(layout);
87 const robot_model::RobotModelConstPtr& model =
config_data_->getRobotModel();
90 const std::vector<std::string>& joints = model->getJointModelNames();
92 if (joints.size() == 0)
94 QMessageBox::critical(
this,
"Error Loading",
"No joints found for robot model");
97 std::vector<std::string> active_joints;
98 for (std::size_t i = 0; i < joints.size(); ++i)
99 if (model->getJointModel(joints[i])->getVariableCount() > 0)
100 active_joints.push_back(joints[i]);
105 std::vector<std::string> passive_joints;
106 for (std::size_t i = 0; i <
config_data_->srdf_->passive_joints_.size(); ++i)
107 passive_joints.push_back(
config_data_->srdf_->passive_joints_[i].name_);
134 for (std::size_t i = 0; i < joints.size(); ++i)
136 const robot_model::JointModel* joint_model =
config_data_->getRobotModel()->getJointModel(joints[i]);
145 const std::string link = joint_model->getChildLinkModel()->getName();