icub-client
src
libraries
icubclient
include
icubclient
knowledge
bodypart.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2015 WYSIWYD Consortium, European Commission FP7 Project ICT-612139
3
* Authors: Tobias Fischer
4
* email: t.fischer@imperial.ac.uk
5
* Permission is granted to copy, distribute, and/or modify this program
6
* under the terms of the GNU General Public License, version 2 or any
7
* later version published by the Free Software Foundation.
8
*
9
* A copy of the license can be found at
10
* icub-client/license/gpl.txt
11
*
12
* This program is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
15
* Public License for more details
16
*/
17
18
#ifndef BODYPART_H
19
#define BODYPART_H
20
21
#include "
object.h
"
22
23
namespace
icubclient
{
29
class
Bodypart
:
public
Object
30
{
31
friend
class
OPCClient
;
32
public
:
33
Bodypart
();
34
Bodypart
(
const
Bodypart
&b);
38
int
m_joint_number
;
39
43
int
m_tactile_number
;
44
48
std::string
m_part
;
49
53
std::string
m_kinectNode
;
54
55
virtual
bool
isType
(std::string _entityType)
const
56
{
57
if
(_entityType ==
ICUBCLIENT_OPC_ENTITY_BODYPART
)
58
return
true
;
59
else
60
return
this->
Object::isType
(_entityType);
61
}
62
virtual
yarp::os::Bottle
asBottle
()
const
;
63
virtual
bool
fromBottle
(
const
yarp::os::Bottle &b);
64
virtual
std::string
toString
()
const
;
65
};
66
67
}
//namespace
68
69
#endif // BODYPART_H
icubclient::Bodypart::m_tactile_number
int m_tactile_number
Tactile number of the represented body part.
Definition:
bodypart.h:43
icubclient::Bodypart::Bodypart
Bodypart()
Definition:
bodypart.cpp:25
icubclient::Object
Represent any physical entity (including objects and agents) that can be stored within the OPC...
Definition:
object.h:35
icubclient::Object::isType
virtual bool isType(std::string _entityType) const
Test if an entity is inheriting a given type.
Definition:
object.h:86
ICUBCLIENT_OPC_ENTITY_BODYPART
#define ICUBCLIENT_OPC_ENTITY_BODYPART
Definition:
tags.h:39
icubclient::Bodypart::m_joint_number
int m_joint_number
Joint number of the represented body part.
Definition:
bodypart.h:38
icubclient
Definition:
icubClient.h:40
icubclient::Bodypart::asBottle
virtual yarp::os::Bottle asBottle() const
Return the entity as a bottle.
Definition:
bodypart.cpp:46
icubclient::Bodypart
Represents a body part of the robot.
Definition:
bodypart.h:29
icubclient::OPCClient
An OPC client using the datastructures defined within the icub-client library.
Definition:
opcClient.h:35
icubclient::Bodypart::isType
virtual bool isType(std::string _entityType) const
Test if an entity is inheriting a given type.
Definition:
bodypart.h:55
object.h
icubclient::Bodypart::m_part
std::string m_part
The part itself, e.g.
Definition:
bodypart.h:48
icubclient::Bodypart::toString
virtual std::string toString() const
Return a human readable description of the entity.
Definition:
bodypart.cpp:72
icubclient::Bodypart::m_kinectNode
std::string m_kinectNode
The string labelling the kinect node (of a human kinematic structure, one of the ICUBCLIENT_OPC_BODY_...
Definition:
bodypart.h:53
icubclient::Bodypart::fromBottle
virtual bool fromBottle(const yarp::os::Bottle &b)
Fill entity fields from a bottle representation.
Definition:
bodypart.cpp:87
Generated on Wed Feb 19 2020 23:45:26 for icub-client by
1.8.13