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

Clean up action clients in nav2_simple_commander #2924

Merged

Conversation

m2-farzan
Copy link
Contributor


Basic Info

Info Please fill out this column
Ticket(s) this addresses #2923
Primary OS tested on Ubuntu
Robotic platform tested on -

Description of contribution in a few bullet points

Description of documentation updates required from your changes

  • Removes an unwanted warning
  • Enables controlled release of resources

Future work that may be required in bullet points

For Maintainers:

  • Check that any new parameters added are updated in navigation.ros.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

@mergify
Copy link
Contributor

mergify bot commented Apr 24, 2022

@m2-farzan, please properly fill in PR template in the future. @SteveMacenski, use this instead.

  • Check that any new parameters added are updated in navigation.ros.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

@jwallace42 jwallace42 left a comment

Choose a reason for hiding this comment

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

Looks good! I think you still need to call destroy_node in the python files using the robot navigator.

@SteveMacenski
Copy link
Member

SteveMacenski commented Apr 26, 2022

I'm not too much of a python ros2 developer, so is destroy_node called automatically by the Node class to need to be called specifically that with snake_case? Or is this a user's need to call this, in that case it should follow our naming conventions here as camcelCase & have its addition documented on the API page of navigation.ros.org / in this package's readme.

Otherwise LGTM

@m2-farzan
Copy link
Contributor Author

@jwallace42 destroy_node is only required if we want to create a basic_navigator node right after we are done with another one (e.g. in unit tests). This is not the case in our python demos, so I don't think we need to modify them.

@m2-farzan
Copy link
Contributor Author

@SteveMacenski destroy_node is inherited from Node base class. I couldn't find in docs if it's called automatically or not but this little comment suggests it might be. Either way, it's common practice to use destroy_node to clean up after a node. So I found it best to add a camelCase version while keeping the snake_case version there for compatibility & consistency (i.e. to avoid destroy_node and destroyNode from behaving differently).

In the long term the issue should be addressed in the upstream: ros2/rclpy#524

@SteveMacenski
Copy link
Member

I'm fine with that -- I prefer defensive programming

@SteveMacenski SteveMacenski merged commit 02133bd into ros-navigation:main Apr 27, 2022
@SteveMacenski
Copy link
Member

Thanks for the contribution!

SteveMacenski pushed a commit that referenced this pull request May 6, 2022
* Clean up action clients in nav2_simple_commander

* Add camelCase version

* Add docs
SteveMacenski added a commit that referenced this pull request May 6, 2022
* fix invert logic (#2772)

* Bugfix tf lookup of goal pose in nav2_controller (#2780)

Signed-off-by: Erik Örjehag <erik@orjehag.se>

* Feature to call controller action server to follow path (#2789)

* Added call to controller action server with a path to follow
++ Added a new function  in robot_navigator,py
++ Added a launch script to test  function
++ Updated setup.py to include demo_follow_path.py

* Code refactoring

* Code refactoring

* Code refactoring for consistency

* Updated README.md

* Resolved executable conflict in setup.py for example_follow_path.py

* Code refactoring with  ament_flake8

* Add recoveries to simple commander (#2792)

* fix Typo

* add recoveries

* add docs

* added demo using backup and spin

* rename isNavigationComplete to isTaskComplete

* rename cancelNav to cancelTask

* add prints

* fix premature exit

* rename NavResult to TaskResult

* fix readme order

* fix import order

* renaming

* renaming

* added planner_id (#2806)

* Fixing the issue #2781: raytraceLine with same start and end point (#2784)

* Fixing the issue #2781: raytraceLine with same start and end point no longer causes segmentation fault

* Some whitespace modifications to make the code pass release_test

* Add testcase for raytraceLine the same point

Co-authored-by: Alexey Merzlyakov <60094858+AlexeyMerzlyakov@users.noreply.github.com>

* Add optional node names to wait (#2811)

* add option to specify navigator and localizer to wait for

* add docs for waituntilNav2Active

* wait for pose only for amcl

* revert order

* remove resizing on update message callback (#2818)

* restrict test_msgs to test_dependency (#2827)

Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>

* remove unused odometry smoother in bt navigator (#2829)

* remove unused odometry smoother in bt navigator

Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>

* reorganize bt navigator to shared odom_smoother object with servers

Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>

* Add all action options (#2834)

* added options

* update docs

* Adding theta* to the main packages list

* Fix: bt_navigator crashes on lc transitions (#2848)

* fix empty address access on halt all actions

* fix unsafe declaration of parameters

* restore odom smoother

* fix styling issues

* add missing semicolumn

* fix-collision checker must capture lethal before unknow (#2854)

* Removing old unused function and comment (#2863)

* Better Costmap Error Message (#2884)

* Better Costmap Error Message

* PR Feedback

* add getRobotRadius() in costmap_2d_ros (#2896)

* Add clock time to costmaps (#2899)

* update goal checker plugin to plugins (#2909)

* Allow usage of std::string in searchAndGetParam() (#2918)

* Allow usage of std::string in searchAndGetParam()

Removed also old TODO related to legacy ROS API

* Fix

* Clean up action clients in nav2_simple_commander (#2924)

* Clean up action clients in nav2_simple_commander

* Add camelCase version

* Add docs

* Added mutex to prevent SEGFAULT on map change in AMCL (#2933)

* Added mutex to prevent SEGFAULT on map change

* Removing redundant mutex

Co-authored-by: Antonio Marangi <antonio.marangi@alba-robot.com>

Co-authored-by: G.Doisy <doisyg@users.noreply.github.com>
Co-authored-by: Erik Örjehag <erik@orjehag.se>
Co-authored-by: Ekansh Sharma <ekanshh.sharma@gmail.com>
Co-authored-by: Tony Najjar <tony.najjar@logivations.com>
Co-authored-by: Joshua Wallace <47819219+jwallace42@users.noreply.github.com>
Co-authored-by: janx8r <95029851+janx8r@users.noreply.github.com>
Co-authored-by: Alexey Merzlyakov <60094858+AlexeyMerzlyakov@users.noreply.github.com>
Co-authored-by: Andrii Maistruk <71632363+andriimaistruk@users.noreply.github.com>
Co-authored-by: Alberto Soragna <alberto.soragna@gmail.com>
Co-authored-by: Erwin Lejeune <erwin.lejeune@cm-robotics.com>
Co-authored-by: Hossein Sheikhi Darani <64957461+HosseinSheikhi@users.noreply.github.com>
Co-authored-by: David V. Lu!! <davidvlu@gmail.com>
Co-authored-by: Carlos Andrés Álvarez Restrepo <candres.alv@gmail.com>
Co-authored-by: Patrick Roncagliolo <ronca.pat@gmail.com>
Co-authored-by: M. Mostafa Farzan <m2_farzan@yahoo.com>
Co-authored-by: mrmara <48493979+mrmara@users.noreply.github.com>
Co-authored-by: Antonio Marangi <antonio.marangi@alba-robot.com>
redvinaa pushed a commit to EnjoyRobotics/navigation2 that referenced this pull request Jun 30, 2022
* Clean up action clients in nav2_simple_commander

* Add camelCase version

* Add docs
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.

3 participants