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;
61 };
62 
64  std::string name;
67 
70  : name(spec.name), c(spec.c), stats(spec.stats) {}
71 };
72 
73 #endif
74 
ControllerSpec::ControllerSpec
ControllerSpec(const ControllerSpec &spec)
Definition: controller_spec.h:69
ControllerSpec::name
std::string name
Definition: controller_spec.h:64
ControllerSpec::ControllerSpec
ControllerSpec()
Definition: controller_spec.h:68
TimeStatistics
boost::accumulators::accumulator_set< double, boost::accumulators::stats< boost::accumulators::tag::max, boost::accumulators::tag::mean, boost::accumulators::tag::variance > > TimeStatistics
Definition: controller_spec.h:52
boost::shared_ptr< pr2_controller_interface::Controller >
Statistics
Definition: controller_spec.h:54
Statistics::Statistics
Statistics()
Definition: controller_spec.h:60
controller.h
ControllerSpec
Definition: controller_spec.h:63
ControllerSpec::c
boost::shared_ptr< pr2_controller_interface::Controller > c
Definition: controller_spec.h:65
Statistics::acc
TimeStatistics acc
Definition: controller_spec.h:55
Statistics::max1
boost::circular_buffer< double > max1
Definition: controller_spec.h:59
ros::Time
Statistics::time_last_control_loop_overrun
ros::Time time_last_control_loop_overrun
Definition: controller_spec.h:56
Statistics::num_control_loop_overruns
unsigned int num_control_loop_overruns
Definition: controller_spec.h:57
ControllerSpec::stats
boost::shared_ptr< Statistics > stats
Definition: controller_spec.h:66
Statistics::max
double max
Definition: controller_spec.h:58


pr2_controller_manager
Author(s): Eric Berger berger@willowgarage.com, Stuart Glaser, Wim Meeussen
autogenerated on Mon Mar 6 2023 03:49:21