Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
control_toolbox
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
39
class
LimitedProxy
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
56
LimitedProxy
()
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
control_toolbox::LimitedProxy::vel_limit_
double vel_limit_
Definition:
limited_proxy.h:49
control_toolbox::LimitedProxy::mass_
double mass_
Definition:
limited_proxy.h:43
control_toolbox::LimitedProxy::last_proxy_acc_
double last_proxy_acc_
Definition:
limited_proxy.h:73
control_toolbox::LimitedProxy
Definition:
limited_proxy.h:39
control_toolbox::LimitedProxy::last_pos_error_
double last_pos_error_
Definition:
limited_proxy.h:76
control_toolbox::LimitedProxy::pos_lower_limit_
double pos_lower_limit_
Definition:
limited_proxy.h:51
control_toolbox::LimitedProxy::Kd_
double Kd_
Definition:
limited_proxy.h:44
control_toolbox::LimitedProxy::Ki_
double Ki_
Definition:
limited_proxy.h:46
control_toolbox
Definition:
dither.h:45
control_toolbox::LimitedProxy::acc_converge_
double acc_converge_
Definition:
limited_proxy.h:53
control_toolbox::LimitedProxy::last_proxy_pos_
double last_proxy_pos_
Definition:
limited_proxy.h:71
control_toolbox::LimitedProxy::LimitedProxy
LimitedProxy()
Definition:
limited_proxy.h:56
control_toolbox::LimitedProxy::Kp_
double Kp_
Definition:
limited_proxy.h:45
control_toolbox::LimitedProxy::last_vel_error_
double last_vel_error_
Definition:
limited_proxy.h:75
control_toolbox::LimitedProxy::pos_upper_limit_
double pos_upper_limit_
Definition:
limited_proxy.h:50
control_toolbox::LimitedProxy::last_proxy_vel_
double last_proxy_vel_
Definition:
limited_proxy.h:72
control_toolbox::LimitedProxy::effort_limit_
double effort_limit_
Definition:
limited_proxy.h:48
control_toolbox::LimitedProxy::reset
void reset(double pos_act, double vel_act)
Definition:
limited_proxy.cpp:138
control_toolbox::LimitedProxy::last_int_error_
double last_int_error_
Definition:
limited_proxy.h:77
control_toolbox::LimitedProxy::update
double update(double pos_des, double vel_des, double acc_des, double pos_act, double vel_act, double dt)
Definition:
limited_proxy.cpp:157
control_toolbox::LimitedProxy::Ficl_
double Ficl_
Definition:
limited_proxy.h:47
control_toolbox::LimitedProxy::lambda_proxy_
double lambda_proxy_
Definition:
limited_proxy.h:52
control_toolbox
Author(s): Melonee Wise, Sachin Chitta, John Hsu
autogenerated on Fri Feb 1 2019 03:25:58