twist_controller_config.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 #
3 # Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 
17 
18 import rospy
19 from dynamic_reconfigure.client import Client
21 
22 '''
23 Available keys for the dynamic_reconfigure update call
24 '''
25 NUM_FILT = 'numerical_filtering'
26 DAMP_METHOD = 'damping_method'
27 DAMP_FACT = 'damping_factor'
28 LAMBDA_MAX = 'lambda_max'
29 W_THRESH = 'w_threshold'
30 SLOPE_DAMPING='slope_damping'
31 BETA = 'beta'
32 EPS_DAMP = 'eps_damping'
33 EPS_TRUNC = 'eps_truncation'
34 
35 SOLVER = 'solver'
36 PRIO = 'priority'
37 K_H = 'k_H'
38 
39 CONSTR_JLA = 'constraint_jla'
40 PRIO_JLA = 'priority_jla'
41 K_H_JLA = 'k_H_jla'
42 ACTIV_THRESH_JLA = 'activation_threshold_jla'
43 ACTIV_BUF_JLA = 'activation_buffer_jla'
44 CRIT_THRESH_JLA = 'critical_threshold_jla'
45 DAMP_JLA = 'damping_jla'
46 
47 CONSTR_CA = 'constraint_ca'
48 PRIO_CA = 'priority_ca'
49 K_H_CA = 'k_H_ca'
50 ACTIV_THRESH_CA = 'activation_threshold_ca'
51 ACTIV_BUF_CA = 'activation_buffer_ca'
52 CRIT_THRESH_CA = 'critical_threshold_ca'
53 DAMP_CA = 'damping_ca'
54 
55 SIGMA_UJS = 'sigma_ujs'
56 SIGMA_SPEED_UJS = 'sigma_speed_ujs'
57 DELTA_POS_UJS = 'delta_pos_ujs'
58 SIGMA_SPEED_UJS = 'delta_speed_ujs'
59 
60 KEEP_DIR = 'keep_direction'
61 ENF_POS_LIM = 'enforce_pos_limits'
62 ENF_VEL_LIM = 'enforce_vel_limits'
63 ENF_ACC_LIM = 'enforce_acc_limits'
64 TOL = 'limits_tolerance'
65 MAX_VEL_LIN_BASE = 'max_vel_lin_base'
66 MAX_VEL_ROT_BASE = 'max_vel_rot_base'
67 
68 KIN_EXT = 'kinematic_extension'
69 EXT_RATIO = 'extension_ratio'
70 
71 '''
72 Class inherits from dynamic_reconfigure.client.Client and implements some wrapper methods
73 '''
75 
76  def __init__(self, timeout = None):
77  super(TwistControllerReconfigureClient, self).__init__('twist_controller', timeout)
78  self._current_config = {}
79  self._update_config = {}
80 
81  def init(self):
82  self._current_config = self.get_configuration()
83  self._update_config.clear()
84 
85  def set_config_param(self, cfg_key, cfg_value):
86  if cfg_key in self._current_config:
87  self._update_config[cfg_key] = cfg_value
88  else:
89  rospy.logerr('Cannot update config with key {0}! Not available in current config.'.format(cfg_key))
90 
91  def update(self):
92  self.update_configuration(self._update_config)
93  self._update_config.clear()


cob_twist_controller
Author(s): Felix Messmer , Marco Bezzon , Christoph Mark , Francisco Moreno
autogenerated on Thu Apr 8 2021 02:40:01