ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Nav2 has no problem using any localizer you choose. If it provides the map to odom transformation, the rest of the system doesn't care which is used.

From [basic_navigator], that look to me like you're using the Simple Commander API. We wait for the pose to be received in the waitUntilNav2Active function: https://github.com/ros-planning/navigation2/blob/987fe905ec58a97ec85c485a1733ead585a5bc7f/nav2_simple_commander/nav2_simple_commander/robot_navigator.py#L311-L318

As you can see from the signature, you can specify the localizer node's name being used. Only when this is set to AMCL will this wait for that topic to receive a pose. Otherwise, it does not.

def waitUntilNav2Active(self, navigator='bt_navigator', localizer='amcl'):
    """Block until the full navigation system is up and running."""
    self._waitForNodeToActivate(localizer)
    if localizer == 'amcl':
        self._waitForInitialPose()
    self._waitForNodeToActivate(navigator)
    self.info('Nav2 is ready for use!')
    return

Nav2 has no problem using any localizer you choose. If it provides the map to odom transformation, the rest of the system doesn't care which is used.

From [basic_navigator], that look to me like you're using the Simple Commander API. We wait for the pose to be received in the waitUntilNav2Active function: https://github.com/ros-planning/navigation2/blob/987fe905ec58a97ec85c485a1733ead585a5bc7f/nav2_simple_commander/nav2_simple_commander/robot_navigator.py#L311-L318

As you can see from the signature, you can specify the localizer node's name being used. Only when this is set to AMCL will this wait for that topic to receive a pose. Otherwise, it does not.

def waitUntilNav2Active(self, navigator='bt_navigator', localizer='amcl'):
    """Block until the full navigation system is up and running."""
    self._waitForNodeToActivate(localizer)
    if localizer == 'amcl':
        self._waitForInitialPose()
    self._waitForNodeToActivate(navigator)
    self.info('Nav2 is ready for use!')
    return

It just looks to me like you need to specify your localization node to wait for activation correctly.

Nav2 has no problem using any localizer you choose. If it provides the map to odom transformation, the rest of the system doesn't care which is used.

From [basic_navigator], that look to me like you're using the Simple Commander API. We wait for the pose to be received in the waitUntilNav2Active function: https://github.com/ros-planning/navigation2/blob/987fe905ec58a97ec85c485a1733ead585a5bc7f/nav2_simple_commander/nav2_simple_commander/robot_navigator.py#L311-L318

As you can see from the signature, you can specify the localizer node's name being used. Only when this is set to AMCL will this wait for that topic to receive a pose. Otherwise, it does not.

def waitUntilNav2Active(self, navigator='bt_navigator', localizer='amcl'):
    """Block until the full navigation system is up and running."""
    self._waitForNodeToActivate(localizer)
    if localizer == 'amcl':
        self._waitForInitialPose()
    self._waitForNodeToActivate(navigator)
    self.info('Nav2 is ready for use!')
    return

It just looks to me like you need to specify your localization node to wait for activation correctly.

correctly. This is also specified in the Nav2 documentation on the API https://navigation.ros.org/commander_api/index.html