limited_proxy.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2008, Willow Garage, Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of the Willow Garage nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 #ifndef CONTROL_TOOLBOX__LIMITED_PROXY_H
35 #define CONTROL_TOOLBOX__LIMITED_PROXY_H
36 
37 namespace control_toolbox {
38 
40 {
41  public:
42  // Controller parameter values
43  double mass_; // Estimate of the joint mass
44  double Kd_; // Damping gain
45  double Kp_; // Position gain
46  double Ki_; // Integral gain
47  double Ficl_; // Integral force clamp
48  double effort_limit_; // Limit on output force
49  double vel_limit_; // Limit on velocity
50  double pos_upper_limit_; // Upper position bound
51  double pos_lower_limit_; // Lower position bound
52  double lambda_proxy_; // Bandwidth of proxy reconvergence
53  double acc_converge_; // Acceleration of proxy reconvergence
54 
55 
57  : mass_(0.0), Kd_(0.0), Kp_(0.0), Ki_(0.0), Ficl_(0.0),
58  effort_limit_(0.0), vel_limit_(0.0),
59  pos_upper_limit_(0.0), pos_lower_limit_(0.0),
60  lambda_proxy_(0.0), acc_converge_(0.0)
61  {
62  }
63 
64  void reset(double pos_act, double vel_act);
65 
66  double update(double pos_des, double vel_des, double acc_des,
67  double pos_act, double vel_act, double dt);
68 
69  private:
70  // Controller state values
71  double last_proxy_pos_; // Proxy position
72  double last_proxy_vel_; // Proxy velocity
73  double last_proxy_acc_; // Proxy acceleration
74 
75  double last_vel_error_; // Velocity error
76  double last_pos_error_; // Position error
77  double last_int_error_; // Integral error
78 };
79 
80 } // namespace
81 
82 #endif
void reset(double pos_act, double vel_act)
double update(double pos_des, double vel_des, double acc_des, double pos_act, double vel_act, double dt)


control_toolbox
Author(s): Melonee Wise, Sachin Chitta, John Hsu
autogenerated on Fri Feb 1 2019 03:25:58