Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark Incomplete trajectories as failure #4

Merged
merged 7 commits into from
Jul 7, 2023

Conversation

Abishalini
Copy link

@Abishalini Abishalini commented Jul 7, 2023

Sometimes, the plan function in the Connect stage returns success with an incomplete trajectory.
This predominantly happens when using pick_ik. Here is a band-aid fix to mark such trajectories as failure while I dig deeper to find the source of this error.

Video evidence of incomplete trajectories now marked as failure
https://github.com/PickNikRobotics/moveit_task_constructor/assets/17363793/e545e5c6-1574-4ac4-bc3e-5eb775e60f63

@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Merging #4 (2c9afca) into ros2 (eaa3701) will increase coverage by 0.03%.
The diff coverage is 66.67%.

@@            Coverage Diff             @@
##             ros2       #4      +/-   ##
==========================================
+ Coverage   41.50%   41.53%   +0.03%     
==========================================
  Files          81       81              
  Lines        7926     7933       +7     
==========================================
+ Hits         3289     3294       +5     
- Misses       4637     4639       +2     
Impacted Files Coverage Δ
core/src/stages/connect.cpp 86.14% <66.67%> (-0.79%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -43,7 +43,7 @@ jobs:
# TODO: Port to ROS2
# DOWNSTREAM_WORKSPACE: "github:ubi-agni/mtc_demos#master github:TAMS-Group/mtc_pour#master"
# Silent googletest warnings: https://github.com/ament/ament_cmake/pull/408#issuecomment-1306004975
UPSTREAM_WORKSPACE: github:ament/googletest#clalancette/update-to-gtest-1.11
# UPSTREAM_WORKSPACE: github:ament/googletest#clalancette/update-to-gtest-1.11
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this need to be commented out?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI was failing because it couldn't find clalancette/update-to-gtest-1.11 so I commented it out. Not sure what the right fix for it would be

Copy link
Author

@Abishalini Abishalini Jul 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup_upstream_workspace
  googletest git https://github.com/ament/googletest clalancette/update-to-gtest-1.11
  === /home/runner/work/moveit_task_constructor/moveit_task_constructor/.work/upstream_ws/src/googletest (git) ===
  Could not checkout ref 'clalancette/update-to-gtest-1.11': fatal: invalid reference: clalancette/update-to-gtest-1.11
  'vcs import --recursive --force /home/runner/work/moveit_task_constructor/moveit_task_constructor/.work/upstream_ws/src' returned with 1
'setup_upstream_workspace' returned with code '1' after 0 min 2 sec```

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on this PR being merged (ament/googletest#21) last week, the branch must have been deleted recently. I think you can just change the branch name to rolling and you should be back in business.

// Pushing a nullptr instead of a failed trajectory.
sub_trajectories.push_back(nullptr);
const auto distance = end->getCurrentState().distance(trajectory->getLastWayPoint());
if (distance > 0.05) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this be a parameter of the stage, so it can be tuned at stage creation time?

@Abishalini Abishalini requested a review from sea-bass July 7, 2023 17:30
@@ -59,8 +59,12 @@ Connect::Connect(const std::string& name, const GroupPlannerVector& planners) :
p.declare<MergeMode>("merge_mode", WAYPOINTS, "merge mode");
p.declare<moveit_msgs::msg::Constraints>("path_constraints", moveit_msgs::msg::Constraints(),
"constraints to maintain during trajectory");
p.declare<float>("goal_tolerance", 0.02,
"L1 distance between goal state and end of trajectory state should be within this tolerance");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: But is this actually the L2 distance (square root of L2 norm)? L1 would be the Manhattan distance. I think you can just remove the "L1" for what it's worth.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Abishalini Abishalini merged commit 5ea2140 into ros2 Jul 7, 2023
@delete-merged-branch delete-merged-branch bot deleted the mark_incomplete_traj_as_failure branch July 7, 2023 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants