icub-client
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);
39 
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
int m_tactile_number
Tactile number of the represented body part.
Definition: bodypart.h:43
Represent any physical entity (including objects and agents) that can be stored within the OPC...
Definition: object.h:35
virtual bool isType(std::string _entityType) const
Test if an entity is inheriting a given type.
Definition: object.h:86
#define ICUBCLIENT_OPC_ENTITY_BODYPART
Definition: tags.h:39
int m_joint_number
Joint number of the represented body part.
Definition: bodypart.h:38
virtual yarp::os::Bottle asBottle() const
Return the entity as a bottle.
Definition: bodypart.cpp:46
Represents a body part of the robot.
Definition: bodypart.h:29
An OPC client using the datastructures defined within the icub-client library.
Definition: opcClient.h:35
virtual bool isType(std::string _entityType) const
Test if an entity is inheriting a given type.
Definition: bodypart.h:55
std::string m_part
The part itself, e.g.
Definition: bodypart.h:48
virtual std::string toString() const
Return a human readable description of the entity.
Definition: bodypart.cpp:72
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
virtual bool fromBottle(const yarp::os::Bottle &b)
Fill entity fields from a bottle representation.
Definition: bodypart.cpp:87