server/UtDynamicsSimulator/Sensor.h
Go to the documentation of this file.
1 // -*- mode: c++; indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
2 /*
3  * Copyright (c) 2008, AIST, the University of Tokyo and General Robotix Inc.
4  * All rights reserved. This program is made available under the terms of the
5  * Eclipse Public License v1.0 which accompanies this distribution, and is
6  * available at http://www.eclipse.org/legal/epl-v10.html
7  * Contributors:
8  * The University of Tokyo
9  * National Institute of Advanced Industrial Science and Technology (AIST)
10  * General Robotix Inc.
11  */
12 #ifndef OPENHRP_SENSOR_HEADER
13 #define OPENHRP_SENSOR_HEADER
14 
19 #include <string>
20 #include <iostream>
21 #include "fMatrix3.h"
22 #include "chain.h"
23 
24  class Sensor
25  {
26  public:
27 
28  enum SensorType {
29  COMMON = 0,
30  FORCE,
31  RATE_GYRO,
32  ACCELERATION,
33  PRESSURE,
34  PHOTO_INTERRUPTER,
35  VISION,
36  TORQUE,
37  NUM_SENSOR_TYPES
38  };
39 
40  static const int TYPE = COMMON;
41 
42  Sensor();
43  virtual ~Sensor();
44 
45  static Sensor* create(int type);
46  static void destroy(Sensor* sensor);
47 
48  virtual void operator=(const Sensor& org);
49 
50  virtual void clear();
51 
52  std::string name;
53  int type;
54  int id;
55  Joint* joint;
56  fMat33 localR;
57  fVec3 localPos;
58 
59  virtual void putInformation(std::ostream& os);
60 
61  };
62 
63 
64  class ForceSensor : public Sensor
65  {
66  public:
67  static const int TYPE = FORCE;
68 
69  ForceSensor();
72 
73  virtual void clear();
74  virtual void putInformation(std::ostream& os);
75  };
76 
77 
78  class RateGyroSensor : public Sensor
79  {
80  public:
81  static const int TYPE = RATE_GYRO;
82 
85 
86  virtual void clear();
87  virtual void putInformation(std::ostream& os);
88  };
89 
90 
91  class AccelSensor : public Sensor
92  {
93  public:
94  static const int TYPE = ACCELERATION;
95 
96  AccelSensor();
97 
99 
100  virtual void clear();
101  virtual void putInformation(std::ostream& os);
102 
103  };
104 
105 #endif
3x3 matrix class.
Definition: fMatrix3.h:29
void clear(CorbaSequence &seq)
Definition: inflate.h:32
3x3 matrix and 3-element vector classes.
Classes for defining open/closed kinematic chains.
3-element vector class.
Definition: fMatrix3.h:206
The class for representing a joint.
Definition: chain.h:538


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat May 8 2021 02:42:41