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 
31 #include <cstdio>
32 #include <iostream>
33 #include <vector>
34 
35 using namespace fawkes;
36 using namespace std;
37 
38 void
39 printVector(vector<float> v)
40 {
41  printf("## size:%zu \n", v.size());
42  for (unsigned int i = 0; i < v.size(); i++) {
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  //usleep(5000*1000);
71  //free(con);
72 
73  return 1;
74 }
75 
76 /// @endcond
fawkes::ConsoleLogger
Definition: console.h:40
fawkes