turtlebot / turtlebot4_setup

TurtleBot 4 setup tools and configuration files.
Apache License 2.0
20 stars 5 forks source link

Computer cannot communicate with itself without an active TurtleBot while using the new discovery server setup #12

Open WallerJonathan opened 4 months ago

WallerJonathan commented 4 months ago

Robot Model

Turtlebot4 Lite

ROS distro

Humble

Networking Configuration

Discovery Server

OS

Ubuntu 22.04

Built from source or installed?

Installed

Package version

Computer is at the most recent updates through apt and does NOT have the new turtlebot4_setup package (still at version 1.0.3).

TurtleBots are at the most recent updates through apt and uses the new turtlebot4_setup (version 1.0.4).

Expected behaviour

The desktop can do anything ROS 2 related fine on its own.

Actual behaviour

The desktop is unable to see any other ros2 topics, nodes, etc. that are launched on the desktop. This problem happens when there are no active TurtleBots. In addition, I commented out the source /etc/turtlebot4_discovery/setup.bash from .bashrc and all ros2 functionality returned after restarting the computer; the problem reoccurred after adding the phrase back in.

In addition, I found that if you connect a single TurtleBot with the discovery server (which works well!) to the base station, then turn the TurtleBot off, the topics get stuck on the desktop.

Error messages

No error messages, you just can't see any topics or nodes.

To Reproduce

  1. Configure the new discovery server on multiple TurtleBots (I am using 2 TurtleBot Lites) as described in the new discovery server documentation
  2. Run the wget -qO - https://raw.githubusercontent.com/turtlebot/turtlebot4_setup/humble/turtlebot4_discovery/configure_discovery.sh | bash <(cat) </dev/tty command found in the new discovery server documentation
  3. Turn off the TurtleBots and ENSURE that no TurtleBot is connected to the network
  4. Try running a program like ros2 run demo_nodes_cpp talker and, in a seperate terminal, run ros2 topic list to see the problem

Other notes

Otherwise this update is working quite well. I am going to ping @hilary-luo just because I know you worked on this, so it is possible there is some nuance that I missed (hoping this isn't a bug and I just messed up)! If there is any other information that you need from me, just let me know!

hama6767 commented 4 months ago

Hi there

I had same problem. I have temporary solution to use previous version manualy so share as a reference.

Robot Model

Turtlebot4 standard

ROS distro

Humble

Networking Configuration

Discovery Server

OS

Ubuntu 22.04

Built from source or installed?

Installed


Temporaly solution

I cloned directly this repository and copied it to ´/tmp´ dir (under the root) Checkout to the previous commit "3c033b4", and run directly like ´pi5@pi5:/tmp/turtlebot4_setup/turtlebot4_discovery$ bash configure_discovery.sh | bash <(cat) </dev/tty´

Then it works.

I guess that ip routing setup maybe not setup correctly with newer version script.

WallerJonathan commented 4 months ago

Hi @hama6767, thanks for the temporary solution; I will try this later today or early next week.

Before I go on with it, did you run the clone, checkout, and command on the raspberry pi of the TurtleBot or your own personal desktop?

hama6767 commented 4 months ago

@WallerJonathan Hi Jonathan,

Sorry it is little bit confusing. I use another pi as host computer. So in your case, you just do same thing on your laptop/desktop.

hilary-luo commented 4 months ago

@WallerJonathan Apologies on the delay of my response. Somehow I missed this notification.

What you are describing sounds like expected operation so I will share some information and then you can judge whether the performance that you are seeing aligns:

When you set up your robot and remote PC for discovery server what you are doing is that you are telling all ROS 2 nodes to use that particular server to discover other nodes. Although with the Turtlebot 4 product we try to streamline this setup process for you, it is a piece of core functionality of the ROS 2 FastDDS middleware. This does indeed mean that having your computer set up for discovery server means that any ROS 2 nodes started on the computer will only report their discovery info to that server and will only be able to discover other nodes using that server. Your options are either 1) always have a turtlebot running or b) add a local server on your PC that you run whenever you want to operate without the robot (your computer can look for both simultaneously and both servers can be on simultaneously but that does have other implications) or 3) you can actively switch between discovery server and simple discovery by changing what you have sourced in your terminal.

@hama6767 If you are using the latest software that is not yet available through apt then please also use the latest documentation in this PR: https://github.com/turtlebot/turtlebot4-user-manual/pull/22/files#diff-c723a483ece2a309b187f43ee7bf4faa020e6ea9c51e4d29bced9c2ba55f7c8f The documentation does go through why IP route is no longer used and the setup tool will remove the historical create3 routes that were created. If you are having issues with it then it probably means that you did not update your turtlebot4_robot package to align with the new setup package. The changes rely on each other. Do note, no matter the IP routing, that will not change how discovery server works and that it needs a server present.