joy.cpp
Go to the documentation of this file.
00001 /*
00002  * joy.cpp
00003  *
00004  *  Created on: Oct 25, 2011
00005  *      Author: mriedel
00006  */
00007 
00008 
00009 #include <telekyb_base/TeleKyb.hpp>
00010 
00011 #include <telekyb_joystick/Joystick.hpp>
00012 #include <telekyb_joystick/JoystickOptions.hpp>
00013 
00014 using namespace telekyb;
00015 
00016 int main(int argc, char* argv[])
00017 {
00018         // Joystick is only output. Does not need to spin. // TODO: is this true?
00019         RawOptionsContainer::addOption("tRosNrSpinnerThreads","-1");
00020         TeleKyb::init(argc,argv,"tJoy", ros::init_options::AnonymousName);
00021         // create Option Singleton
00022         JoystickOptions* options = JoystickOptions::InstancePtr();
00023 
00024         Joystick j(options->tDevicePath->getValue(), true);
00025         j.run();
00026 
00027         j.closeJoystick();
00028 
00029         //delete options;
00030 
00031         delete options;
00032 
00033         // it is important to free everything before this call.
00034 
00035         TeleKyb::shutdown();
00036         return 0;
00037 }
00038 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines


telekyb_joystick
Author(s): Martin Riedel
autogenerated on Mon Nov 11 2013 11:14:39