Skip to content

Commit 5a40222

Browse files
committed
Mitigate cartesian path tests
Signed-off-by: methylDragon <[email protected]>
1 parent 7c2d1e6 commit 5a40222

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

moveit_ros/trajectory_cache/test/cache_insert_policies/test_best_seen_execution_time_policy_with_move_group.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)