0
$\begingroup$

I am trying to run the Interactive GPS Waypoint Follower. I have launch these instruction: TERMINAL 1: ros2 launch nav2_gps_waypoint_follower_demo gps_waypoint_follower.launch.py use_rviz:=False TERMINAL 2: ros2 launch nav2_gps_waypoint_follower_demo mapviz.launch.py TERMINAL 3: ros2 run nav2_gps_waypoint_follower_demo interactive_waypoint_follower

When I run interactive_waypoint_follower node and click on mapviz to send waypoint I get fle ollowing output from its terminal(TERMINAL 3):

ros2 run nav2_gps_waypoint_follower_demo interactive_waypoint_follower
[INFO] [1701172139.520198172] [basic_navigator]: robot_localization/get_state service not available, waiting...
[INFO] [1701172140.522618706] [basic_navigator]: robot_localization/get_state service not available, waiting...
[INFO] [1701172141.524480719] [basic_navigator]: robot_localization/get_state service not available, waiting...
[INFO] [1701172142.526854488] [basic_navigator]: robot_localization/get_state service not available, waiting...
[INFO] [1701172143.529257288] [basic_navigator]: robot_localization/get_state service not available, waiting...
[INFO] [1701172144.531678462] [basic_navigator]: robot_localization/get_state service not available, waiting...
[INFO] [1701172145.533696952] [basic_navigator]: robot_localization/get_state service not available, waiting...
[INFO] [1701172146.535800306] [basic_navigator]: robot_localization/get_state service not available, waiting...

And this from nav2_gps_waypoint_follower_demo mapviz terminal(TERMINAL 2):

[mapviz-1] [WARN] [1701172112.460493075] [swri_transform_util::Transformer]: Wgs84Transformer not initialized
[mapviz-1] [WARN] [1701172112.460534350] [swri_transform_util::Transformer]: Wgs84Transformer not initialized
[initialize_origin.py-2] [INFO] [1701172112.461930965] [initialize_origin]: Got NavSat message.
[initialize_origin.py-2] [INFO] [1701172112.462575108] [initialize_origin]: Origin from 'navsat' source set to 38.1614564605658, -122.45460714408775, 488.3200360890478
[initialize_origin.py-2] [INFO] [1701172112.463337905] [initialize_origin]: Successfully set origin; unsubscribing.
[mapviz-1] [INFO] [1701172112.480655151] [mapviz]: OK
[mapviz-1] [INFO] [1701172112.482309682] [mapviz]: OK
[mapviz-1] [INFO] [1701172138.485441870] [mapviz]: Point in wgs84: -122.454,38.1612

Why the robot_localization/get_state service is not avaiable? I have not change anything in the example code.

I am using the master branch of navigation2_tutorials

$\endgroup$
2
  • $\begingroup$ The gps_waypoint_follower.launch.py wants to add a robot_localization_cmd, which is a reference to dual_ekf_navsat.launch.py. The tutorial (Localization Testing section) says to launch dual_ekf_navsat.launch.py; does it run for you? $\endgroup$
    – Chuck
    Commented Nov 28, 2023 at 15:47
  • $\begingroup$ The other thing that may have been skipped is the robot state publisher; Step 0 in the tutorial says to "test your gazebo world is properly set up by launching: ros2 launch nav2_gps_waypoint_follower_demo gazebo_gps_world.launch.py". That launch file starts a robot state publisher that only appears to get started with this particular launch file. $\endgroup$
    – Chuck
    Commented Nov 28, 2023 at 15:51

2 Answers 2

0
$\begingroup$

Are you using an older version of the nav2 simple commander? It should have a specific call out for robot_localization since its non-lifecycle:

    def waitUntilNav2Active(self, navigator='bt_navigator', localizer='amcl'):
        """Block until the full navigation system is up and running."""
        if localizer != 'robot_localization':  # non-lifecycle node
            self._waitForNodeToActivate(localizer)
        if localizer == 'amcl':
            self._waitForInitialPose()
        self._waitForNodeToActivate(navigator)
        self.info('Nav2 is ready for use!')
        return
$\endgroup$
4
  • $\begingroup$ Hi, the problem is I am working on ROS Humble. Reading some post on navigation2 github page I have found that nav2_gps_waypoint_follower is not implemented on Humble(github.com/ros-planning/navigation2/pull/…). Now I am trying to use the Iron version because I specifically need that. At the moment I was able to compile il, but I get this error: [ERROR] [launch]: Caught exception in launch (see debug for traceback): cannot import name 'PushROSNamespace' from 'launch_ros.actions' (/opt/ros/humble/lib/python3.10/site-packages/launch_ros/actions/__init__.py) $\endgroup$ Commented Nov 29, 2023 at 8:39
  • $\begingroup$ Now I am trying to find if a solution exist... $\endgroup$ Commented Nov 29, 2023 at 8:41
  • $\begingroup$ It sounds like you're mixing branches. Use only the proper branch (or just use the binaries) for the distribution you're using only. $\endgroup$ Commented Nov 29, 2023 at 19:11
  • $\begingroup$ I am not mixing branches, I was following the official tutorials using ROS HUMBLE and there is an example about waypoint navigation with GPS. Since I need that feature in my project and I am stuck on ROS Humble for other requirements, NOW I am trying to integrate it from Iron to Humble. Previously in my other posts and in the previously tutorials, I have only use the navigation2 HUBLE branch. If this integration does not end well...I will try to upgrade my ROS from HUMBLE to IRON until JAZZY JALISCO will be released. $\endgroup$ Commented Nov 30, 2023 at 8:47
0
$\begingroup$

The only way to have this fixed is upgrade to ROS2 IRON...and use Ubuntu 22.04 I also had these issues and spent a lot of time trying to fix changing classes, passing args etc. Nothing works. Easier way, just go to Iron!

$\endgroup$
1
  • $\begingroup$ I know that is an quick solution, but Iron is not a LTS version... $\endgroup$ Commented Feb 1 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.