iCub-main
icub-main
src
simulators
iCubSimulation
wrapper
WorldOp.cpp
Go to the documentation of this file.
1
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2
3
/*
4
* Copyright (C) 2010 RobotCub Consortium, European Commission FP6 Project IST-004370
5
* Author: Paul Fitzpatrick, Vadim Tikhanoff
6
* email: paulfitz@alum.mit.edu, vadim.tikhanoff@iit.it
7
* website: www.robotcub.org
8
* Permission is granted to copy, distribute, and/or modify this program
9
* under the terms of the GNU General Public License, version 2 or any
10
* later version published by the Free Software Foundation.
11
*
12
* A copy of the license can be found at
13
* http://www.robotcub.org/icub/license/gpl.txt
14
*
15
* This program is distributed in the hope that it will be useful, but
16
* WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
18
* Public License for more details
19
*/
20
#include "
WorldOp.h
"
21
22
#include <stdio.h>
23
#include <yarp/os/LogStream.h>
24
25
void
show
(
const
WorldOpTriplet
&
x
) {
26
if
(!
x
.valid) {
27
yDebug(
"not set"
);
28
}
else
{
29
yDebug(
"%g %g %g"
,
x
.x[0],
x
.x[1],
x
.x[2]);
30
}
31
yDebug(
"\n"
);
32
}
33
34
void
show
(
const
WorldOpScalar
&
x
) {
35
if
(!
x
.valid) {
36
yDebug(
"not set"
);
37
}
else
{
38
yDebug(
"%g"
,
x
.val);
39
}
40
yDebug(
"\n"
);
41
}
42
43
void
show
(
const
WorldOpFlag
&
x
,
44
const
char
*yes=
"True"
,
45
const
char
*no=
"False"
) {
46
if
(!
x
.valid) {
47
yDebug(
"not set"
);
48
}
else
{
49
yDebug(
"%s"
,
x
.setting?yes:no);
50
}
51
yDebug(
"\n"
);
52
}
53
54
void
show
(
const
WorldOpIndex
&
x
) {
55
if
(!
x
.valid) {
56
yDebug(
"not set"
);
57
}
else
{
58
yDebug(
"%d"
,
x
.index);
59
}
60
yDebug(
"\n"
);
61
}
62
63
void
show
(
const
WorldOpName
&
x
) {
64
if
(!
x
.valid) {
65
yDebug(
"not set"
);
66
}
else
{
67
yDebug(
"%s"
,
x
.name.c_str());
68
}
69
yDebug(
"\n"
);
70
}
71
72
void
WorldOp::show
()
const
{
73
yDebug(
"Operation:\n"
);
74
yDebug(
" cmd?: %s\n"
, yarp::os::Vocab32::decode(
cmd
).c_str());
75
yDebug(
" kind: "
);
76
::show
(
kind
);
77
yDebug(
" name: "
);
78
::show
(
name
);
79
yDebug(
" dynamic: "
);
80
::show
(
dynamic
);
81
yDebug(
" location: "
);
82
::show
(
location
);
83
yDebug(
" size: "
);
84
::show
(
size
);
85
yDebug(
" color: "
);
86
::show
(
color
);
87
yDebug(
" rotation: "
);
88
::show
(
rotation
);
89
yDebug(
" radius: "
);
90
::show
(
radius
);
91
yDebug(
" length: "
);
92
::show
(
length
);
93
yDebug(
" active: "
);
94
::show
(
active
);
95
yDebug(
" index: "
);
96
::show
(
index
);
97
yDebug(
" collide: "
);
98
::show
(
collide
);
99
yDebug(
" parameter: "
);
100
::show
(
parameter
);
101
yDebug(
" rightHanded?: "
);
102
::show
(
rightHanded
,
"right"
,
"left"
);
103
yDebug(
" modelName: "
);
104
::show
(
modelName
);
105
yDebug(
" modelTexture: "
);
106
::show
(
modelTexture
);
107
}
108
109
void
WorldResult::show
() {
110
yDebug(
"Result:\n"
);
111
yDebug(
" success: %s\n"
,
success
?
"true"
:
"false"
);
112
yDebug(
" msg: %s\n"
,
msg
.c_str());
113
yDebug(
" location: "
);
114
::show
(
location
);
115
yDebug(
" color: "
);
116
::show
(
color
);
117
yDebug(
" path: "
);
118
::show
(
path
);
119
}
120
WorldOp::show
void show() const
Definition:
WorldOp.cpp:72
WorldOpIndex
Definition:
WorldOp.h:75
WorldOp::index
WorldOpIndex index
Definition:
WorldOp.h:119
WorldOpFlag
Definition:
WorldOp.h:64
WorldResult::success
bool success
Definition:
WorldOp.h:140
WorldResult::location
WorldOpTriplet location
Definition:
WorldOp.h:142
cmd
cmd
Definition:
dataTypes.h:30
WorldResult::path
WorldOpName path
Definition:
WorldOp.h:145
WorldOp.h
WorldOpScalar
Definition:
WorldOp.h:86
WorldOp::rotation
WorldOpTriplet rotation
Definition:
WorldOp.h:123
WorldOp::active
WorldOpFlag active
Definition:
WorldOp.h:126
WorldOp::modelTexture
WorldOpName modelTexture
Definition:
WorldOp.h:131
WorldOp::dynamic
WorldOpFlag dynamic
Definition:
WorldOp.h:127
WorldResult::show
void show()
Definition:
WorldOp.cpp:109
WorldResult::msg
std::string msg
Definition:
WorldOp.h:141
show
void show(const WorldOpTriplet &x)
Definition:
WorldOp.cpp:25
WorldOp::radius
WorldOpScalar radius
Definition:
WorldOp.h:124
x
x
Definition:
compute_ekf_sym.m:21
WorldOpName
Definition:
WorldOp.h:51
WorldOp::location
WorldOpTriplet location
Definition:
WorldOp.h:120
WorldOp::color
WorldOpTriplet color
Definition:
WorldOp.h:122
WorldResult::color
WorldOpTriplet color
Definition:
WorldOp.h:144
WorldOp::rightHanded
WorldOpFlag rightHanded
Definition:
WorldOp.h:128
WorldOp::kind
WorldOpName kind
Definition:
WorldOp.h:117
WorldOp::modelName
WorldOpName modelName
Definition:
WorldOp.h:130
WorldOpTriplet
Definition:
WorldOp.h:97
WorldOp::parameter
WorldOpFlag parameter
Definition:
WorldOp.h:129
WorldOp::length
WorldOpScalar length
Definition:
WorldOp.h:125
WorldOp::collide
WorldOpFlag collide
Definition:
WorldOp.h:132
WorldOp::name
WorldOpName name
Definition:
WorldOp.h:118
WorldOp::size
WorldOpTriplet size
Definition:
WorldOp.h:121
Generated on Mon May 23 2022 15:54:33 for iCub-main by
1.8.17