Class
List
Hierarchy
Modules
Common
Events
Math
Messages
Physics
Rendering
Sensors
Transport
Links
Gazebo Website
Wiki
Tutorials
Download
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
gazebo
sensors
ImuSensor.hh
Go to the documentation of this file.
1
/*
2
* Copyright 2012 Nate Koenig
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
*/
17
18
#ifndef _IMUSENSOR_HH_
19
#define _IMUSENSOR_HH_
20
21
#include <vector>
22
#include <string>
23
24
#include "
gazebo/physics/PhysicsTypes.hh
"
25
#include "
gazebo/sensors/Sensor.hh
"
26
27
namespace
gazebo
28
{
29
namespace
sensors
30
{
33
36
class
ImuSensor
:
public
Sensor
37
{
39
public
:
ImuSensor
();
40
42
public
:
virtual
~ImuSensor
();
43
44
// Documentation inherited.
45
protected
:
void
Load
(
const
std::string &_worldName,
sdf::ElementPtr
_sdf);
46
47
// Documentation inherited.
48
protected
:
virtual
void
Load
(
const
std::string &_worldName);
49
51
protected
:
virtual
void
Init
();
52
53
// Documentation inherited
54
protected
:
virtual
void
UpdateImpl
(
bool
_force);
55
56
// Documentation inherited
57
protected
:
virtual
void
Fini
();
58
61
public
:
math::Vector3
GetAngularVelocity
()
const
;
62
65
public
:
math::Vector3
GetLinearAcceleration
()
const
;
66
67
private
:
transport::PublisherPtr
pub;
68
private
:
physics::LinkPtr
parentEntity;
69
private
: msgs::IMU imuMsg;
70
};
72
}
73
}
74
#endif