Skip to content
Snippets Groups Projects
Commit 0e49632a authored by Nikolaus Vahrenkamp's avatar Nikolaus Vahrenkamp
Browse files

Sanity checks in grasp planner

Hints for starting grasp planner with differnt hants
parent 42947bac
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,10 @@ int main(int argc, char* argv[])
{
VirtualRobot::init(argc, argv, "Simox Grasp Planner");
cout << " --- START --- " << endl;
cout << endl << "Hint: You can start this demo for different hands:" << endl;
cout << "GraspPlanner --robot robots/iCub/iCub.xml --endeffector \"Left Hand\" --preshape \"Grasp Preshape\"" << endl;
cout << "GraspPlanner --robot robots/Shadow_Dexterous_Hand/shadowhand.xml --endeffector \"SHADOWHAND\" --preshape \"Grasp Preshape\"" << endl;
cout << "GraspPlanner --robot robots/Schunk_SAH/SAH_RightHand.xml --endeffector \"Right Hand\" --preshape \"Grasp Preshape\"" << endl;
// --robot robots/iCub/iCub.xml --endeffector "Left Hand" --preshape "Grasp Preshape"
std::string robot("robots/ArmarIII/ArmarIII.xml");
......
......@@ -120,7 +120,7 @@
<x>10</x>
<y>70</y>
<width>181</width>
<height>201</height>
<height>221</height>
</rect>
</property>
<property name="title">
......@@ -130,14 +130,17 @@
<property name="geometry">
<rect>
<x>30</x>
<y>170</y>
<width>111</width>
<y>190</y>
<width>131</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Force closure</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="QSpinBox" name="spinBoxGraspNumber">
<property name="geometry">
......@@ -173,19 +176,19 @@
<rect>
<x>10</x>
<y>70</y>
<width>171</width>
<width>181</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Timeout, seconds (0=endless)</string>
<string>Timeout, seconds</string>
</property>
</widget>
<widget class="QSpinBox" name="spinBoxTimeOut">
<property name="geometry">
<rect>
<x>30</x>
<y>90</y>
<y>110</y>
<width>111</width>
<height>22</height>
</rect>
......@@ -204,7 +207,7 @@
<property name="geometry">
<rect>
<x>10</x>
<y>120</y>
<y>140</y>
<width>171</width>
<height>16</height>
</rect>
......@@ -217,7 +220,7 @@
<property name="geometry">
<rect>
<x>30</x>
<y>140</y>
<y>160</y>
<width>111</width>
<height>22</height>
</rect>
......@@ -231,6 +234,22 @@
<property name="singleStep">
<double>0.001000000000000</double>
</property>
<property name="value">
<double>0.010000000000000</double>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>10</x>
<y>90</y>
<width>131</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string> (0=endless)</string>
</property>
</widget>
</widget>
<widget class="QPushButton" name="pushButtonSave">
......@@ -311,7 +330,7 @@
<x>0</x>
<y>0</y>
<width>1079</width>
<height>21</height>
<height>25</height>
</rect>
</property>
</widget>
......
......@@ -638,6 +638,9 @@ namespace VirtualRobot
for (size_t i = 0; i < statics.size(); i++)
{
RobotNodePtr n = statics[i];
if (!n->getCollisionModel())
continue;
int id1, id2;
Eigen::Vector3f p1,p2;
float dist = this->getCollisionChecker()->calculateDistance(n->getCollisionModel(),obstacle->getCollisionModel(),p1,p2,&id1,&id2);
......
......@@ -98,9 +98,7 @@ void showRobotWindow::setupUI()
// setup
viewer->setBackgroundColor(SbColor(1.0f, 1.0f, 1.0f));
viewer->setAccumulationBuffer(true);
viewer->setAntialiasing(true, 4);
viewer->setGLRenderAction(new SoLineHighlightRenderAction);
viewer->setTransparencyType(SoGLRenderAction::BLEND);
......@@ -108,6 +106,9 @@ void showRobotWindow::setupUI()
viewer->setSceneGraph(sceneSep);
viewer->viewAll();
viewer->setAccumulationBuffer(true);
viewer->setAntialiasing(true, 4);
connect(UI.pushButtonReset, SIGNAL(clicked()), this, SLOT(resetSceneryAll()));
connect(UI.pushButtonLoad, SIGNAL(clicked()), this, SLOT(selectRobot()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment