turtlebot / turtlebot4

Turtlebot4 common packages.
Apache License 2.0
92 stars 43 forks source link

Error launching nav2 with FastDDS #398

Closed alexdo105 closed 1 month ago

alexdo105 commented 2 months ago

Robot Model

Turtlebot4 Standard

ROS distro

Humble

Networking Configuration

Discovery Server

OS

Ubuntu 22.04

Built from source or installed?

Built from Source

Package version

turtlebot4_navigation nav2.launch.py

Type of issue

Navigation (SLAM, Nav2 etc.)

Expected behaviour

Nav2 starts and should wait for a position to navigate.

Actual behaviour

Nav2 does not starts correctly when using discovery server, stays waiting for service controller_server/get_state indefinitely.

Error messages

Waiting for service controller_server/get_state...

To Reproduce

Launch the localization node ros2 launch turtlebot4_navigation localization.launch.py map:=office.yaml

Launch the nav2 node ros2 launch turtlebot4_navigation nav2.launch.py

Other notes

Before changing the networking to discovery server I had other problems such as that the base kept disconnecting very easy from the network, that is why I changed to discovery server. Now, I do not have problems like not getting the topics from the base, but I have these problems now, maybe it is a problem that I caused when I did the change to discovery server, but from my understanding, if that was the case I wouldn't be able to read the topics from the base. Another interesting thing is that I am running it from my computer which has ROS2 Humble, and the turtlebot4 is using ROS2 Galactic. Again, I have been working with the robot like this I did not have problems, so I do not see why the problems would start now, unless you say otherwise @hilary-luo ... What do you think? Thanks for the help!

smatarCPR commented 2 months ago

Hello @alexdo105 , Thank you for reaching out on the Turtlebot 4 Github page. With regards to the issue you are seeing, it is very likely that this is due to the version mismatch present. You indicated that your computer is running ROS Humble, while the Turtlebot is running ROS Galactic. While some messages may work across the two platforms, it was very likely that certain messages would not be interpreted properly, and this is what you are seeing.

It is highly recommended that you upgrade the Turtlebot4 to ROS 2 Humble, as Galactic has reached end of life and will no longer be receiving any updates. To do so, following our guide linked here:

  1. Find the latest TurtleBot 4 Raspberry Pi images at http://download.ros.org/downloads/turtlebot4/
  2. Download the latest image and extract it.
  3. Power off your robot and then remove the microSD card from the Raspberry Pi.
  4. Insert the microSD card into your PC. You may need an adapter.
  5. Install the imaging tool dcfldd: sudo apt install dcfldd
  6. Identify the SD card using sudo fdisk -l
  7. If you wish to back up the contents on the SD card: sudo dd if=/dev/ of= bs=1M
  8. Get the SD flash script from turtlebot4_setup: wget https://raw.githubusercontent.com/turtlebot/turtlebot4_setup/humble/scripts/sd_flash.sh
  9. Flash the SD Card: bash sd_flash.sh /path/to/downloaded/image
  10. Be sure to flash the corresponding firmware to the Create3 Unit. https://iroboteducation.github.io/create3_docs/releases/overview/

If following the upgrade you are still encountering issues, please send the full terminal output from the terminals launching Nav2 and the localization node.

Looking forward to hearing from you soon. Best Regards, Saif

smatarCPR commented 1 month ago

Hello, This issue is being closed due to inactivity. If you are still experiencing the issue, feel free to reopen this ticket when you are ready to continue the troubleshooting process. Best Regards, Saif

albertuswh commented 1 month ago

i have the same problem, but both my PC and Turtlebot are already in humble version.