controller_spec.h
Go to the documentation of this file.
1 // Copyright (C) 2008-2009, Willow Garage, Inc.
3 //
4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are met:
6 // * Redistributions of source code must retain the above copyright notice,
7 // this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution.
11 // * Neither the name of Stanford University nor the names of its
12 // contributors may be used to endorse or promote products derived from
13 // this software without specific prior written permission.
14 //
15 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 // POSSIBILITY OF SUCH DAMAGE.
27 
28 /*
29  * Author: Stuart Glaser, Wim Meeussen
30  */
31 
32 #ifndef MECHANISM_CONTROL_CONTROL_SPEC_H
33 #define MECHANISM_CONTROL_CONTROL_SPEC_H
34 
35 #pragma GCC diagnostic ignored "-Wextra"
36 
37 #include <map>
38 #include <string>
39 #include <vector>
41 #include <boost/circular_buffer.hpp>
42 #include <boost/thread/mutex.hpp>
43 #include <boost/accumulators/accumulators.hpp>
44 #include <boost/accumulators/statistics/stats.hpp>
45 #include <boost/accumulators/statistics/max.hpp>
46 #include <boost/accumulators/statistics/mean.hpp>
47 #include <boost/accumulators/statistics/variance.hpp>
48 
49 typedef boost::accumulators::accumulator_set<
50  double, boost::accumulators::stats<boost::accumulators::tag::max,
51  boost::accumulators::tag::mean,
52  boost::accumulators::tag::variance> > TimeStatistics;
53 
54 struct Statistics {
58  double max;
59  boost::circular_buffer<double> max1;
60 Statistics() : num_control_loop_overruns(0), max(0), max1(60) {}
61 };
62 
64  std::string name;
67 
68  ControllerSpec() : stats(new Statistics) {}
70  : name(spec.name), c(spec.c), stats(spec.stats) {}
71 };
72 
73 #endif
74 
ros::Time time_last_control_loop_overrun
std::string name
boost::accumulators::accumulator_set< double, boost::accumulators::stats< boost::accumulators::tag::max, boost::accumulators::tag::mean, boost::accumulators::tag::variance > > TimeStatistics
boost::shared_ptr< pr2_controller_interface::Controller > c
ControllerSpec(const ControllerSpec &spec)
TimeStatistics acc
boost::circular_buffer< double > max1
boost::shared_ptr< Statistics > stats
unsigned int num_control_loop_overruns


pr2_controller_manager
Author(s): Eric Berger berger@willowgarage.com, Stuart Glaser, Wim Meeussen
autogenerated on Tue Mar 7 2023 03:54:59