Skip to content

Conversation

@SakshayMahna
Copy link
Contributor


Basic Info

Info Please fill out this column
Ticket(s) this addresses #4865
Primary OS tested on Ubuntu
Robotic platform tested on Turtlebot3 Gazebo Simulation
Does this PR contain AI generated software? No
Was this PR description generated by AI software? No

Description of contribution in a few bullet points

Graceful Controller makes use of a slowdown radius to stop at the target. This PR additionally applies deceleration limit while the robot is stopping.

Description of documentation updates required from your changes

  • Added new parameter, deceleration_max to Graceful Controller.
  • Supporting a new behavior for stopping.

Description of how this change was tested

Tested in simulation.


Future work that may be required in bullet points

For Maintainers:

  • Check that any new parameters added are updated in docs.nav2.org
  • Check that any significant change is added to the migration guide
  • Check that any new features OR changes to existing behaviors are reflected in the tuning guide
  • Check that any new functions have Doxygen added
  • Check that any new features have test coverage
  • Check that any new plugins is added to the plugins page
  • If BT Node, Additionally: add to BT's XML index of nodes for groot, BT package's readme table, and BT library lists
  • Should this be backported to current distributions? If so, tag with backport-*.

Signed-off-by: Sakshay Mahna <[email protected]>
Signed-off-by: Sakshay Mahna <[email protected]>
Signed-off-by: Sakshay Mahna <[email protected]>
@SakshayMahna
Copy link
Contributor Author

@SteveMacenski
Opened the PR as discussed.

A few points to note on the implementation:

  • I modified the existing calculateRegularVelocity and calculateNextPoint functions in the Smooth Control Law file. There is only one dependency to the package nav2_docking. Instead of modification of the existing function signature, I can implement a new function altogether.
  • This PR is touching nav2_docking package as well, which now also requires the decleration_max parameter.

@SteveMacenski
Copy link
Member

Also check out the CI tests, a few are legit failing it looks like from this update

@SteveMacenski
Copy link
Member

@SakshayMahna any update? I see you pulled in main

@SakshayMahna
Copy link
Contributor Author

No not yet. I will get it done by this week.

@SteveMacenski
Copy link
Member

Ping me when you want a review :-)

@codecov
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 97.50000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
nav2_graceful_controller/src/parameter_handler.cpp 80.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
...e/nav2_graceful_controller/graceful_controller.hpp 100.00% <ø> (ø)
...ude/nav2_graceful_controller/parameter_handler.hpp 100.00% <ø> (ø)
...v2_graceful_controller/src/graceful_controller.cpp 89.47% <100.00%> (+0.12%) ⬆️
...av2_graceful_controller/src/smooth_control_law.cpp 100.00% <100.00%> (ø)
nav2_graceful_controller/src/parameter_handler.cpp 99.29% <80.00%> (-0.71%) ⬇️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SteveMacenski
Copy link
Member

Is this ready for a review yet? :-)

@SakshayMahna
Copy link
Contributor Author

Hi @SteveMacenski
Ready for review. This currently keeps the functions used by nav2_docking untouched. The deceleration is only being applied when the graceful controller is being used.

@SakshayMahna
Copy link
Contributor Author

SakshayMahna commented Oct 18, 2025

Single constructor for Smooth Control Law now.
Initialised the same in docking as an INFINITE value, and mentioned in a comment.
Still kept the setter, for completeness.

k_phi_, k_delta_, beta_, lambda_, slowdown_radius_, v_linear_min_, v_linear_max_,
v_angular_max_);
k_phi_, k_delta_, beta_, lambda_,
slowdown_radius_, INFINITY,
Copy link
Member

Choose a reason for hiding this comment

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

How about std::numeric_limits<double>::max()? This is typically how we represent a large initialized value

* @param backward If true, the robot is moving backwards. Defaults to false.
* @return Velocity command.
*/
geometry_msgs::msg::Twist calculateRegularVelocity(
Copy link
Member

@SteveMacenski SteveMacenski Oct 21, 2025

Choose a reason for hiding this comment

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

Why the duplication for the calc velocity / next pose methods? I Think this falls into the same camp to remove the duplication of methods. Can we simply call a single implementation and in the docking have the field for that be some arbitrarily high value like INF / MAX?

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