ImuSensorPrivate.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2016 Open Source Robotics Foundation
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 #ifndef _GAZEBO_SENSORS_IMUSENSOR_PRIVATE_HH_
18 #define _GAZEBO_SENSORS_IMUSENSOR_PRIVATE_HH_
19 
20 #include <array>
21 #include <mutex>
22 #include <ignition/math/Vector3.hh>
23 #include <ignition/math/Pose3.hh>
24 
27 
28 namespace gazebo
29 {
30  namespace sensors
31  {
35  {
37  public: ignition::math::Pose3d referencePose;
38 
40  public: ignition::math::Vector3d lastLinearVel;
41 
43  public: ignition::math::Vector3d linearAcc;
44 
46  public: ignition::math::Vector3d gravity;
47 
50 
53 
56 
58  public: msgs::IMU imuMsg;
59 
61  public: mutable std::mutex mutex;
62 
64  public: std::array<boost::shared_ptr<msgs::LinkData const>, 2>
66 
68  public: unsigned int dataIndex;
69 
71  public: bool dataDirty;
72 
74  public: ignition::math::Vector3d angularVel;
75  };
76  }
77 }
78 #endif
Definition: ImuSensorPrivate.hh:34
ignition::math::Pose3d referencePose
Imu reference pose.
Definition: ImuSensorPrivate.hh:37
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:53
transport::SubscriberPtr linkDataSub
Subscriber to link data published by parent entity.
Definition: ImuSensorPrivate.hh:52
ignition::math::Vector3d lastLinearVel
Save previous imu linear velocity for computing acceleration.
Definition: ImuSensorPrivate.hh:40
Forward declarations for transport.
std::array< boost::shared_ptr< msgs::LinkData const >, 2 > incomingLinkData
Buffer for storing link data.
Definition: ImuSensorPrivate.hh:65
ignition::math::Vector3d gravity
store gravity vector to be added to the imu output.
Definition: ImuSensorPrivate.hh:46
default namespace for gazebo
transport::PublisherPtr pub
Imu data publisher.
Definition: ImuSensorPrivate.hh:49
bool dataDirty
True if new link data is received.
Definition: ImuSensorPrivate.hh:71
unsigned int dataIndex
Index for accessing element in the link data array.
Definition: ImuSensorPrivate.hh:68
physics::LinkPtr parentEntity
Parent entity which the IMU is attached to.
Definition: ImuSensorPrivate.hh:55
msgs::IMU imuMsg
Imu message.
Definition: ImuSensorPrivate.hh:58
ignition::math::Vector3d angularVel
Noise free angular velocity.
Definition: ImuSensorPrivate.hh:74
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
std::mutex mutex
Mutex to protect reads and writes.
Definition: ImuSensorPrivate.hh:61
ignition::math::Vector3d linearAcc
Noise free linear acceleration.
Definition: ImuSensorPrivate.hh:43
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:100