-
Notifications
You must be signed in to change notification settings - Fork 689
Feature: New FREE command in Pilz planner for free-space trajectory generation #3610
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
base: main
Are you sure you want to change the base?
Conversation
due to derivatives discontinuouties normal composite fail to Pose IK
|
May you review this ? |
EzraBrooks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment otherwise LGTM.
| bool is_integer = std::fabs(val - std::round(val)) < 1e-9; | ||
|
|
||
| // Format value as string | ||
| std::ostringstream oss; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, it's been a while since I've looked at the moveit2 codebase; do we have fmt available here? I think we should prefer modern string formatting techniques over ostringstream if so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, this is a fix I have introduced it in #3604.
it is not related to this PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so I should replace this with fmt (modern formatting library)?
should I do it here or in the PR #3604 because I did a mistake by include this fix here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure "free" is the right title. Suggesting some other names:
- variable blend -->
variableBlendFromWaypoints() - motion sequence -->
sequenceFromWaypoints(). This is my favorite.
A free space planner typically means something like A* that is free to take any route to the goal.
AndyZe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your triangle example seems to violate this? Did something change:
The planner cannot generate trajectories that contain three or more consecutive colinear waypoints (e.g., straight lines)
the triangle example uses only triangle's vertices. what I meant there by "straight lines" is pure straight line. |
Right, FREE is not appropriate. |
|
I'm not active on here these days, but I saw this pop up on my feed. I wanted to point out that this feature seems to do the same thing as https://moveit.picknik.ai/main/doc/how_to_guides/pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#sequence-of-multiple-segments -- so I would recommend 2 things for the author and reviewers:
Hope this helps more so than adds noise! |
@sea-bass I tested both methods using points sampled from the ellipse: with the number of points in the planned joint_trajectory with the same max_cartesian_speed. I got: # This is with LIN commands and Sequence
[INFO] [1763959333.823367295] [cartesian_planning]: TrajPoints 408
# This is with the new Command
[INFO] [1763960677.326358520] [commands_loader]: TrajPoints : 29But Why 200 ellipse waypoints to 29 joint trajectory points???
|
28dcb9f to
9fc413a
Compare
|
@sea-bass auto pilz_free_planner = std::make_shared<mtc::solvers::PipelinePlanner>(node_, "pilz_industrial_motion_planner");
pilz_free_planner->setPlannerId("FREE");
// .
// .
// .
auto stage = std::make_unique<mtc::stages::MoveTo>("weld", pilz_free_planner);
// set your waypoints as path constraints
task.add(std::move(stage)) |
EzraBrooks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll defer to the people who actually know something about motion planning now that they've chimed in.
|
To determine whether this new feature is worthwhile or redundant with Assume we have a cut of hyperbolic curve with two branches and I want to move the tool through these two branches so I should do three steps: In the first case, I definitely cannot perform the three steps with a single “FREE” path because it will be difficult to determine all waypoints and I wouldn’t be able to pause briefly between the steps. In the second case, using a In the third case, all I need is just a sequence of three items—("FREE","PTP","FREE")—and all done. last thing: why this should be a seperate command or motion type and not consider it as I hope this clarify everything. |
| #pragma once | ||
| #pragma message(".h header is obsolete. Please use the .hpp header instead.") | ||
| #include <pilz_industrial_motion_planner/path_free_generator.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should add new .h header files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I will delete them
Did the trajectories take the same time to execute, though? Extra waypoints doesn't bother me too much, but if the execution time is slower, that might be a good reason to replace the old version. |
@AndyZe I'm not sure if the following is correct but assume I set the ros2 control |
|
Ok, I'm convinced it's worth merging. Still needs to be named something other than "free". Sorry I don't have time for a detailed review. |
|
What about PATH? |
|
What about POLYLINE? current suggestions: |
Description
This pull request adds a new Pilz Industrial Planner command:
FREE, which enables planning Cartesian free-space trajectories using waypoints.Added Classes
The workflow of these classes follows the same structure as the existing
CIRCandLINcommands.TrajectoryGeneratorFreeMain class responsible for receiving the
MotionPlanRequestand setting up the free-space path.PathFreeGeneratorHandles the generation of free paths using
KDL::Path_RoundedComposite.This class provides:
freeFromWaypoints()– Adds and validates waypoints.computeBlendRadius()– Computes the maximum feasible rounding radius, scaled by thesmoothnessfactor.checkConsecutiveColinearWaypoints()– Detects and throws an error if three consecutive colinear points are found (handled insetFreePath()).Limitations
This is a limitation of
KDL::Path_RoundedComposite.When such a case is detected, an error is thrown and the plan is rejected.
Usage Example
An example of how to use the
FREEcommand withMotionSequenceItem:Tests
triangles with different smoothness:
points generated from external parametric curve:
Checklist