question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using multimaster with 2 identical robots and a ground station

See original GitHub issue

Hi, I’d like to use multimaster for a setup with 3 machines, each running their own ROS master. One of the machines is a ground station, while the other 2 are identical vehicles with many nodes and topics. I would only like a small subset of topics from each of the vehicles to be shared with the base station alone. On each of the vehicles, I launch:

<launch>
  <arg name="robot_name" default="robot0" />
  <node name="master_discovery" pkg="master_discovery_fkie" type="master_discovery" >
  </node>
  <!-- Launch the relay node -->
  <node pkg="topic_tools" type="relay" name="robot_relay" args="/shared_topic /$(arg robot_name)/shared_topic" />
</launch>

with a different "robot_name" argument for each since I want the base station to differentiate between this shared_topic. On the base station, I launch:

<launch>
  <node name="master_discovery" pkg="master_discovery_fkie" type="master_discovery" output="screen">
  </node>
  <node name="master_sync" pkg="master_sync_fkie" type="master_sync" output="screen">
    <rosparam param="sync_topics"> ['/robot0/shared_topic', '/robot1/shared_topic'] </rosparam>
  </node>
</launch>

which allows the base station to successfully receive /robot0/shared_topic OR /robot1/shared_topic when only one of the vehicle’s has launched the first launch file. When I try to run both, I get the following warning before the nodes on the vehicle shutdown:

Reason given for shutdown: [new node registered with same name].

Each vehicle and the base station have their own ROS Master with their own local IP address as the ROS_MASTER_URI. I was under the impression that master_discovery simply makes the machines aware of one another, and only master_sync will cause collisions like this. Is there some argument that master_discovery needs like "ignore_hosts" or "ignore_nodes"? I only want the ground station to be aware of a few topics from each vehicle, but the fact that the vehicles have a large number of nodes with the same name prevents this. I realize I could namespace each vehicle so that the topics and nodes all have different names, but I was wondering if there was another solution with just arguments to the launch files I have here, or if I’m misunderstanding the default behaviour of master_discovery. Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mattgiamoucommented, Sep 2, 2016

Ahhh thank you so much, that did the trick! I had read elsewhere that for single ROS master setups I should avoid setting ROS_MASTER_URI explicitly, but that made it become localhost. It works great now!

0reactions
sunil1349commented, Feb 20, 2019

how can give my shared topics to sync node from launch file

Read more comments on GitHub >

github_iconTop Results From Across the Web

The ROS Multimaster Extension for Simplified Deployment of ...
This tutorial chapter describes how to set up a multi-robot system in ROS with the multimaster_fkie package. The package adds ROS support ...
Read more >
Programming Multiple Robots with ROS 2 - GitHub Pages
In this book, we will introduce the Robot Operating System 2 (ROS 2) as well as the Robot Middleware Framework (RMF), which is...
Read more >
[ROS2 Q&A] How to setup identical robots for multi-robot ...
In this post, we will learn multi-robot navigation in ROS 2 working with 2 identical robots using ROS Navigation 2.
Read more >
Practical Implementation of a Mesh Network in th - arXiv
ground robots, deployable mesh extender nodes, and a human ... multimaster fkie2 links independent masters together by cross-.
Read more >
Information Distribution in Multi-Robot Systems: Utility-Based ...
We present an analytical model that helps evaluate and compare different information distribution schemes in a robotic mission. It serves as a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found