Choreonoid  1.5
RateGyroSensor.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_BODY_RATE_GYRO_SENSOR_H
7 #define CNOID_BODY_RATE_GYRO_SENSOR_H
8 
9 #include "Device.h"
10 #include <boost/scoped_ptr.hpp>
11 #include "exportdecl.h"
12 
13 namespace cnoid {
14 
16 {
17  Vector3 w_; // w = omega = angular velocity
18 
19  struct Spec {
20  Vector3 w_max;
21  };
22  boost::scoped_ptr<Spec> spec;
23 
24 public:
26  RateGyroSensor(const RateGyroSensor& org, bool copyStateOnly = false);
27 
28  virtual const char* typeName();
29  void copyStateFrom(const RateGyroSensor& other);
30  virtual void copyStateFrom(const DeviceState& other);
31  virtual DeviceState* cloneState() const;
32  virtual Device* clone() const;
33  virtual void forEachActualType(boost::function<bool(const std::type_info& type)> func);
34  virtual void clearState();
35  virtual int stateSize() const;
36  virtual const double* readState(const double* buf);
37  virtual double* writeState(double* out_buf) const;
38 
39  const Vector3& w() const { return w_; }
40  Vector3& w() { return w_; }
41 
42  const Vector3& w_max() const { return spec->w_max; }
43  Vector3& w_max() { return spec->w_max; }
44 };
45 
47 
48 };
49 
50 #endif
ref_ptr< RateGyroSensor > RateGyroSensorPtr
Definition: RateGyroSensor.h:46
Vector3 & w()
Definition: RateGyroSensor.h:40
Definition: Referenced.h:128
const Vector3 & w_max() const
Definition: RateGyroSensor.h:42
Vector3 & w_max()
Definition: RateGyroSensor.h:43
const Vector3 & w() const
Definition: RateGyroSensor.h:39
Definition: Device.h:18
Defines the minimum processing for performing pasing file for STL.
Definition: AbstractSceneLoader.h:9
Eigen::Vector3d Vector3
Definition: EigenTypes.h:58
#define CNOID_EXPORT
Definition: Util/exportdecl.h:37
Definition: Device.h:52
Definition: RateGyroSensor.h:15