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

[Docking] Feature: support for not needing to set dock instances #4442

Conversation

jcarlosgm30
Copy link
Contributor


Basic Info

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

Description of contribution in a few bullet points

The changes made are as follows:

These changes enable the system to work in the following use cases:

  • Setting the dock instances in the parameters or database yaml file.
  • Not setting the dock instances in these files but using the dock pose in the action request or the reload database service.

Also, the reload database service is available in any case where at least one dock plugin has been defined.

Description of documentation updates required from your changes

  • The documentation may need to be updated to reflect the "Not setting ..." use case.

Future work that may be required in bullet points

  • The unit tests may need to be updated to address new changes

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
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.

Generally looks good! Just some small cleanup! You also may need to update some unit tests, currently the dock database tests are failing from these changes.

nav2_bringup/params/nav2_params.yaml Outdated Show resolved Hide resolved
nav2_docking/opennav_docking/src/dock_database.cpp Outdated Show resolved Hide resolved
nav2_docking/opennav_docking/src/dock_database.cpp Outdated Show resolved Hide resolved
nav2_docking/opennav_docking/src/dock_database.cpp Outdated Show resolved Hide resolved
@jcarlosgm30 jcarlosgm30 force-pushed the feature/nav2-docking/support-for-not-needing-to-set-dock-instances branch from 1f3d88f to 9668b29 Compare June 19, 2024 07:13
@SteveMacenski
Copy link
Member

test_dock_database.gtest.missing_result Your changes still are making a test fail, I think you need to look into that, but otherwise this looks good to me! My guess is the change in error handling has made a test fail and then since we pass successfully for no-docks created, something tries to access an empty vector and thus crashes.

But you should look into why that test is failing to make sure its not something in the logic you changed either!

@jcarlosgm30
Copy link
Contributor Author

Yes, that test fails because there is no dock plugin initialized so the /reload_database service will not be created.

The old logic was that the /reload_database service was only created when getDockPlugins and getDockInstances returned false. As we discussed, the new logic creates the /reload_database service whenever at least a dock plugin is initialized.

So I think it will be enough to initialize a dock plugin in the test.

@jcarlosgm30 jcarlosgm30 force-pushed the feature/nav2-docking/support-for-not-needing-to-set-dock-instances branch from 27c6d08 to 9ceccb5 Compare June 20, 2024 08:55
@SteveMacenski SteveMacenski merged commit 43b2388 into ros-navigation:main Jun 20, 2024
9 of 10 checks passed
@SteveMacenski
Copy link
Member

Fabulous, thank you!

ajtudela pushed a commit to ajtudela/navigation2 that referenced this pull request Jun 21, 2024
…-navigation#4442)

* feat: support for not needing to set dock_instances

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

* feat: improve logs for dock_database

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

* chore: comment the dock instances out from nav2_params

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

* chore: dock database cleanup

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

* fix: update reloadDBService from DatabaseTests

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

---------

Signed-off-by: josegarcia <[email protected]>
Co-authored-by: josegarcia <[email protected]>
Marc-Morcos pushed a commit to Marc-Morcos/navigation2 that referenced this pull request Jul 4, 2024
…-navigation#4442)

* feat: support for not needing to set dock_instances

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

* feat: improve logs for dock_database

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

* chore: comment the dock instances out from nav2_params

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

* chore: dock database cleanup

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

* fix: update reloadDBService from DatabaseTests

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

---------

Signed-off-by: josegarcia <[email protected]>
Co-authored-by: josegarcia <[email protected]>
savalena pushed a commit to savalena/navigation2 that referenced this pull request Jul 5, 2024
…-navigation#4442)

* feat: support for not needing to set dock_instances

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

* feat: improve logs for dock_database

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

* chore: comment the dock instances out from nav2_params

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

* chore: dock database cleanup

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

* fix: update reloadDBService from DatabaseTests

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

---------

Signed-off-by: josegarcia <[email protected]>
Co-authored-by: josegarcia <[email protected]>
Manos-G pushed a commit to Manos-G/navigation2 that referenced this pull request Aug 1, 2024
…-navigation#4442)

* feat: support for not needing to set dock_instances

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

* feat: improve logs for dock_database

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

* chore: comment the dock instances out from nav2_params

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

* chore: dock database cleanup

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

* fix: update reloadDBService from DatabaseTests

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

---------

Signed-off-by: josegarcia <[email protected]>
Co-authored-by: josegarcia <[email protected]>
masf7g pushed a commit to quasi-robotics/navigation2 that referenced this pull request Oct 23, 2024
…-navigation#4442)

* feat: support for not needing to set dock_instances

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

* feat: improve logs for dock_database

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

* chore: comment the dock instances out from nav2_params

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

* chore: dock database cleanup

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

* fix: update reloadDBService from DatabaseTests

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

---------

Signed-off-by: josegarcia <[email protected]>
Co-authored-by: josegarcia <[email protected]>
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.

Nav2 Docking: The docking_server does not work if you do not define instances of docks using the DockDatabase
2 participants