An example project (ROS node) that serves a virtual “song title database” via ROS can be checked out here:
git clone https://github.com/fairlight1337/ros_service_examples.git
This is just an example for reference purposes.
Running the server using
rosrun rosdemo_mp3 mp3_inventory
starts the title database server (C++ node, see src/mp3_inventory.cpp). This server serves album lists and according title lists (if requested) of everything stored in `pwd`/albums. So be sure to do
roscd rosdemo_mp3
before running the mp3_inventory node. The service type for communication is Mp3InventoryService.
The clients request a list of albums from the server. For each entry in this list, they request a list of titles.
For the C++ client, do
rosrun rosdemo_mp3 mp3_controller
. For the python client, do
rosrun rosdemp_mp3 mp3_controller_python.py
. For the LISP client, from within emacs, do
(ros-load:load-system "rosdemo_mp3" :mp3-controller)
and then execute
(mp3-inventory-interaction)