Documentation Status

Cannot load information on name: zeroconf_avahi, distro: electric, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.


This package provides implementations for zeroconf on top of linux's avahi-daemon. There are two implementations:

  • C++ library.
  • Ros node.

The c++ library can be manipulated directly through the Zeroconf class whereas the ros node provides similar handles through ros topics, services and parameters exposed by the.

How it Works

Both the c++ and node implementations operate on two entities, Listeners and Services.

Listeners are used to discover the appearance and disappearance of all services belong to a specific service type (e.g. _ros-master._tcp). The usual process is to add a listener and then sit back and wait for the callbacks (either c++ or ros subscription) to arrive signifying addition or removal of the specified services.

Services are zeroconf services you wish to publish on the network. They require a name, service type, port and description. If there is a name collision, this package and avahi will rename the service so that it is unique for the lifetime of the current connection.


If you're using the library, it should be relatively straightforward - simply follow the Zeroconf class documentation. There is also an example in zeroconf_avahi_demos.

Alternatively, using the ros node can be done in a variety of ways, refer to the Tutorials.


Zeroconf Node

Provides a ros api for listening and publishing of services.

Published Topics

new_connections (zeroconf_comms/DiscoveredService)
  • streams all new zeroconf services as discovered by the listeners
lost_connections (zeroconf_comms/DiscoveredService)
  • streams all removed zeroconf services as discovered by the listeners


add_listener (zeroconf_comms/AddListener)
  • will add a listener for services of the specified type
add_service (zeroconf_comms/AddService)
  • publishes the specified zeroconf service on the network
remove_service (zeroconf_comms/RemoveService)
  • removes the specified zeroconf service on the network
list_discovered_services (zeroconf_comms/ListDiscoveredServices)
  • lists the currently found services of the specified type
list_published_services (zeroconf_comms/ListPublishedServices)
  • lists all zeroconf services published by this node


~services (array[structs], default: [])
  • array of structs specifying services to publish (see example code)

See the example on static configuration for an illustration of the usage of the listeners and services parameters:

Wiki: zeroconf_avahi (last edited 2013-09-30 06:53:21 by DanielStonier)