PressureSensor.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 PRESSURESENSOR_H_
00014 #define PRESSURESENSOR_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 PressureSensor
00025 {
00026 
00027 public:
00028   std::string name, parentLinkName;
00029 
00037   PressureSensor(std::string sensor_name, std::string parentName, osg::Node *parent, osg::Matrixd rMl, double std = 0) :
00038       name(sensor_name),parentLinkName(parentName) , parent_(parent), rMl_(rMl), std_(std)
00039   {
00040     node_ = new osg::Node();
00041     parent->asGroup()->addChild(node_);
00042   }
00043 
00044   double getMeasurement();
00045   int getTFTransform(tf::Pose & pose, std::string & parent);
00046 
00047   double getStandardDeviation()
00048   {
00049     return std_;
00050   }
00051 
00052   virtual ~PressureSensor()
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> node_;
00061 
00062   boost::mt19937 rng_; 
00063 };
00064 
00065 #endif /* PRESSURESENSOR_H_ */


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