@@ -266,7 +266,8 @@ TEST_F(MoveGroupFixture, CartesianBestSeenExecutionTimePolicyChecks)
266266 valid_plan.fraction = move_group_->computeCartesianPath (valid_msg.waypoints , valid_msg.max_step ,
267267 valid_msg.jump_threshold , valid_plan.solution );
268268#pragma GCC diagnostic pop
269- } while (valid_plan.fraction <= 0 ); // Sometimes the plan fails with the random pose.
269+ } while (valid_plan.fraction <= 0 &&
270+ valid_plan.solution .joint_trajectory .points .size () < 2 ); // Sometimes the plan fails with the random pose.
270271
271272 // Valid case, as control.
272273 {
@@ -350,7 +351,7 @@ TEST_F(MoveGroupFixture, CartesianBestSeenExecutionTimePolicyWorks)
350351#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
351352 plan.fraction = move_group_->computeCartesianPath (msg.waypoints , msg.max_step , msg.jump_threshold , plan.solution );
352353#pragma GCC diagnostic pop
353- } while (plan.fraction <= - 1 &&
354+ } while (plan.fraction <= 0 &&
354355 plan.solution .joint_trajectory .points .size () < 2 ); // Sometimes the plan fails with the random pose.
355356
356357 do
@@ -366,8 +367,8 @@ TEST_F(MoveGroupFixture, CartesianBestSeenExecutionTimePolicyWorks)
366367 another_plan.fraction = move_group_->computeCartesianPath (another_msg.waypoints , another_msg.max_step ,
367368 another_msg.jump_threshold , another_plan.solution );
368369#pragma GCC diagnostic pop
369- } while (another_plan.fraction <= - 1 &&
370- plan .solution .joint_trajectory .points .size () < 2 ); // Sometimes the plan fails with the random pose.
370+ } while (another_plan.fraction <= 0 &&
371+ another_plan .solution .joint_trajectory .points .size () < 2 ); // Sometimes the plan fails with the random pose.
371372
372373 // Ensure that the entries are valid.
373374 {
0 commit comments