Index: /trunk/shared_serial/CMakeLists.txt
===================================================================
--- /trunk/shared_serial/CMakeLists.txt	(revision 48)
+++ /trunk/shared_serial/CMakeLists.txt	(revision 49)
@@ -1,82 +1,33 @@
-cmake_minimum_required(VERSION 2.8.3)
-project(shared_serial)
+cmake_minimum_required(VERSION 2.4.6)
+include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
 
-## Find catkin macros and libraries
-## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
-## is used, also find other catkin packages
-find_package(catkin REQUIRED COMPONENTS roscpp message_generation)
+# 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)
 
-#######################################
-## Declare ROS messages and services ##
-#######################################
+rosbuild_init()
 
-## Generate messages in the 'msg' folder
-add_message_files(
-  DIRECTORY msg
-)
+#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)
 
-## Generate services in the 'srv' folder
-add_service_files(
-  DIRECTORY srv
-)
+rosbuild_genmsg()
+rosbuild_gensrv()
 
-## Generate added messages and services with any dependencies listed here
-generate_messages()
+#common commands for building c++ executables and libraries
+rosbuild_add_library(${PROJECT_NAME} src/client.cpp)
+#target_link_libraries(${PROJECT_NAME} another_library)
+#rosbuild_add_boost_directories()
+#rosbuild_link_boost(${PROJECT_NAME} thread)
+rosbuild_add_executable(server
+                        src/server.cpp
+			src/watchdog.cpp
+                        src/LxSerial.cpp)
+#target_link_libraries(example ${PROJECT_NAME})
 
-###################################
-## catkin specific configuration ##
-###################################
-## The catkin_package macro generates cmake config files for your package
-## Declare things to be passed to dependent projects
-## INCLUDE_DIRS: uncomment this if you package contains header files
-## LIBRARIES: libraries you create in this project that dependent projects also need
-## CATKIN_DEPENDS: catkin_packages dependent projects also need
-## DEPENDS: system dependencies of this project that dependent projects also need
-catkin_package(
-  INCLUDE_DIRS include
-  LIBRARIES ${PROJECT_NAME}
-  CATKIN_DEPENDS roscpp message_runtime
-)
-
-###########
-## Build ##
-###########
-
-## Specify additional locations of header files
-## Your package locations should be listed before other locations
-# include_directories(include)
-include_directories(
-  include ${catkin_INCLUDE_DIRS}
-)
-
-## Declare a cpp library
-add_library(${PROJECT_NAME}
-  src/client.cpp
-)
-
-## Declare a cpp executable
-add_executable(server src/server.cpp src/watchdog.cpp src/LxSerial.cpp)
-
-## Add cmake target dependencies of the executable/library
-## as an example, message headers may need to be generated before nodes
-add_dependencies(${PROJECT_NAME} shared_serial_generate_messages_cpp)
-add_dependencies(server shared_serial_generate_messages_cpp)
-
-target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})
-target_link_libraries(server ${catkin_LIBRARIES} pthread)
-
-#############
-## Install ##
-#############
-
-## Mark executables and/or libraries for installation
-install(TARGETS ${PROJECT_NAME} server
-  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
-  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
-  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
-)
-
-## Mark cpp header files for installation
-install(FILES include/${PROJECT_NAME}/client.h
-  DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
-)
+rosbuild_make_distribution(0.1.0)
Index: /trunk/shared_serial/Makefile
===================================================================
--- /trunk/shared_serial/Makefile	(revision 49)
+++ /trunk/shared_serial/Makefile	(revision 49)
@@ -0,0 +1,1 @@
+include $(shell rospack find mk)/cmake.mk
Index: /trunk/shared_serial/launch/rs232usb.launch
===================================================================
--- /trunk/shared_serial/launch/rs232usb.launch	(revision 49)
+++ /trunk/shared_serial/launch/rs232usb.launch	(revision 49)
@@ -0,0 +1,8 @@
+<launch>
+	<node name="comm" pkg="shared_serial" type="server">
+		<param name="port_name" value="/dev/ttyUSB0"/>
+		<param name="port_type" value="RS232"/>
+		<param name="baud_rate" value="9600"/>
+		<param name="watchdog_interval" value="2"/>
+	</node>
+</launch>
Index: /trunk/shared_serial/launch/start.launch
===================================================================
--- /trunk/shared_serial/launch/start.launch	(revision 49)
+++ /trunk/shared_serial/launch/start.launch	(revision 49)
@@ -0,0 +1,7 @@
+<launch>
+	<node name="motor_comm" pkg="shared_serial" type="server">
+		<param name="port_name" value="/dev/ttyUSB0"/>
+		<param name="port_type" value="RS485_FTDI"/>
+		<param name="baud_rate" value="921600"/>
+	</node>
+</launch>
Index: /trunk/shared_serial/mainpage.dox
===================================================================
--- /trunk/shared_serial/mainpage.dox	(revision 49)
+++ /trunk/shared_serial/mainpage.dox	(revision 49)
@@ -0,0 +1,28 @@
+/**
+\mainpage
+\htmlinclude manifest.html
+
+\b shared_serial implements locking serial communications services.
+
+<!-- 
+Provide an overview of your package.
+-->
+
+
+\section codeapi Code API
+
+The client API is a single class, called SerialClient. You can also use the messages and services defined in the <a href="index-msg.html">message and service documentation</a>.
+
+<!--
+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.
+-->
+
+
+*/
Index: /trunk/shared_serial/manifest.xml
===================================================================
--- /trunk/shared_serial/manifest.xml	(revision 49)
+++ /trunk/shared_serial/manifest.xml	(revision 49)
@@ -0,0 +1,17 @@
+<package>
+  <description brief="shared_serial">
+
+    Shared serial port with locking functionality
+
+  </description>
+  <author>Wouter Caarls</author>
+  <license>BSD</license>
+  <review status="unreviewed" notes=""/>
+  <url>http://ros.org/wiki/shared_serial</url>
+  <depend package="roscpp"/>
+  
+  <export>
+    <cpp cflags="-I${prefix}/include" lflags="-L${prefix}/lib -Wl,-rpath,${prefix}/lib -lshared_serial"/>
+  </export>
+
+</package>
Index: unk/shared_serial/package.xml
===================================================================
--- /trunk/shared_serial/package.xml	(revision 48)
+++ 	(revision )
@@ -1,15 +1,0 @@
-<?xml version="1.0"?>
-<package>
-  <name>shared_serial</name>
-  <version>0.1.1</version>
-  <description>Shared serial port with locking functionality</description>
-  <maintainer email="w.caarls@tudelft.nl">Wouter Caarls</maintainer>
-  <license>BSD</license>
-  <url type="website">http://ros.org/wiki/shared_serial</url>
-  <author email="w.caarls@tudelft.nl">Wouter Caarls</author>
-  <buildtool_depend>catkin</buildtool_depend>
-  <build_depend>roscpp</build_depend>
-  <build_depend>message_generation</build_depend>
-  <run_depend>roscpp</run_depend>
-  <run_depend>message_runtime</run_depend>
-</package>
Index: /trunk/shared_serial/stack.xml
===================================================================
--- /trunk/shared_serial/stack.xml	(revision 49)
+++ /trunk/shared_serial/stack.xml	(revision 49)
@@ -0,0 +1,19 @@
+<stack>
+  <description brief="shared_serial">Shared serial port with locking functionality</description>
+  <author email="w.caarls@tudelft.nl">Wouter Caarls</author>
+  <maintainer email="w.caarls@tudelft.nl">Wouter Caarls</maintainer>
+  <license>BSD</license>
+  <copyright>TU Delft Robotics Institute</copyright>
+  <review status="unreviewed" notes=""/>
+  <url>http://ros.org/wiki/shared_serial</url>
+  
+  <!-- catkin -->
+  <name>shared_serial</name>
+  <version>0.1.0</version>
+  <build_depends>ros_comm</build_depends>
+  <depends>ros_comm</depends>
+  
+  <!-- rosbuild -->
+  <depend stack="ros"/>
+  <depend stack="ros_comm"/>
+</stack>
