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

Adds support for namespaces to TurtleBot4Navigator. #487

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

Pbopbo
Copy link
Contributor

@Pbopbo Pbopbo commented Oct 28, 2024

Description

Currently it is not possible to use the Turtlebot4Navigator while also using the concept of namespaces.
The Turtlebot4Navigator class inherits form the BasicNavigator class.
The BasicNavigators class __init fucntion has the signature:

def __init__(self, node_name='basic_navigator', namespace=''):

In this PR the namespace parameter is exposed in the __init function of the Turtlebot4Navigator.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

I ran the tutorial code given at https://turtlebot.github.io/turtlebot4-user-manual/tutorials/turtlebot4_navigator.html#navigate-to-pose which previously failed previously because some topics could not be found. (Because their names are prefixed by the namespace).
With this change the library works fine.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

@hilary-luo
Copy link
Contributor

Note that although this updates Turtlebot4Navigator to receive a namespace, users must still manually pass the namespace when creating the BasicNavigator object which requires modification of the individual tutorial codes. No documentation has been updated at this point to indicate that this is an option.

@hilary-luo hilary-luo merged commit cb6ab27 into turtlebot:humble Oct 30, 2024
1 check passed
@hilary-luo
Copy link
Contributor

FYI @civerachb-cpr for Jazzy

@civerachb-cpr
Copy link
Contributor

Cherry-picked into jazzy

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