-
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?
Changes from all commits
142e30b
5279665
547c54e
b380815
53c5cd4
e2176e1
df7b2af
318e917
68b6dd4
3d123ac
7d2485f
e725917
ff2b3cc
3a57631
e85780a
9033141
8cb1fcb
79ea88b
5d21f30
efb5795
0795c7d
abb6c09
3da3e29
1785233
e9585d4
cd170ab
ab82855
de292df
d69470a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| // Copyright (c) 2022 Samsung Research America | ||
| // Copyright (c) 2025 Fumiya Ohnishi | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
|
|
@@ -36,7 +37,13 @@ ParameterHandler::ParameterHandler( | |
| plugin_name_ = plugin_name; | ||
|
|
||
| declare_parameter_if_not_declared( | ||
| node, plugin_name_ + ".desired_linear_vel", rclcpp::ParameterValue(0.5)); | ||
| node, plugin_name_ + ".max_linear_vel", rclcpp::ParameterValue(0.5)); | ||
| declare_parameter_if_not_declared( | ||
Decwest marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| node, plugin_name_ + ".min_linear_vel", rclcpp::ParameterValue(-0.5)); | ||
| declare_parameter_if_not_declared( | ||
| node, plugin_name_ + ".max_angular_vel", rclcpp::ParameterValue(2.5)); | ||
| declare_parameter_if_not_declared( | ||
| node, plugin_name_ + ".min_angular_vel", rclcpp::ParameterValue(-2.5)); | ||
| declare_parameter_if_not_declared( | ||
| node, plugin_name_ + ".lookahead_dist", rclcpp::ParameterValue(0.6)); | ||
| declare_parameter_if_not_declared( | ||
|
|
@@ -86,8 +93,14 @@ ParameterHandler::ParameterHandler( | |
| node, plugin_name_ + ".use_rotate_to_heading", rclcpp::ParameterValue(true)); | ||
| declare_parameter_if_not_declared( | ||
| node, plugin_name_ + ".rotate_to_heading_min_angle", rclcpp::ParameterValue(0.785)); | ||
| declare_parameter_if_not_declared( | ||
| node, plugin_name_ + ".max_linear_accel", rclcpp::ParameterValue(2.5)); | ||
| declare_parameter_if_not_declared( | ||
| node, plugin_name_ + ".max_linear_decel", rclcpp::ParameterValue(2.5)); | ||
| declare_parameter_if_not_declared( | ||
| node, plugin_name_ + ".max_angular_accel", rclcpp::ParameterValue(3.2)); | ||
| declare_parameter_if_not_declared( | ||
| node, plugin_name_ + ".max_angular_decel", rclcpp::ParameterValue(3.2)); | ||
| declare_parameter_if_not_declared( | ||
| node, plugin_name_ + ".use_cancel_deceleration", rclcpp::ParameterValue(false)); | ||
| declare_parameter_if_not_declared( | ||
|
|
@@ -104,10 +117,17 @@ ParameterHandler::ParameterHandler( | |
| node, plugin_name_ + ".use_collision_detection", | ||
| rclcpp::ParameterValue(true)); | ||
| declare_parameter_if_not_declared( | ||
| node, plugin_name_ + ".stateful", rclcpp::ParameterValue(true)); | ||
| node, plugin_name_ + ".stateful", rclcpp::ParameterValue(true)); | ||
| declare_parameter_if_not_declared( | ||
| node, plugin_name_ + ".use_dynamic_window", rclcpp::ParameterValue(false)); | ||
| declare_parameter_if_not_declared( | ||
| node, plugin_name_ + ".velocity_feedback", rclcpp::ParameterValue(std::string("OPEN_LOOP"))); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this adding a new feature? Please remove and open another PR to add.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is much easier for maintainers to review 2x decoupled smaller PRs than 1 larger PR |
||
|
|
||
| node->get_parameter(plugin_name_ + ".desired_linear_vel", params_.desired_linear_vel); | ||
| params_.base_desired_linear_vel = params_.desired_linear_vel; | ||
| node->get_parameter(plugin_name_ + ".max_linear_vel", params_.max_linear_vel); | ||
| params_.base_max_linear_vel = params_.max_linear_vel; | ||
| node->get_parameter(plugin_name_ + ".min_linear_vel", params_.min_linear_vel); | ||
| node->get_parameter(plugin_name_ + ".max_angular_vel", params_.max_angular_vel); | ||
| node->get_parameter(plugin_name_ + ".min_angular_vel", params_.min_angular_vel); | ||
| node->get_parameter(plugin_name_ + ".lookahead_dist", params_.lookahead_dist); | ||
| node->get_parameter(plugin_name_ + ".min_lookahead_dist", params_.min_lookahead_dist); | ||
| node->get_parameter(plugin_name_ + ".max_lookahead_dist", params_.max_lookahead_dist); | ||
|
|
@@ -162,7 +182,10 @@ ParameterHandler::ParameterHandler( | |
| node->get_parameter(plugin_name_ + ".use_rotate_to_heading", params_.use_rotate_to_heading); | ||
| node->get_parameter( | ||
| plugin_name_ + ".rotate_to_heading_min_angle", params_.rotate_to_heading_min_angle); | ||
| node->get_parameter(plugin_name_ + ".max_linear_accel", params_.max_linear_accel); | ||
| node->get_parameter(plugin_name_ + ".max_linear_decel", params_.max_linear_decel); | ||
| node->get_parameter(plugin_name_ + ".max_angular_accel", params_.max_angular_accel); | ||
| node->get_parameter(plugin_name_ + ".max_angular_decel", params_.max_angular_decel); | ||
| node->get_parameter(plugin_name_ + ".use_cancel_deceleration", params_.use_cancel_deceleration); | ||
| node->get_parameter(plugin_name_ + ".cancel_deceleration", params_.cancel_deceleration); | ||
| node->get_parameter(plugin_name_ + ".allow_reversing", params_.allow_reversing); | ||
|
|
@@ -189,6 +212,8 @@ ParameterHandler::ParameterHandler( | |
| plugin_name_ + ".use_collision_detection", | ||
| params_.use_collision_detection); | ||
| node->get_parameter(plugin_name_ + ".stateful", params_.stateful); | ||
| node->get_parameter(plugin_name_ + ".use_dynamic_window", params_.use_dynamic_window); | ||
| node->get_parameter(plugin_name_ + ".velocity_feedback", params_.velocity_feedback); | ||
|
|
||
| if (params_.inflation_cost_scaling_factor <= 0.0) { | ||
| RCLCPP_WARN( | ||
|
|
@@ -252,9 +277,9 @@ ParameterHandler::updateParametersCallback( | |
| if (param_type == ParameterType::PARAMETER_DOUBLE) { | ||
| if (param_name == plugin_name_ + ".inflation_cost_scaling_factor") { | ||
| params_.inflation_cost_scaling_factor = parameter.as_double(); | ||
| } else if (param_name == plugin_name_ + ".desired_linear_vel") { | ||
| params_.desired_linear_vel = parameter.as_double(); | ||
| params_.base_desired_linear_vel = parameter.as_double(); | ||
| } else if (param_name == plugin_name_ + ".max_linear_vel") { | ||
| params_.max_linear_vel = parameter.as_double(); | ||
| params_.base_max_linear_vel = parameter.as_double(); | ||
| } else if (param_name == plugin_name_ + ".lookahead_dist") { | ||
| params_.lookahead_dist = parameter.as_double(); | ||
| } else if (param_name == plugin_name_ + ".max_lookahead_dist") { | ||
|
|
||
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_velis set, log a warning that it has been changed tomax_linear_veland that they should migrate the use.