source: flair-src/trunk/lib/FlairSensorActuator/src/SimulatedImu.h@ 330

Last change on this file since 330 was 286, checked in by Sanahuja Guillaume, 3 years ago

draw vrpn axis in simulator

File size: 1.8 KB
RevLine 
[3]1// %flair:license{
[15]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[3]4// %flair:license}
5/*!
[286]6 * \file SimulatedImu.h
[3]7 * \brief Class for a simulation Imu
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/02/07
10 * \version 4.0
11 */
12
[286]13#ifndef SIMULATEDIMU_H
14#define SIMULATEDIMU_H
[3]15
16#include <Imu.h>
17#include <Thread.h>
18
19namespace flair {
[55]20 namespace core {
21 class SharedMem;
22 class AhrsData;
23 }
24 namespace gui {
25 class SpinBox;
26 }
[3]27}
28
[15]29namespace flair {
30namespace sensor {
[286]31/*! \class SimulatedImu
[15]32*
33* \brief Class for a simulation Imu
34*/
[286]35class SimulatedImu : public Imu, public core::Thread {
[15]36public:
37 /*!
38 * \brief Constructor
39 *
[286]40 * Construct a SimulatedImu.
[137]41 * It will be child of the FrameworkManager.
[15]42 *
43 * \param name name
[158]44 * \param modelId Model id
45 * \param deviceId Imu id of the Model
[15]46 * \param priority priority of the Thread
47 */
[286]48 SimulatedImu(std::string name,
[158]49 uint32_t modelId,uint32_t deviceId, uint8_t priority);
[3]50
[15]51 /*!
52 * \brief Destructor
53 *
54 */
[286]55 ~SimulatedImu();
[3]56
[15]57private:
58 /*!
59 * \brief Run function
60 *
61 * Reimplemented from Thread.
62 *
63 */
64 void Run(void);
[3]65
[15]66 /*!
67 * \brief Update using provided datas
68 *
69 * Reimplemented from IODevice.
70 *
71 * \param data data from the parent to process
72 */
[224]73 void UpdateFrom(const core::io_data *data){};
[3]74
[15]75 typedef struct {
76 float q0;
77 float q1;
78 float q2;
79 float q3;
80 float wx;
81 float wy;
82 float wz;
[186]83 float ax;
84 float ay;
85 float az;
86 float mx;
87 float my;
88 float mz;
[15]89 } imu_states_t;
[158]90
91 std::string ShMemName(uint32_t modelId,uint32_t deviceId);
[55]92
93 gui::SpinBox *dataRate;
[15]94 core::SharedMem *shmem;
95 core::AhrsData *ahrsData;
96};
[3]97} // end namespace sensor
98} // end namespace flair
[286]99#endif // SIMULATEDIMU_H
Note: See TracBrowser for help on using the repository browser.