commit 66f55732e2c356780a203cf05789c02aa325f9ae
Author: Tom Mullins <tmullins@andrew.cmu.edu>
Date:   Mon Apr 15 16:45:22 2013 -0400

    Adding painter node to control paintboard and metal detector

diff --git a/scout/painter/CMakeLists.txt b/scout/painter/CMakeLists.txt
new file mode 100644
index 0000000..9f5a865
--- /dev/null
+++ b/scout/painter/CMakeLists.txt
@@ -0,0 +1,32 @@
+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()
+
+rosbuild_add_executable(painter src/painter.cpp)
+
+#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})
diff --git a/scout/painter/Makefile b/scout/painter/Makefile
new file mode 100644
index 0000000..b75b928
--- /dev/null
+++ b/scout/painter/Makefile
@@ -0,0 +1 @@
+include $(shell rospack find mk)/cmake.mk
\ No newline at end of file
diff --git a/scout/painter/mainpage.dox b/scout/painter/mainpage.dox
new file mode 100644
index 0000000..790bf76
--- /dev/null
+++ b/scout/painter/mainpage.dox
@@ -0,0 +1,14 @@
+/**
+\mainpage
+\htmlinclude manifest.html
+
+\b painter 
+
+<!-- 
+Provide an overview of your package.
+-->
+
+-->
+
+
+*/
diff --git a/scout/painter/manifest.xml b/scout/painter/manifest.xml
new file mode 100644
index 0000000..9552ad5
--- /dev/null
+++ b/scout/painter/manifest.xml
@@ -0,0 +1,16 @@
+<package>
+  <description brief="painter">
+
+     painter
+
+  </description>
+  <author>Thomas Mullins</author>
+  <license>BSD</license>
+  <review status="unreviewed" notes=""/>
+  <url>http://ros.org/wiki/painter</url>
+  <depend package="roscpp"/>
+  <depend package="messages"/>
+
+</package>
+
+
diff --git a/scout/painter/src/painter.cpp b/scout/painter/src/painter.cpp
new file mode 100644
index 0000000..ad2253c
--- /dev/null
+++ b/scout/painter/src/painter.cpp
@@ -0,0 +1,92 @@
+/**
+ * Copyright (c) 2011 Colony Project
+ * 
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * @file painter.cpp
+ * @brief Contains code to control the painter and query the metal detector.
+ *
+ * @author Colony Project, CMU Robotics Club
+ * @author Tom Mullins
+ *
+ */
+
+#define QUEUE_SIZE 10
+
+#include <cstdlib>
+#include <ros/ros.h>
+#include <messages/set_paintboard.h>
+#include <messages/query_paintboard.h>
+#include <messages/query_metal_detector.h>
+
+using namespace std;
+
+/**
+ * @brief ROS callback to turn the paint output on or off
+ */
+void paint_set(const ::messages::set_paintboard::ConstPtr& msg)
+{
+}
+
+/**
+ * @brief ROS callback to query whether the paint output is on or off
+ */
+bool paint_query(::messages::query_paintboard::Request &req,
+                 ::messages::query_paintboard::Response &res)
+{
+  return true;
+}
+
+/**
+ * @brief ROS callback to query whether there is metal detected
+ */
+bool metal_query(::messages::query_metal_detector::Request &req,
+                 ::messages::query_metal_detector::Response &res)
+{
+  return true;
+}
+
+/**
+ * @brief Painter driver for ROS, to control the painter and metal detector
+ *
+ * @param argc The number of command line arguments (should be 1)
+ * @param argv The array of command line arguments
+ */
+int main(int argc, char **argv)
+{
+    ros::init(argc, argv, "painter");
+    ros::NodeHandle node;
+
+    ros::Subscriber painter_sub = node.subscribe("/set_paintboard", QUEUE_SIZE,
+        paint_set);
+    ros::ServiceServer painter_srv = node.advertiseService("/query_paintboard",
+        paint_query);
+    ros::ServiceServer metal_srv = node.advertiseService("/query_metal_detector",
+        metal_query);
+
+    ROS_INFO("Painter node ready.");
+    ros::spin();
+
+    return 0;
+}
