Preliminary requirements:
Windows Part
The following programs or tools must be obtained to be able to compile the code:
- Microsoft(r) Visual Studio or Visual C++ Express Edition
- CMake v2.8+
- OpenCV source code
- Microsoft(r) Kinect SDK
- Microsoft(r) Speech Server
- US (or UK) English Text-to-speech language component for speech synthesis. For US, download the MSSpeech_TTS_en-US_ZiraPro.msi
- Boost library source code.
Linux Part
- Linux Ubuntu 12.04 with ROS. A pre-built image can be downloaded here: http://www.iheartrobotics.com/2012/08/turtlebot-ros-fuerte-rc1.html
- Turtlebot Stack (already installed with ROS)
- Virtual Machine Software (VMWARE or VirtualBox) to run both systems on a same machine
Prerequirements Installation
- Install Kinect SDK
- Speech Server
- Install Microsoft Speech Server from the provided links, both the x86 & x64 version.
- Install the US (or UK) Text-to-speech language component as well.
- OpenCV
- If you do not have a compiled OpenCV, use CMake to configure and build OpenCV. For binaries, specify <opencv_source_dir/build_local>.
- Build under Windows with Visual Studio. Launch VS, then open the solution file 'OpenCV.sln' generated by CMake in the folder specified above. Select Debug configuration then build the solution (Ctrl+Shift+B). Wait for the compilation to finish. Next select Release configuration and build again.
- Add <opencv_source_dir/build_local/bin/Debug> and <opencv_source_dir/build_local/bin/Release> folders containing "opencv_core*d.dll" and "opencv_core*.dll" respectively to the system path (My Computer->[Right Click]->Properties->Advanced->Environment Variables->Path)
- Boost library
- Instructions and link to download sources found at www.boost.org, Welcome->Getting Started. Version used: boost 1.51.0
- Launch Visual Studio command prompt. Start menu->Visual Studio->Visual Studio Tools->Visual Studio (x86 Native) Command Prompt
- Type the following commands into the console window (press Enter after each line):
cd "dir_where_boost_is"
bootstrap
b2
- Add the path <dir_where_boost_is> to the PATH OS variable (as in OpenCV install)
- ATK and HTK libs (provided in the project's distribution)
Project Compilation
The Visual Studio solution file for the project will be generated by CMake.
- CMake prerequisite: Copy FindKinectSDK.cmake and FindOpenCV.cmake modules in <cmake_install_dir>\share\cmake-2.8\Modules. By default, on Windows <cmake_install_dir> is C:\Program Files (x86)\CMake 2.8
- Open Source\GestureSpeech\CMakeLists.txt and change the path to boost library (MY_LOCAL_BOOST_PATH and MY_LOCAL_BOOST_LIB_PATH)
- Launch CMake
- Source code folder GestureSpeech
- Build binaries subfolder GestureSpeech/build
- Configure. Check OpenCV path (up to build_local), boost path, ATK and HTK path, libAVIIS_src path. Do Configure again (boost and OpenCV may be marked as not found but are actually found)
- Generate
- Close CMake
- Copy the gesture.txt as well as SpeechBasics-D2D.grxml files to the build folder.
- Open Microsoft Visual Studio solution file. Select GestureSpeech as the start up program.
- Go to project properties of GestureSpeech, select VC++ Directories, specify the Include & Lib folder for Microsoft Speech files. They are located in C:\Program Files (x86)\Microsoft SDKs\Speech\v11.0.
- Build the solution.
Next we have to compile the ROS package for server code.
- Configure the Turtlebot node for our Roomba robot
- Go to the Turtlebot stack node directory and edit the turtlebot_node.py file. It is located at /opt/ros/fuerte/stacks/turtlebot/turtlebot_node/nodes/turtlebot_node.py. Here you should change the name of the robot from create to roomba on line 150.
- Edit the .bashrc file in home directory, using gedit ~/.bashrc, add the following lines to the end:
export ROS_WORKSPACE=~/ros
export ROS_PACKAGE_PATH=~/ros:${ROS_PACKAGE_PATH}- Make the server package
- Open terminal. Go to the ROS workspace directory and type:
roscreate-pkg turtlebot_cmdserver roscpp geometry_msgs
- Copy the cmdserver.cpp file to the src directory of our CMake'd package.
- Edit the file CMakeFiles.txt inside the package directory and add the following to the end:
rosbuild_add_boost_directories()
rosbuild_add_executable(turtlebot_cmdserver src/cmdserver.cpp)
rosbuild_link_boost(turtlebot_cmdserver thread)
- Run rosmake turtlebot_cmdserver. The package should be compiled.
Running the Code
Linux Part
- Start the turtlebot stack by running these commands on separate terminal:
roscore
roslaunch turtlebot_bringup minimal.launch
- Run the server:
rosrun turtlebot_cmdserver turtlebot_cmdserver
Windows Part
- Plug the Kinect
- Set the IP address in TCPClient.cpp to point to the server IP address
- Compile & run
NOTE:
- In case of emergency and you want to stop the robot, pres Escape. But make sure that the application window is in focus.
- Our code is tested on Core i-7 with 8 cores and 8GB memory. Operation with less powerful machine is not guaranteed to be smooth.