-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Implementation of Dynamic Window Pure Pursuit (DWPP) #5591
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
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.
@doisyg FYI - would this be of interest? See the video
Also, please add unit testing for the functions and features you added. Check out test/ in the package to see some examples. Your main function should be tested for all edge cases at the bare minimum
nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp
Outdated
Show resolved
Hide resolved
nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp
Outdated
Show resolved
Hide resolved
nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp
Outdated
Show resolved
Hide resolved
nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp
Outdated
Show resolved
Hide resolved
nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp
Outdated
Show resolved
Hide resolved
nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp
Outdated
Show resolved
Hide resolved
nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp
Outdated
Show resolved
Hide resolved
nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp
Outdated
Show resolved
Hide resolved
nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp
Outdated
Show resolved
Hide resolved
Absolutely ! @Decwest, we were discussing internally your DWPP repo (at Dexory) and I am super happy that you guys are working toward a nav2 integration. |
…n2 into feature/implement_dwpp
Signed-off-by: Decwest <[email protected]>
This reverts commit 53c5cd4.
This reverts commit 547c54e.
Signed-off-by: Decwest <[email protected]>
Codecov Report❌ Patch coverage is
... and 6 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Let me know when you want me to take a look again after the review comments are addressed! Only things at a glance: Your very large block of code may be more concise as or I'd suggest reviewing your code a bit for how it can be as concise and self-descriptive as possible |
|
@SteveMacenski |
Signed-off-by: Decwest <[email protected]>
Signed-off-by: Decwest <[email protected]>
|
@Decwest, your PR has failed to build. Please check CI outputs and resolve issues. |
Signed-off-by: Decwest <[email protected]>
Signed-off-by: Decwest <[email protected]>
Signed-off-by: Decwest <[email protected]>
|
Let me know when I should take a look again! Note that you should probably rebase and/or pull in main so that CI can pass :-) |
|
@Decwest, your PR has failed to build. Please check CI outputs and resolve issues. |
Signed-off-by: Decwest <[email protected]>
…, add test (WIP) Signed-off-by: Decwest <[email protected]>
Signed-off-by: Decwest <[email protected]>
|
@Decwest, your PR has failed to build. Please check CI outputs and resolve issues. |
Signed-off-by: Decwest <[email protected]>
Signed-off-by: Decwest <[email protected]>
Signed-off-by: Decwest <[email protected]>
Signed-off-by: Decwest <[email protected]>
|
@SteveMacenski Hi, In addition, I have a couple of points I’d like to ask about:
Thank you very much for your time and support. |
Signed-off-by: Decwest <[email protected]>
|
@SteveMacenski friendly ping:) |
|
Please fix the merge conflict Sorry for the delay. ROSCon + vacation took me out of the office for some time and takes a moment to get up to speed on all the PRs again that have piled up This looks much better now though! |
| logger_ = logger; | ||
|
|
||
| declare_parameter_if_not_declared( | ||
| node, plugin_name_ + ".desired_linear_vel", rclcpp::ParameterValue(0.5)); |
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.
We should have a migration log here. If desired_linear_vel is set, log a warning that it has been changed to max_linear_vel and that they should migrate the use.
nav2_regulated_pure_pursuit_controller/src/parameter_handler.cpp
Outdated
Show resolved
Hide resolved
nav2_regulated_pure_pursuit_controller/src/parameter_handler.cpp
Outdated
Show resolved
Hide resolved
| dynamic_window_min_angular_vel); | ||
| } | ||
|
|
||
| void RegulatedPurePursuitController::applyRegulationToDynamicWindow( |
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.
This seems like it can be a utils function as well; it doesn't use class members
| if (dynamic_window_min_angular_vel <= 0.0 && 0.0 <= dynamic_window_max_angular_vel) { | ||
| optimal_angular_vel = 0.0; | ||
| } else { | ||
| // If not, select angular vel within dynamic window closest to 0 |
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.
| // If not, select angular vel within dynamic window closest to 0 | |
| // If not, select angular vel within dynamic window closest to 0 |
| optimal_angular_vel = dynamic_window_max_angular_vel; | ||
| } | ||
| } | ||
| return; |
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.
| return; |
| return; | ||
| } | ||
|
|
||
| void RegulatedPurePursuitController::computeOptimalVelocityWithinDynamicWindow( |
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.
This also doesn't appear to use class members can could be the util like the other regulation functions
| // considering velocity and acceleration constraints (DWPP) | ||
| const double regulated_linear_vel = linear_vel; | ||
| geometry_msgs::msg::Twist current_speed; | ||
| if (params_->velocity_feedback == "CLOSED_LOOP") { |
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.
Shouldn't be be made of use more generally if we're enabling open vs closed loop? This is not the only place speed is utilized
Signed-off-by: Fumiya Ohnishi <[email protected]>
Signed-off-by: Decwest <[email protected]>
Signed-off-by: Decwest <[email protected]>
|
@SteveMacenski I have one issue that I would like to ask for your advice on. However, after syncing Nav2 to the latest version today and building and running it in this environment, I encountered a segmentation fault, and Nav2 no longer starts. Below is a detailed description of the situation.
ROLLING ubuntu:~/ros2_ws$ ros2 run nav2_controller controller_server \
--ros-args --log-level debug \
-r __ns:=/ \
-p use_sim_time=False
[DEBUG] [1764069038.870090908] [rclcpp]: signal handler installed
[DEBUG] [1764069038.870102907] [rclcpp]: deferred_signal_handler(): waiting for SIGINT/SIGTERM or uninstall
[DEBUG] [1764069038.870473289] [rcl]: Initializing node 'controller_server' in namespace ''
[DEBUG] [1764069038.870496899] [rcl]: Using domain ID of '0'
[ros2run]: Segmentation faultFrom this, it seems that the process runs at least up to
If you have any ideas or suggestions, I would be grateful to hear them. |
|
Unfortunately I'm not sure - it sounds like you took some of the right debugging steps to try to isolate the issue. The next steps I would try are to compile with debug flags and run with GDB to see what that says. This tutorial may be helpful: https://docs.nav2.org/tutorials/docs/get_backtrace.html If its the core docker image, which it sounds like it may be, the right answer would be try to use an older version. Another option would be to build that image yourself locally and see if that does the trick. |
|
We also have a nav2 docker that hasn't been updated in some time and we keep older images around for 30 or 60 days so you should be able to find one from October even after I get it turning over right now https://github.com/ros-navigation/nav2_docker (annoyingly github disables jobs after 30 days of the repo being inactive, even though its job is fully automated so there's not really any active pushes required for a year at time) |
Basic Info
Description of contribution in a few bullet points
Description of documentation updates required from your changes
Added Parameters
"OPEN_LOOP": Uses the last commanded velocity (recommended)"CLOSED_LOOP": Uses odometry velocity (may hinder proper acceleration/deceleration)Description of how this change was tested
Simulation video
DWPP_simulation.mp4
Future work that may be required in bullet points
For Maintainers:
backport-*.