Permalink
Browse files

Initial version of zeroconf tools for ROS

  • Loading branch information...
1 parent 1336e81 commit 17b45e43ca81c5ab17604ae34edbec4984cc8724 I Heart Robotics committed Sep 8, 2010
@@ -0,0 +1,7 @@
+python-avahi:
+ ubuntu: python-avahi
+ debian: python-avahi
+
+avahi-daemon:
+ ubuntu: avahi-daemon
+ debian: avahi-daemon
@@ -0,0 +1,3 @@
+bin/
+build/
+src/zeroconf
@@ -0,0 +1,30 @@
+cmake_minimum_required(VERSION 2.4.6)
+include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
+
+# Set the build type. Options are:
+# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
+# Debug : w/ debug symbols, w/o optimization
+# Release : w/o debug symbols, w/ optimization
+# RelWithDebInfo : w/ debug symbols, w/ optimization
+# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
+#set(ROS_BUILD_TYPE RelWithDebInfo)
+
+rosbuild_init()
+
+#set the default path for built executables to the "bin" directory
+set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
+#set the default path for built libraries to the "lib" directory
+set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
+
+#uncomment if you have defined messages
+rosbuild_genmsg()
+#uncomment if you have defined services
+rosbuild_gensrv()
+
+#common commands for building c++ executables and libraries
+#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
+#target_link_libraries(${PROJECT_NAME} another_library)
+#rosbuild_add_boost_directories()
+#rosbuild_link_boost(${PROJECT_NAME} thread)
+#rosbuild_add_executable(example examples/example.cpp)
+#target_link_libraries(example ${PROJECT_NAME})
@@ -0,0 +1,19 @@
+Startup options to publish the MASTER_URI using Avahi
+------------------------------------------------
+1) add a zeroconf node to the launch file of the master
+2) add ros-master.service to /etc/avahi/services on the machine that runs rosmaster
+ cp ros-master.service /etc/avahi/services/.
+3) add zeroconf directly to roscore startup via this patch
+ patch `rospack find roslaunch`/roscore.xml < roscore.xml.patch
+
+
+Avahi does not currently support ROS service types and the build script isn't installed by default. The following commands will install updated files if you have not modified them, if you have previously modified these files you should know what to do. In the future a patch needs to be sent to the Avahi maintainers.
+------------------------------------------------
+ cp `rospack find zeroconf`/config/service-types /usr/share/avahi/service-types
+ cp `rospack find zeroconf`/config/service-types.db /usr/lib/avahi/service-types.db
+
+
+The service-discovery-applet does not support ROS service types by default, however the following command will add support.
+------------------------------------------------
+
+ gconftool --load service-discovery-applet.xml
@@ -0,0 +1 @@
+include $(shell rospack find mk)/cmake.mk
@@ -0,0 +1,9 @@
+<?xml version="1.0" standalone='no'?>
+<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
+<service-group>
+<name>ROS Master</name>
+<service>
+<type>_ros-master._tcp</type>
+<port>11311</port>
+</service>
+</service-group>
@@ -0,0 +1,8 @@
+--- ros/ros/tools/roslaunch/roscore.xml.bak 2010-09-07 07:11:55.000000000 -0400
++++ ros/ros/tools/roslaunch/roscore.xml 2010-09-07 07:12:35.711024107 -0400
+@@ -8,4 +8,5 @@
+ <master auto="start" />
+ <!-- all the nodes in the core file must have the name attribute specified -->
+ <node pkg="rosout" type="rosout" name="rosout" respawn="true"/>
++ <node name="zeroconf" pkg="zeroconf" type="zeroconf.py" respawn="true"/>
+ </launch>
@@ -0,0 +1,11 @@
+<gconfentryfile>
+ <entrylist base="/apps/service-discovery-applet/services">
+ <entry>
+ <key>_ros-master._tcp</key>
+ <value>
+ <bool>true</bool>
+ </value>
+ </entry>
+ </entrylist>
+</gconfentryfile>
+
@@ -0,0 +1,236 @@
+# This file is part of avahi.
+#
+# avahi is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# avahi is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+# Feel free to add more service types or translatons to this database.
+# Please refrain from copying bulk service type data from any publicly
+# available database unless its license is known and compatible with
+# our project! The database available on
+#
+# http://www.dns-sd.org/ServiceTypes.html
+#
+# is not a source that complies with the criterion!
+
+### This list is NOT intended to be used as developer
+### documentation. If you're looking for the correct service type to
+### use for your application please refer to the URL mentioned above.
+
+
+# Devices
+
+_workstation._tcp:Workstation
+_workstation._tcp[de]:Arbeitsplatzrechner
+_workstation._tcp[it]:Macchine
+
+
+# Web
+
+_http._tcp:Web Site
+_http._tcp[de]:Web-Angebot
+_http._tcp[it]:Sito Web
+
+_https._tcp:Secure Web Site
+_https._tcp[de]:Sicheres Web-Angebot
+_https._tcp[it]:Sito Web sicuro
+
+_rss._tcp:Web Syndication RSS
+
+
+# Network
+
+_domain._udp:DNS Server
+_domain._udp[de]: DNS-Dienst
+
+_ntp._udp:NTP Time Server
+
+_smb._tcp:Microsoft Windows Network
+_smb._tcp[it]:Rete Microsoft Windows
+
+_airport._tcp:Apple AirPort
+
+
+# File and data access
+
+_ftp._tcp:FTP File Transfer
+_ftp._tcp[de]:FTP-Dateifreigabe
+
+_tftp._udp:TFTP Trivial File Transfer
+
+_webdav._tcp:WebDAV File Share
+_webdav._tcp[it]:WebDAV Condivisione File
+
+_webdavs._tcp:Secure WebDAV File Share
+_webdavs._tcp[it]:WebDAV Condivisione File Sicuro
+
+_afpovertcp._tcp:Apple File Sharing
+
+_nfs._tcp:Network File System
+
+_sftp-ssh._tcp:SFTP File Transfer
+
+_apt._tcp:APT Package Repository
+_apt._tcp[it]:APT - Repository dei Pacchetti
+
+_odisk._tcp:DVD or CD Sharing
+
+_adisk._tcp:Apple TimeMachine
+
+
+# Remote machine access
+
+_ssh._tcp:SSH Remote Terminal
+_ssh._tcp[de]:SSH-Fernzugriff
+_ssh._tcp[it]:SSH Terminale remoto
+
+_rfb._tcp:VNC Remote Access
+_rfb._tcp[it]:Controllo remoto VNC
+
+_telnet._tcp:Telnet Remote Terminal
+_telnet._tcp[it]:Telnet Terminale Remoto
+
+_timbuktu._tcp:Timbuktu Remote Desktop Control
+
+_net-assistant._udp:Apple Net Assistant
+
+_udisks-ssh._tcp:Remote Disk Management
+
+# Mail
+
+_imap._tcp:IMAP Mail Access
+_imap._tcp[it]:Posta - IMAP
+
+_pop3._tcp:POP3 Mail Access
+_pop3._tcp:Posta - POP3
+
+
+# Printing
+
+_printer._tcp:UNIX Printer
+_printer._tcp[it]:Stampante UNIX
+
+_pdl-datastream._tcp:PDL Printer
+_pdl-datastream._tcp[it]:Stampante PDL
+
+_ipp._tcp:Internet Printer
+
+
+# Multimedia
+
+_daap._tcp:iTunes Audio Access
+_daap._tcp[de]:iTunes Audio-Zugriff
+_daap._tcp[it]:Accesso Audio iTunes
+
+_dacp._tcp:iTunes Remote Control
+
+_realplayfavs._tcp:RealPlayer Shared Favorites
+_realplayfavs._tcp[it]:RealPlayer - Preferiti Condivisi
+
+_raop._tcp:AirTunes Remote Audio
+
+_rtsp._tcp:RTSP Realtime Streaming Server
+_rtp._udp:RTP Realtime Streaming Server
+
+_dpap._tcp:Digital Photo Sharing
+_dpap._tcp[it]:Condivisione Foto
+
+_pulse-server._tcp:PulseAudio Sound Server
+_pulse-sink._tcp:PulseAudio Sound Sink
+_pulse-source._tcp:PulseAudio Sound Source
+
+_mpd._tcp:Music Player Daemon
+
+_remote-jukebox._tcp:Remote Jukebox
+
+# DAAP share provided by iTunes on behalf of an iPod Touch
+_touch-able._tcp:iPod Touch Music Library
+
+_vlc-http._tcp:VLC Streaming
+
+
+# Communication, presence, working together
+
+_presence._tcp:iChat Presence
+
+_sip._udp:SIP Telephony
+_sip._udp[de]:SIP-Telefonie
+_sip._udp[it]:Telefonia-SIP
+
+_h323._tcp:H.323 Telephony
+_h323._tcp[de]:H.323-Telefonie
+_h323._tcp[it]:Telefonia-H.323
+
+_presence_olpc._tcp:OLPC Presence
+
+_iax._udp:Asterisk Exchange
+
+_skype._tcp:Skype VoIP
+
+_see._tcp:SubEthaEdit Collaborative Text Editor
+
+_lobby._tcp:Gobby Collaborative Editor Session
+
+
+# Databases
+
+_postgresql._tcp:PostgreSQL Server
+
+
+# Development
+
+_svn._tcp:Subversion Revision Control
+_svn._tcp[it]:Subversion - Versionatore
+
+_distcc._tcp:Distributed Compiler
+_distcc._tcp[de]:Verteilter Compiler
+_distcc._tcp[it]:Compilatore Distribuito
+
+_bzr._tcp:Bazaar
+
+
+# Vendor specific
+
+_MacOSXDupSuppress._tcp:MacOS X Duplicate Machine Suppression
+
+_ksysguard._tcp:KDE System Guard
+
+_omni-bookmark._tcp:OmniWeb Bookmark Sharing
+
+_acrobatSRV._tcp:Adobe Acrobat
+
+_adobe-vc._tcp:Adobe Version Cue
+
+_home-sharing._tcp:Apple Home Sharing
+
+
+# Other
+
+_pgpkey-hkp._tcp:GnuPG/PGP HKP Key Server
+
+_ldap._tcp:LDAP Directory Server
+
+_tp._tcp:Thousand Parsec Server
+_tps._tcp:Thousand Parsec Server (Secure)
+_tp-http._tcp:Thousand Parsec Server (HTTP Tunnel)
+_tp-https._tcp:Thousand Parsec Server (Secure HTTP Tunnel)
+
+_shifter._tcp:Window Shifter
+
+_libvirt._tcp:Virtual Machine Manager
+
+_ros-master._tcp:ROS Master
+_ros-master._tcp[ja]:ROSマスター (rosmaster)
+_ros-launch._tcp:ROS Launch Server
+_ros-launch._tcp[ja]:ROSラウンチサーバ (roslaunch)
Binary file not shown.
@@ -0,0 +1,12 @@
+<launch>
+ <node name="zeroconf" pkg="zeroconf" type="zeroconf.py" respawn="false" output="screen">
+ <param name="publish_master" value="true"/>
+ <param name="master_name" value="Winston X. Robot"/>
+<!--
+ <param name="service_type" value="_ros-master._tcp"/>
+ <param name="master_host" value="foo"/>
+ <param name="master_domain" value="local"/>
+ <param name="master_port" value="11311"/>
+-->
+ </node>
+</launch>
@@ -0,0 +1,26 @@
+/**
+\mainpage
+\htmlinclude manifest.html
+
+\b zeroconf is ...
+
+<!--
+Provide an overview of your package.
+-->
+
+
+\section codeapi Code API
+
+<!--
+Provide links to specific auto-generated API documentation within your
+package that is of particular interest to a reader. Doxygen will
+document pretty much every part of your code, so do your best here to
+point the reader to the actual API.
+
+If your codebase is fairly large or has different sets of APIs, you
+should use the doxygen 'group' tag to keep these APIs together. For
+example, the roscpp documentation has 'libros' group.
+-->
+
+
+*/
@@ -0,0 +1,12 @@
+<package>
+ <description brief="zeroconf">Zero Configuration tools for ROS</description>
+ <author>I Heart Robotics</author>
+ <license>BSD</license>
+ <review status="unreviewed" notes=""/>
+ <url>http://ros.org/wiki/zeroconf</url>
+ <depend package="rospy"/>
+ <depend package="roslib"/>
+ <depend package="std_msgs"/>
+ <rosdep name="python-avahi"/>
+ <rosdep name="avahi-daemon"/>
+</package>
@@ -0,0 +1,2 @@
+string master_name
+string master_uri
Oops, something went wrong.

0 comments on commit 17b45e4

Please sign in to comment.