Fawkes API  Fawkes Development Version
qa_connector.cpp
1 
2 /***************************************************************************
3  * qa_env.cpp - QA for OpenRAVE Environment class
4  *
5  * Created: Thu Sep 16 14:50:34 2010
6  * Copyright 2010 Bahram Maleki-Fard, AllemaniACs RoboCup Team
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 // Do not include in api reference
25 ///@cond QA
26 
27 #include <openrave/connector.h>
28 #include <openrave/manipulators/katana6M180.h>
29 #include <utils/logging/console.h>
30 #include <cstdio>
31 #include <iostream>
32 #include <vector>
33 
34 using namespace fawkes;
35 using namespace std;
36 
37 void
38 printVector(vector<float> v)
39 {
40  printf("## size:%u \n", v.size());
41  for(unsigned int i=0; i<v.size(); i++)
42  {
43  printf("## %u:)%f \n", i, v[i]);
44  }
45 }
46 
47 int
48 main(int argc, char **argv)
49 {
50  printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
51 
52  ConsoleLogger* cl = new ConsoleLogger();
53  string robotFile = "../src/plugins/openrave/xml/caesar.robot.xml";
54 
55  OpenRAVEConnector* con = new OpenRAVEConnector(cl);
56  con->setup(robotFile);
57 
58  // configure manipulator
59  OpenRAVEManipulatorKatana6M180* __manipKatana = new OpenRAVEManipulatorKatana6M180(6, 5);
60  __manipKatana->addMotor(0,0);
61  __manipKatana->addMotor(1,1);
62  __manipKatana->addMotor(2,2);
63  __manipKatana->addMotor(4,3);
64  __manipKatana->addMotor(5,4);
65 
66  con->setManipulator(__manipKatana);
67 
68  //con->startViewer();
69 
70 
71  //usleep(5000*1000);
72  //free(con);
73 
74 
75 
76 
77 
78  return 1;
79 }
80 
81 
82 /// @endcond
Interface for logging to stderr.
Definition: console.h:36
Fawkes library namespace.
STL namespace.