Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * qa_env.cpp - QA for OpenRAVE Environment class 00004 * 00005 * Created: Thu Sep 16 14:50:34 2010 00006 * Copyright 2010 Bahram Maleki-Fard, AllemaniACs RoboCup Team 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. A runtime exception applies to 00014 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Library General Public License for more details. 00020 * 00021 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00022 */ 00023 00024 // Do not include in api reference 00025 ///@cond QA 00026 00027 #include <openrave/connector.h> 00028 #include <openrave/manipulators/katana6M180.h> 00029 #include <utils/logging/console.h> 00030 #include <cstdio> 00031 #include <iostream> 00032 #include <vector> 00033 00034 using namespace fawkes; 00035 using namespace std; 00036 00037 void 00038 printVector(vector<float> v) 00039 { 00040 printf("## size:%u \n", v.size()); 00041 for(unsigned int i=0; i<v.size(); i++) 00042 { 00043 printf("## %u:)%f \n", i, v[i]); 00044 } 00045 } 00046 00047 int 00048 main(int argc, char **argv) 00049 { 00050 printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); 00051 00052 ConsoleLogger* cl = new ConsoleLogger(); 00053 string robotFile = "../src/plugins/openrave/xml/caesar.robot.xml"; 00054 00055 OpenRAVEConnector* con = new OpenRAVEConnector(cl); 00056 con->setup(robotFile); 00057 00058 // configure manipulator 00059 OpenRAVEManipulatorKatana6M180* __manipKatana = new OpenRAVEManipulatorKatana6M180(6, 5); 00060 __manipKatana->addMotor(0,0); 00061 __manipKatana->addMotor(1,1); 00062 __manipKatana->addMotor(2,2); 00063 __manipKatana->addMotor(4,3); 00064 __manipKatana->addMotor(5,4); 00065 00066 con->setManipulator(__manipKatana); 00067 00068 //con->startViewer(); 00069 00070 00071 //usleep(5000*1000); 00072 //free(con); 00073 00074 00075 00076 00077 00078 return 1; 00079 } 00080 00081 00082 /// @endcond