Path Hug Critic#5777
Conversation
|
@silanus23, your PR has failed to build. Please check CI outputs and resolve issues. |
7913c03 to
7a5f81c
Compare
|
@mini-1235 If you could give this PR a look I would be very gratefull. |
|
@silanus23 Thanks for mentioning, but I don't have the bandwidth to go through all your PRs at the moment. I would like to focus first on the BT node (which I have already reviewed), and then I will look into the costmap plugin or MPPI critic next week. These PRs look like good additions, and I want to make sure they solve the original issue and don't break the existing behavior.
For your PRs, it would be very helpful if you could include a before/after video demonstrating the behavior change. That would make it much easier to understand the current status without having to rely only on code review or running the tests myself. |
7a5f81c to
e1a97fc
Compare
e1a97fc to
895f2e2
Compare
Codecov Report❌ Patch coverage is
... and 19 files with indirect coverage changes 🚀 New features to boost your workflow:
|
895f2e2 to
cfafdb9
Compare
Signed-off-by: silanus23 <berkantali23@outlook.com>
Signed-off-by: silanus23 <berkantali23@outlook.com>
Signed-off-by: silanus23 <berkantali23@outlook.com>
Signed-off-by: silanus23 <berkantali23@outlook.com>
Signed-off-by: silanus23 <berkantali23@outlook.com>
Signed-off-by: silanus23 <berkantali23@outlook.com>
Signed-off-by: silanus23 <berkantali23@outlook.com>
Signed-off-by: silanus23 <berkantali23@outlook.com>
added binary search to cache commented Signed-off-by: silanus23 <berkantali23@outlook.com>
Signed-off-by: silanus23 <berkantali23@outlook.com>
Signed-off-by: silanus23 <berkantali23@outlook.com>
Signed-off-by: silanus23 <berkantali23@outlook.com>
Signed-off-by: silanus23 <berkantali23@outlook.com>
Stoppin after finding close enough segment Adaptive search window Tuning parameters. Signed-off-by: silanus23 <berkantali23@outlook.com>
|
https://drive.google.com/drive/folders/1nfrqVMZcp--n5_tBdhfYqg-eJUJUrH_s Above link provides linke for ros2 bags. I will clean unnecssary tests and fill some comment gaps today alongside lint errors today. Please let me do before close review.
Here is the comparisions that I have made after some optimizations. Story is : 4-5: Zig zag corridor where robot needs to turn around before starting 6-7: Only zig zag corridor.
Main optimization is terminating search if traj. point is close enough. Thanks. |
Signed-off-by: silanus23 <berkantali23@outlook.com>
cfafdb9 to
fe72fbc
Compare
|
What was the deviation limit you set to get those results? Also would want to know the runtime impact of this as well on performance -- but generally those metrics tell me you're on the right track! It looks like you end up replacing alot of the PathAlign logic though - maybe this is good as another critic so we keep some legacy behavior? It seems sensible to me that if using tracking error (or even without it, just a different method from the tracking-error mindset) there's some changes in the way things are structured and therefore applying a different strategy. In that case, we'd want to keep the original around for those that use it today and we can always create a new (improved) critic which would also make testing easier |
…d decreasing. Signed-off-by: silanus23 <berkantali23@outlook.com>
Above is a critic analyzer I have compared it with path align. Here is the logs link Here is a video https://drive.google.com/file/d/161QaCOEU1vLY45UGgYg-6OVIJmmhigmL/view?usp=drive_link I am not sure if this will be exactly like this but I have tried couple of times and see the same results. I am basically drawing a U shape with a basic python node. Below new ros2 bags to prove. Please forget first 2 in this and above images. Last 4 here are taken from a zig zag corridor in tb4 .
I know currently the implementation has many missing points. But I wanted to make sure the path is correct before moving with tthe polishing. So please focus on formula and results. I wouldn't want to waste your time. About that max improvement going wron on 1 run: I don't think it's fully about this critic cause we have to stride in order to gain a bit of a performance and that run was still better on average. I have tried some other methods.
Last detail : Why do I re-find path start point everytime? Cause caching it was decreasing the quality especially if 1 time it falls to wrong side it was creating too much inconsistency and this was forcing me to increase parameters making the usage worse. |
|
Maybe I've just lost the thread here - but how does this use the tracking error and scoring MPPI to stay within set tracking error bounds? I don't see that message / information used here. I can see your metrics here on the path tracking error reduction, but that wasn't really what the aim was at the moment. I'm also wondering for staying that accurate on the path if you have an issue with deviating due to obstacles blocking and seems like the robot may be going much slower and stopping in order to maintain the tight distance (though may just be an artifact of tuning - and use of path align both). Maybe something to hold onto for us to look into another time, but I think that should be a separate ticket on a separate topic to improve more precise path tracking behavior and the trade offs we want to make therein. |
|
I am using the same mathematicall approach that is used in while publishing tracking error in the I scored every trajectory point based on distance from path, even when already close. I guess this took away the robot's breathing gap. I can change this directly to a distance limited approach and scoring high only if robot deviates too much. This would make a better fit to your vision making this more bound oriented I guess. About the video, I have used normal tune + path hug params in the yaml in PR. The slowness is likely from this. I guess I overstretched a bit while trying to prove this works.Would making this limit based solve the problem or should I try diffirent approach? |
Signed-off-by: silanus23 <berkantali23@outlook.com>
Signed-off-by: silanus23 <berkantali23@outlook.com>
|
I have made it to threshold based tracking error elliminator only. Comparison videos: Without: (https://drive.google.com/file/d/1qhEjPC4melmXeuVJF4SCZwCbdtr84xfO/view?usp=drive_link) With: (https://drive.google.com/file/d/1sFgq0Jap8YTXx6d00T3v_uiUAT7TUPnA/view?usp=drive_link) As seen in the videos, it handles U-turns better than the current setup. The robot's speed can be improved with more careful tuning of the parameters. Testing with a script listening to tracking_error_feedback shows that the robot now exceeds the set limit 10x less than the current implementation. Parameters used in video: max_allowed_distance: 0.05 violation_penalty_scale: 10.0 TL;DR: It calculates candidate trajectories, finds the tracking_error value for every point, and scores it according to the max_allowed_distance. The only logic change is in the index search, which now uses a search-based approach to meet the requirements of the MPC speed. |
Can you show that? I suppose its not always just a matter of tuning, sometimes when we developed the original plugins for MPPI we had to try 6+ formulations to find one that really worked well and didn't have other trade offs that were unacceptable.
I think this is where maybe we are getting lost. I totally support better path tracking behavior if that comes with reasonable trade offs (we can always have the Path Align critic for those that want it; more options is always good). For instance, if we say this one is for very accurate tracking but may not be as flexible to go around obstacles -- or something like that. For people that want stricter path tracking behavior. Assuming we can get that and deal with the velocity issues. So hands down, I support this line of thinking. However... What I was looking for in the ticket was the following:
I think your current work is more focused on very accurate path tracking which is related but not exactly the same thing. For many situations, you may want the robot to be able to deviate within the bounds flexibly, but never violate it. So you would only want (a). In other situations, you may want the robot to generally follow the path well, but also be able to get around small issues within tracking bounds, so you'd want (b). In other situations, you want strict path tracking -- which is more what your current work focuses on. |
Signed-off-by: silanus23 <berkantali23@outlook.com>
|
Current one had major changes. An important thing to note is If there ain't no trajectory inside boundaries. It's giving a warn and either making 0 for every or just giving averages according soft repulsion parameter. I am not sure about this behaviour. If exceeding limits should I add average regardless? I hope this time I get it correctly. Sorry for my previous confusions. Note: This is close to ready review but not. I am just trying to be sure my direction is correct. So please let me finish fully before full review. |
Signed-off-by: silanus23 <berkantali23@outlook.com>
Signed-off-by: silanus23 <berkantali23@outlook.com>
0.75 Error limitPathAlign: 0.50 Error limitPathAlign: PathHug: With Path Hug robot was struggling to turn around so I have made PathFollowCritic's weight 7.0 including Path Align tests to equalize. Next steps and notes
What do you think should I give it a try or is there a better way I can't see? Maybe just leave this side to user they can still get good restriction with low usage but it would be a bit stuttery. BTW when it moves smoother it becomes more resiliant to noise. |




Basic Info
Description of contribution in a few bullet points
After other PR I have tried to add path hug critic to path align critic. Refactored a bit. It looks too complex now can be simplified a bit now. New functionalites added to critics are:
updatePathCacheit calculates euclidean distance every time path renewed so we don't have to recalculate it in every iteration.computeMinDistancePathto calculate the minimum distance to path. It takes a hint from the previous traj point so it can search and find only in search window.Description of documentation updates required from your changes
Path Align critic's page needs refactorization
Description of how this change was tested
I tried to isolate effects of critic by only testing it with FollowPath and making it's weight 3. I have seen some visual improvements. Further testing could be helpfull.
Future work that may be required in bullet points
For Maintainers:
backport-*.