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,
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;
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
Sensor::Sensor
Sensor()
Definition: server/UtDynamicsSimulator/Sensor.cpp:19
Sensor::TORQUE
@ TORQUE
Definition: server/UtDynamicsSimulator/Sensor.h:36
ForceSensor::ForceSensor
ForceSensor()
Definition: server/UtDynamicsSimulator/Sensor.cpp:92
AccelSensor::dv
fVec3 dv
Definition: server/UtDynamicsSimulator/Sensor.h:98
Sensor::NUM_SENSOR_TYPES
@ NUM_SENSOR_TYPES
Definition: server/UtDynamicsSimulator/Sensor.h:37
fVec3
3-element vector class.
Definition: fMatrix3.h:206
Sensor::joint
Joint * joint
Definition: server/UtDynamicsSimulator/Sensor.h:55
Sensor::ACCELERATION
@ ACCELERATION
Definition: server/UtDynamicsSimulator/Sensor.h:32
Sensor
Definition: server/UtDynamicsSimulator/Sensor.h:24
Joint
The class for representing a joint.
Definition: chain.h:538
Sensor::VISION
@ VISION
Definition: server/UtDynamicsSimulator/Sensor.h:35
Sensor::FORCE
@ FORCE
Definition: server/UtDynamicsSimulator/Sensor.h:30
ForceSensor::putInformation
virtual void putInformation(std::ostream &os)
Definition: server/UtDynamicsSimulator/Sensor.cpp:105
Sensor::type
int type
Definition: server/UtDynamicsSimulator/Sensor.h:53
Sensor::COMMON
@ COMMON
Definition: server/UtDynamicsSimulator/Sensor.h:29
ForceSensor
Definition: server/UtDynamicsSimulator/Sensor.h:64
Sensor::destroy
static void destroy(Sensor *sensor)
Definition: server/UtDynamicsSimulator/Sensor.cpp:73
AccelSensor::TYPE
static const int TYPE
Definition: server/UtDynamicsSimulator/Sensor.h:94
ForceSensor::tau
fVec3 tau
Definition: server/UtDynamicsSimulator/Sensor.h:71
RateGyroSensor::putInformation
virtual void putInformation(std::ostream &os)
Definition: server/UtDynamicsSimulator/Sensor.cpp:125
Sensor::RATE_GYRO
@ RATE_GYRO
Definition: server/UtDynamicsSimulator/Sensor.h:31
AccelSensor::AccelSensor
AccelSensor()
Definition: server/UtDynamicsSimulator/Sensor.cpp:133
Sensor::localPos
fVec3 localPos
Definition: server/UtDynamicsSimulator/Sensor.h:57
RateGyroSensor
Definition: server/UtDynamicsSimulator/Sensor.h:78
Sensor::name
std::string name
Definition: server/UtDynamicsSimulator/Sensor.h:52
fMat33
3x3 matrix class.
Definition: fMatrix3.h:29
RateGyroSensor::w
fVec3 w
Definition: server/UtDynamicsSimulator/Sensor.h:84
Sensor::TYPE
static const int TYPE
Definition: server/UtDynamicsSimulator/Sensor.h:40
ForceSensor::clear
virtual void clear()
Definition: server/UtDynamicsSimulator/Sensor.cpp:98
Sensor::~Sensor
virtual ~Sensor()
Definition: server/UtDynamicsSimulator/Sensor.cpp:57
ForceSensor::TYPE
static const int TYPE
Definition: server/UtDynamicsSimulator/Sensor.h:67
fMatrix3.h
3x3 matrix and 3-element vector classes.
Sensor::id
int id
Definition: server/UtDynamicsSimulator/Sensor.h:54
Sensor::operator=
virtual void operator=(const Sensor &org)
Definition: server/UtDynamicsSimulator/Sensor.cpp:63
chain.h
Classes for defining open/closed kinematic chains.
RateGyroSensor::RateGyroSensor
RateGyroSensor()
Definition: server/UtDynamicsSimulator/Sensor.cpp:113
Sensor::clear
virtual void clear()
Definition: server/UtDynamicsSimulator/Sensor.cpp:79
Sensor::localR
fMat33 localR
Definition: server/UtDynamicsSimulator/Sensor.h:56
Sensor::putInformation
virtual void putInformation(std::ostream &os)
Definition: server/UtDynamicsSimulator/Sensor.cpp:85
ForceSensor::f
fVec3 f
Definition: server/UtDynamicsSimulator/Sensor.h:70
Sensor::PRESSURE
@ PRESSURE
Definition: server/UtDynamicsSimulator/Sensor.h:33
AccelSensor::clear
virtual void clear()
Definition: server/UtDynamicsSimulator/Sensor.cpp:140
RateGyroSensor::clear
virtual void clear()
Definition: server/UtDynamicsSimulator/Sensor.cpp:119
AccelSensor::putInformation
virtual void putInformation(std::ostream &os)
Definition: server/UtDynamicsSimulator/Sensor.cpp:148
Sensor::create
static Sensor * create(int type)
Definition: server/UtDynamicsSimulator/Sensor.cpp:25
Sensor::PHOTO_INTERRUPTER
@ PHOTO_INTERRUPTER
Definition: server/UtDynamicsSimulator/Sensor.h:34
RateGyroSensor::TYPE
static const int TYPE
Definition: server/UtDynamicsSimulator/Sensor.h:81
Sensor::SensorType
SensorType
Definition: server/UtDynamicsSimulator/Sensor.h:28
AccelSensor
Definition: server/UtDynamicsSimulator/Sensor.h:91


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:04