From e63cb20ac928467a8666f10943daf71cde1d856d Mon Sep 17 00:00:00 2001 From: Raphael Grimm <raphael.grimm@kit.edu> Date: Tue, 10 Dec 2019 12:38:45 +0100 Subject: [PATCH] Add option to suppress propagating joint values --- GraspPlanning/examples/GraspPlanner/GraspPlanner.ui | 12 +++++++++++- .../examples/GraspPlanner/GraspPlannerWindow.cpp | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/GraspPlanning/examples/GraspPlanner/GraspPlanner.ui b/GraspPlanning/examples/GraspPlanner/GraspPlanner.ui index 97175ec47..041df06b6 100644 --- a/GraspPlanning/examples/GraspPlanner/GraspPlanner.ui +++ b/GraspPlanning/examples/GraspPlanner/GraspPlanner.ui @@ -182,6 +182,16 @@ </property> </widget> </item> + <item row="8" column="0"> + <widget class="QCheckBox" name="checkBoxPropagateJointValues"> + <property name="toolTip"> + <string>This might lead to infinite loops</string> + </property> + <property name="text"> + <string>Propagate joints</string> + </property> + </widget> + </item> </layout> </widget> </item> @@ -247,7 +257,7 @@ <x>0</x> <y>0</y> <width>1079</width> - <height>22</height> + <height>20</height> </rect> </property> </widget> diff --git a/GraspPlanning/examples/GraspPlanner/GraspPlannerWindow.cpp b/GraspPlanning/examples/GraspPlanner/GraspPlannerWindow.cpp index a158a3fbd..25f431f60 100644 --- a/GraspPlanning/examples/GraspPlanner/GraspPlannerWindow.cpp +++ b/GraspPlanning/examples/GraspPlanner/GraspPlannerWindow.cpp @@ -378,6 +378,9 @@ void GraspPlannerWindow::plan() planner.reset(new GraspStudio::GenericGraspPlanner(grasps, qualityMeasure, approach, quality, forceClosure)); } + robot->setPropagatingJointValuesEnabled(UI.checkBoxPropagateJointValues->isChecked()); + eefCloned->setPropagatingJointValuesEnabled(UI.checkBoxPropagateJointValues->isChecked()); + int nr = planner->plan(nrGrasps, timeout); VR_INFO << " Grasp planned:" << nr << endl; int start = static_cast<int>(grasps->getSize()) - nrGrasps - 1; -- GitLab