Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
qa_env.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-core.h>
28
#include <plugins/openrave/environment.h>
29
#include <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(std::vector<float> &v)
39
{
40
printf(
"## size:%lu \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
54
//OpenRAVE::RaveInitialize(true); //optional..should be done automatically if not explicitly implemented
55
56
OpenRaveEnvironment
* env;
57
env =
new
OpenRaveEnvironment
(cl);
58
env->
create
();
59
60
env->
enable_debug
();
61
62
string
robotFile = SRCDIR
"/../manipulators/katana.robot.xml"
;
63
env->
add_robot
(robotFile);
64
65
env->
lock
();
66
67
env->
start_viewer
();
68
69
usleep(1000*10000);
70
71
env->
destroy
();
72
73
return
0;
74
}
75
76
77
/// @endcond
src
plugins
openrave
qa
qa_env.cpp
Generated by
1.8.1.1