Skip to content
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

Add acceleration limits to DriveOnHeading and BackUp behaviors #4810

Merged

Conversation

RBT22
Copy link
Contributor

@RBT22 RBT22 commented Dec 20, 2024


Basic Info

Info Please fill out this column
Ticket(s) this addresses NA
Primary OS tested on Ubuntu
Robotic platform tested on own robot hardware
Does this PR contain AI generated software? No

Description of contribution in a few bullet points

Added two params: acceleration_limit and deceleration_limit for DriveOnHeading and BackUp behaviors.

Description of documentation updates required from your changes

Added new parameter, so need to add that to default configs and documentation page


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

Copy link
Contributor

mergify bot commented Dec 20, 2024

@RBT22, your PR has failed to build. Please check CI outputs and resolve issues.
You may need to rebase or pull in main due to API changes (or your contribution genuinely fails).

1 similar comment
Copy link
Contributor

mergify bot commented Dec 20, 2024

@RBT22, your PR has failed to build. Please check CI outputs and resolve issues.
You may need to rebase or pull in main due to API changes (or your contribution genuinely fails).

@RBT22 RBT22 force-pushed the rolling/acc-drive-on-heading branch from a6633a8 to 228de3b Compare December 20, 2024 11:29
Copy link
Contributor

mergify bot commented Dec 20, 2024

@RBT22, your PR has failed to build. Please check CI outputs and resolve issues.
You may need to rebase or pull in main due to API changes (or your contribution genuinely fails).

Copy link
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

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

Build is failing - not 100% sure why off hand other than it relates to a method added

Copy link
Contributor

mergify bot commented Jan 2, 2025

@RBT22, your PR has failed to build. Please check CI outputs and resolve issues.
You may need to rebase or pull in main due to API changes (or your contribution genuinely fails).

@RBT22 RBT22 force-pushed the rolling/acc-drive-on-heading branch from f8f5bd8 to 36daf76 Compare January 2, 2025 14:49
Copy link
Contributor

mergify bot commented Jan 2, 2025

@RBT22, your PR has failed to build. Please check CI outputs and resolve issues.
You may need to rebase or pull in main due to API changes (or your contribution genuinely fails).

@RBT22 RBT22 force-pushed the rolling/acc-drive-on-heading branch from 36daf76 to 83b4ff4 Compare January 2, 2025 14:54
Copy link
Contributor

mergify bot commented Jan 2, 2025

@RBT22, your PR has failed to build. Please check CI outputs and resolve issues.
You may need to rebase or pull in main due to API changes (or your contribution genuinely fails).

1 similar comment
Copy link
Contributor

mergify bot commented Jan 2, 2025

@RBT22, your PR has failed to build. Please check CI outputs and resolve issues.
You may need to rebase or pull in main due to API changes (or your contribution genuinely fails).

@RBT22 RBT22 force-pushed the rolling/acc-drive-on-heading branch from 79dbabc to 836fb46 Compare January 2, 2025 15:21
Copy link
Contributor

mergify bot commented Jan 2, 2025

@RBT22, your PR has failed to build. Please check CI outputs and resolve issues.
You may need to rebase or pull in main due to API changes (or your contribution genuinely fails).

@RBT22 RBT22 force-pushed the rolling/acc-drive-on-heading branch 3 times, most recently from a56b9c8 to 544887c Compare January 2, 2025 15:48
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 52.00000% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...nclude/nav2_behaviors/plugins/drive_on_heading.hpp 52.00% 12 Missing ⚠️
Files with missing lines Coverage Δ
...nclude/nav2_behaviors/plugins/drive_on_heading.hpp 82.65% <52.00%> (-10.60%) ⬇️

@SteveMacenski
Copy link
Member

SteveMacenski commented Jan 7, 2025

Sorry for the delayed review - see comment above. It also looks like this block doesn't have any test coverage. I think you should make a new backup or drive on heading unit or system test which specifies acceleration limits to exercise.

This is not ABI/API breaking, so once approved, you could open a PR to backport to Jazzy/Humble if you wanted either (Jazzy I may be able to do automatically, Humble I definitely can't / wouldn't unless someone else opened it)

@RBT22 RBT22 force-pushed the rolling/acc-drive-on-heading branch from 544887c to 9b9a6ce Compare January 9, 2025 10:02
Copy link
Contributor

mergify bot commented Jan 9, 2025

@RBT22, your PR has failed to build. Please check CI outputs and resolve issues.
You may need to rebase or pull in main due to API changes (or your contribution genuinely fails).

Copy link
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

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

Also, configuration guide entries are needed and migration guide to mention the new params

RBT22 added 3 commits January 22, 2025 09:59
Signed-off-by: RBT22 <[email protected]>
Signed-off-by: RBT22 <[email protected]>
@RBT22 RBT22 force-pushed the rolling/acc-drive-on-heading branch from 112b5fb to 84b1fec Compare January 22, 2025 09:00
@RBT22
Copy link
Contributor Author

RBT22 commented Jan 22, 2025

Hi @SteveMacenski,

I’ve been looking into the testing setup, and I believe I might have misunderstood it initially. If I’m interpreting this correctly now, the tests for the behaviors themselves are part of the nav2_system_tests package. Is that correct?

If so, I’ll need to edit the backup_tester.py and drive_tester.py scripts to incorporate the acceleration checks.

Thanks for your guidance!

@SteveMacenski
Copy link
Member

SteveMacenski commented Jan 23, 2025

If I’m interpreting this correctly now, the tests for the behaviors themselves are part of the nav2_system_tests package. Is that correct?

Yes!

.. Actually I don't remember what tests you were modifying now. The force pushes removed the changes from the history so I can't recount.

@RBT22 RBT22 force-pushed the rolling/acc-drive-on-heading branch from d4f32d7 to 7214eb9 Compare January 27, 2025 12:01
Copy link
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

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

With these + the documentation updates on docs.nav2.org, I can merge this and backport to jazzy!

@SteveMacenski SteveMacenski merged commit 2ee3cef into ros-navigation:main Jan 28, 2025
9 of 10 checks passed
@SteveMacenski
Copy link
Member

SteveMacenski commented Jan 28, 2025

@RBT22 thank you alot for jumping in and implementing this! It is very appreciated and a nice quality of behavior improvement :-)

mergify bot pushed a commit that referenced this pull request Jan 28, 2025
* Add acceleration constraints

Signed-off-by: RBT22 <[email protected]>

* Cleanup code

Signed-off-by: RBT22 <[email protected]>

* Format code

Signed-off-by: RBT22 <[email protected]>

* Add <limits> header to drive_on_heading.hpp

Signed-off-by: RBT22 <[email protected]>

* Remove vel pointer

Signed-off-by: RBT22 <[email protected]>

* Use the limits only if both of them is set

Signed-off-by: RBT22 <[email protected]>

* Fix onActionCompletion params

Signed-off-by: RBT22 <[email protected]>

* Add default acc params and change decel sign

Signed-off-by: RBT22 <[email protected]>

* Add minimum speed parameter

Signed-off-by: RBT22 <[email protected]>

* Update minimum speed parameter to 0.10

Signed-off-by: RBT22 <[email protected]>

* Log warning when acceleration or deceleration limits are not set

Signed-off-by: RBT22 <[email protected]>

* Add param sign assert

Signed-off-by: RBT22 <[email protected]>

* Remove unnecessary param checking

Signed-off-by: RBT22 <[email protected]>

* Refactor acceleration limits to handle forward and backward movement separately

Signed-off-by: RBT22 <[email protected]>

* Fix sign checking condition

Signed-off-by: RBT22 <[email protected]>

* Replace throwing with silent sign correction

Signed-off-by: RBT22 <[email protected]>

---------

Signed-off-by: RBT22 <[email protected]>
(cherry picked from commit 2ee3cef)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants