0
$\begingroup$

Rosanswers logo

I'm working on writing a ROS node that publishes network statistics as each machine sees them; that is, each node maintains its own directed graph of what it thinks the network is like (latency, reliability, etc.) from the local machine's point of view. I've got most of what I need written, but I'm running into one problem: the naming of the nodes. If I make them anonymous, I'm not sure if the machines can discover each other. If I try to use substitution arguments as shown at http://www.ros.org/wiki/roslaunch/XML, then the arguments that get substituted in are the ones discovered on the machine that runs roslaunch. How do I write a roslaunch file that launches remote machines with parameters that are local to that machine?


Originally posted by CFK on ROS Answers with karma: 16 on 2011-11-01

Post score: 0


Original comments

Comment by CFK on 2011-11-02:
That's because I didn't understand how ROS works well enough; turns out you can only have one Master at a time. Fortunately, Willow Garage is working on it; see http://www.ros.org/wiki/Projects/Building%20Manager/Overview

Comment by joq on 2011-11-01:
I don't clearly understand your use case. Could you say more about what you need?

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

Have you tried defining an <env> tag within a <machine> tag?


Originally posted by joq with karma: 25443 on 2011-11-01

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by CFK on 2011-11-02:
I looked into that, but unless I'm reading the documentation wrong, won't roslaunch still read the environment of the machine its launched off of, rather than the local machine?

$\endgroup$
0
$\begingroup$

Rosanswers logo

If you've having trouble doing it within ROS launch scripts, there's always bash (e.g., in a shell script, ssh in to remote machine and run roslaunch). Less elegant surely, but more flexible (as long as you're on a linux box).

Also, namespaces can help (/machine/somenode).

Finally, the launch-prefix tag in can, in a limited way, bridge between bash and ROS launch (e.g., use xterm or ssh as a launch-prefix).


Originally posted by Nick Armstrong-Crews with karma: 481 on 2011-11-01

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by CFK on 2011-11-02:
I'm probably just going to write up a bash script to do all this. The trick is coming up with multi-master support until Willow Garage adds multi-master support (see http://www.ros.org/wiki/Projects/Building Manager/Overview)

$\endgroup$
0
$\begingroup$

Rosanswers logo

Well, after poking around some more, I've learned the following:

  • I asked the wrong question.
  • ROS can't quite do what I want.

Basically, my assumption was that each robot ran its own Master, with all nodes on that robot answering to that Master. Masters on different robots would peer with one another across a weakly connected interface. That assumption is why so many people are confused by my question. So, here is the complete background on what I'm doing, so everyone can follow along:

I have a group of robots that are communicating over a lossy, multi-hop wireless mesh network. If you want to command a robot to do something, there must be a route to it through the network graph that is good enough (low enough latency, high enough throughput, etc.) for you to communicate. To guarantee this, I want robots that are not currently being teleoperated to autonomously move to locations that will improve network connectivity. This means that each robot needs to gather and maintain information about what the network looks like independent of any other robot (so that if network partition occurs, robots can still try to do something reasonable). As long as there is a network, the robots need to reach consensus on what the network is like, along with a host of other information. To do that, robot A needs to know what robot B's view of the network is like, and vice-versa; using ROS, that would mean I would have my topics/namespaces organized like /A/networkStatus and /B/networkStatus (or some other, similar hierarchy).

But for all of this to work, each robot needs to have its own name. That means that I want the robots to look up their own name in their own parameter server, or their own environment, or whatever. I thought I could do that via a roslaunch file, but now that I know how ROS works a bit better, I now know that the only thing I can really do is setup a bash script to kick-off all the robots remotely. This isn't ideal, but it works, so I'm not going to worry too much about it. Thanks for all the suggestions from everyone!


Originally posted by CFK with karma: 16 on 2011-11-02

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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