XsensIMU.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package RobotAPI::ArmarXObjects::XsensIMU
19 * @author Markus Grotz ( markus-grotz at web dot de )
20 * @date 2015
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
25#pragma once
26
27
31
33
34#include "IMU/IMU.h"
35
36namespace armarx
37{
38 /**
39 * @class XsensIMUPropertyDefinitions
40 * @brief
41 */
43 {
44 public:
47 {
48 defineOptionalProperty<std::string>("deviceConnection", "/dev/ttyUSB0", "");
49
50 defineOptionalProperty<std::string>("frequency", "", "");
51 defineOptionalProperty<std::string>("maxPendingEvents", "", "");
52 defineOptionalProperty<bool>("EnableSimpleCalibration", false, "");
53 }
54 };
55
56 /**
57 * @class XsensIMU
58 * @brief A brief description
59 *
60 * Detailed Description
61 */
62 class XsensIMU :
63 virtual public InertialMeasurementUnit,
64 virtual public IMU::CIMUDeducedReckoning
65 {
66 public:
68 {
69 }
70
71 /**
72 * @see armarx::ManagedIceObject::getDefaultName()
73 */
74 std::string
75 getDefaultName() const override
76 {
77 return "XsensIMU";
78 }
79
80 protected:
81 /**
82 * @see PropertyUser::createPropertyDefinitions()
83 */
85
87
88 // InertialMeasurementUnit interface
89
90 void onInitIMU() override;
91 void onStartIMU() override;
92 void onExitIMU() override;
93
94
95 private:
97 IMU::CIMUDevice IMUDevice;
98 };
99} // namespace armarx
CIMUDeducedReckoning(const bool IsVerbose)
This class contains the the devices module and the thread for read the measurements.
Definition IMUDevice.h:42
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
XsensIMUPropertyDefinitions(std::string prefix)
Definition XsensIMU.h:45
void frameAcquisitionTaskLoop()
Definition XsensIMU.cpp:38
void onExitIMU() override
Definition XsensIMU.cpp:163
void onStartIMU() override
Definition XsensIMU.cpp:156
void onInitIMU() override
Definition XsensIMU.cpp:141
PropertyDefinitionsPtr createPropertyDefinitions() override
Definition XsensIMU.cpp:32
std::string getDefaultName() const override
Definition XsensIMU.h:75
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.