Note: This tutorial assumes that you have completed the previous tutorials: Understanding Service Types, Debugging with Avahi Command Line Tools.

Publishing a Ros Master with Avahi

Description: Illustrates how to publish a zeroconf service for your ros master with avahi.

Keywords: zeroconf ros master avahi

Tutorial Level: BEGINNER

Launching

Zero-Conf'ing With Zero Configuration

There is a little bit of magic in the ros node for zeroconf_avahi that auto-generates a unique name based on your host and also auto-detects the port that your ros master is running on.

If your ros master is already running:

> roslaunch zeroconf_avahi ros_master.launch

Alternatively, to add it to a launcher of your own:

<include file="$(find zeroconf_avahi)/resources/launch/ros_master.launch"/>

Zeroconf'ing with Unique Configuration

To zeroconf the ros master with a specific service name, simply recreate ros-master.roslaunch with a substituted name and use that, e.g.:

   1 <launch>
   2   <node ns="zeroconf" pkg="zeroconf_avahi" type="zeroconf" name="zeroconf"  output="screen">
   3     <rosparam param="services">
   4       [ { name: "Concert Master", type: _ros-master._tcp, domain: local } ]
   5     </rosparam>
   6   </node>
   7 </launch>

Testing

You can test to make sure you can see it with the avahi command line tools:

> avahi-browse -r _ros-master._tcp

Wiki: zeroconf_avahi/Tutorials/Publishing a Ros Master with Avahi (last edited 2012-01-03 15:23:06 by DanielStonier)