InertialMeasurementUnit.h
Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2013 University of Jaume-I.
00003  * All rights reserved. This program and the accompanying materials
00004  * are made available under the terms of the GNU Public License v3.0
00005  * which accompanies this distribution, and is available at
00006  * http://www.gnu.org/licenses/gpl.html
00007  * 
00008  * Contributors:
00009  *     Mario Prats
00010  *     Javier Perez
00011  */
00012 
00013 #ifndef INERTIALMEASUREMENTUNIT_H_
00014 #define INERTIALMEASUREMENTUNIT_H_
00015 
00016 #include <osg/Vec3d>
00017 #include <osg/Node>
00018 #include <osg/Matrix>
00019 #include <osg/Group>
00020 
00021 #include <boost/random.hpp>
00022 #include <tf/transform_datatypes.h>
00023 
00024 class InertialMeasurementUnit
00025 {
00026 
00027 public:
00028   std::string name,parentLinkName;
00029 
00037   InertialMeasurementUnit(std::string imu_name, std::string parentName, osg::Node *imu_parent, osg::Matrixd rMl, double imu_std = 0) :
00038       name(imu_name),parentLinkName(parentName), parent_(imu_parent), rMl_(rMl), std_(imu_std)
00039   {
00040     imu_node_ = new osg::Node();
00041     imu_parent->asGroup()->addChild(imu_node_);
00042   }
00043 
00044   int getTFTransform(tf::Pose & pose, std::string & parent);
00045   osg::Quat getMeasurement();
00046 
00047   double getStandardDeviation()
00048   {
00049     return std_;
00050   }
00051 
00052   virtual ~InertialMeasurementUnit()
00053   {
00054   }
00055 
00056 private:
00057   osg::ref_ptr<osg::Node> parent_;
00058   osg::Matrixd rMl_;
00059   double std_;
00060   osg::ref_ptr<osg::Node> imu_node_;
00061 
00062   boost::mt19937 rng_; 
00063 };
00064 
00065 #endif /* INERTIALMEASUREMENTUNIT_H_ */


uwsim
Author(s): Mario Prats , Javier Perez
autogenerated on Fri Aug 28 2015 13:28:58