standard.cpp
Go to the documentation of this file.
1 /*******************************************************************************
2  * BSD 3-Clause License
3  *
4  * Copyright (c) 2021, Qiayuan Liao
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 are met:
9  *
10  * * Redistributions of source code must retain the above copyright notice, this
11  * list of conditions and the following disclaimer.
12  *
13  * * Redistributions in binary form must reproduce the above copyright notice,
14  * this list of conditions and the following disclaimer in the documentation
15  * and/or other materials provided with the distribution.
16  *
17  * * Neither the name of the copyright holder nor the names of its
18  * contributors may be used to endorse or promote products derived from
19  * this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE
25  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  *******************************************************************************/
33 
34 //
35 // Created by huakang on 2021/1/18.
36 //
37 
39 #include <string>
42 
43 namespace rm_shooter_controllers
44 {
45 bool Controller::init(hardware_interface::RobotHW* robot_hw, ros::NodeHandle& root_nh, ros::NodeHandle& controller_nh)
46 {
47  config_ = { .block_effort = getParam(controller_nh, "block_effort", 0.),
48  .block_speed = getParam(controller_nh, "block_speed", 0.),
49  .block_duration = getParam(controller_nh, "block_duration", 0.),
50  .block_overtime = getParam(controller_nh, "block_overtime", 0.),
51  .anti_block_angle = getParam(controller_nh, "anti_block_angle", 0.),
52  .anti_block_threshold = getParam(controller_nh, "anti_block_threshold", 0.),
53  .forward_push_threshold = getParam(controller_nh, "forward_push_threshold", 0.1),
54  .exit_push_threshold = getParam(controller_nh, "exit_push_threshold", 0.1),
55  .extra_wheel_speed = getParam(controller_nh, "extra_wheel_speed", 0.),
56  .wheel_speed_drop_threshold = getParam(controller_nh, "wheel_speed_drop_threshold", 10.),
57  .wheel_speed_raise_threshold = getParam(controller_nh, "wheel_speed_raise_threshold", 3.1) };
58  config_rt_buffer.initRT(config_);
59  push_per_rotation_ = getParam(controller_nh, "push_per_rotation", 0);
60  push_wheel_speed_threshold_ = getParam(controller_nh, "push_wheel_speed_threshold", 0.);
61  freq_threshold_ = getParam(controller_nh, "freq_threshold", 20.);
62  anti_friction_block_duty_cycle_ = getParam(controller_nh, "anti_friction_block_duty_cycle", 0.5);
63  anti_friction_block_vel_ = getParam(controller_nh, "anti_friction_block_vel", 810.0);
64  friction_block_effort_ = getParam(controller_nh, "friction_block_effort", 0.2);
65  friction_block_vel_ = getParam(controller_nh, "friction_block_vel", 1.0);
66 
67  cmd_subscriber_ = controller_nh.subscribe<rm_msgs::ShootCmd>("command", 1, &Controller::commandCB, this);
69  controller_nh, "/local_heat_state/shooter_state", 10));
70  shoot_state_pub_.reset(new realtime_tools::RealtimePublisher<rm_msgs::ShootState>(controller_nh, "state", 10));
71  // Init dynamic reconfigure
72  d_srv_ = new dynamic_reconfigure::Server<rm_shooter_controllers::ShooterConfig>(controller_nh);
73  dynamic_reconfigure::Server<rm_shooter_controllers::ShooterConfig>::CallbackType cb = [this](auto&& PH1, auto&& PH2) {
74  reconfigCB(std::forward<decltype(PH1)>(PH1), std::forward<decltype(PH2)>(PH2));
75  };
76  d_srv_->setCallback(cb);
77 
78  XmlRpc::XmlRpcValue friction;
79  double wheel_speed_offset;
80  double wheel_speed_direction;
82  controller_nh.getParam("friction", friction);
83  for (const auto& its : friction)
84  {
85  std::vector<double> wheel_speed_offset_temp;
86  std::vector<double> wheel_speed_direction_temp;
87  std::vector<effort_controllers::JointVelocityController*> ctrl_frictions;
88  for (const auto& it : its.second)
89  {
90  ros::NodeHandle nh = ros::NodeHandle(controller_nh, "friction/" + its.first + "/" + it.first);
91  wheel_speed_offset_temp.push_back(nh.getParam("wheel_speed_offset", wheel_speed_offset) ? wheel_speed_offset : 0.);
92  wheel_speed_direction_temp.push_back(
93  nh.getParam("wheel_speed_direction", wheel_speed_direction) ? wheel_speed_direction : 1.);
95  if (ctrl_friction->init(effort_joint_interface_, nh))
96  ctrl_frictions.push_back(ctrl_friction);
97  else
98  return false;
99  }
100  ctrls_friction_.push_back(ctrl_frictions);
101  wheel_speed_offsets_.push_back(wheel_speed_offset_temp);
102  wheel_speed_directions_.push_back(wheel_speed_direction_temp);
103  }
104  ros::NodeHandle nh_trigger = ros::NodeHandle(controller_nh, "trigger");
105  return ctrl_trigger_.init(effort_joint_interface_, nh_trigger);
106 }
107 
108 void Controller::starting(const ros::Time& /*time*/)
109 {
110  state_ = STOP;
111  state_changed_ = true;
112 }
113 
114 void Controller::update(const ros::Time& time, const ros::Duration& period)
115 {
117  config_ = *config_rt_buffer.readFromRT();
118  if (state_ != cmd_.mode)
119  {
120  if (state_ != BLOCK)
121  if ((state_ != PUSH || cmd_.mode != READY) ||
122  (cmd_.mode == READY &&
123  (std::fmod(std::abs(ctrl_trigger_.command_struct_.position_ - ctrl_trigger_.getPosition()), 2. * M_PI) <
125  cmd_.hz >= freq_threshold_)))
126  {
127  if (state_ == STOP && cmd_.mode == READY)
128  enter_ready_ = true;
129  state_ = cmd_.mode;
130  state_changed_ = true;
131  }
132  }
133 
134  if (state_ != STOP)
135  setSpeed(cmd_);
136  switch (state_)
137  {
138  case READY:
139  ready(period);
140  break;
141  case PUSH:
142  push(time, period);
143  break;
144  case STOP:
145  stop(time, period);
146  break;
147  case BLOCK:
148  block(time, period);
149  break;
150  }
151  judgeBulletShoot(time, period);
152  if (shoot_state_pub_->trylock())
153  {
154  shoot_state_pub_->msg_.stamp = time;
155  shoot_state_pub_->msg_.state = state_;
156  shoot_state_pub_->unlockAndPublish();
157  }
158  for (auto& ctrl_frictions : ctrls_friction_)
159  {
160  for (auto& ctrl_friction : ctrl_frictions)
161  {
162  ctrl_friction->update(time, period);
163  }
164  }
165  ctrl_trigger_.update(time, period);
166 }
167 
168 void Controller::stop(const ros::Time& time, const ros::Duration& period)
169 {
170  if (state_changed_)
171  { // on enter
172  state_changed_ = false;
173  ROS_INFO("[Shooter] Enter STOP");
174  for (auto& ctrl_frictions : ctrls_friction_)
175  {
176  for (auto& ctrl_friction : ctrl_frictions)
177  {
178  ctrl_friction->setCommand(0.);
179  }
180  }
182  }
183 }
184 
185 void Controller::ready(const ros::Duration& period)
186 {
187  if (state_changed_)
188  { // on enter
189  state_changed_ = false;
190  ROS_INFO("[Shooter] Enter READY");
191 
192  normalize();
193  }
194 }
195 
196 void Controller::push(const ros::Time& time, const ros::Duration& period)
197 {
198  if (state_changed_)
199  { // on enter
200  state_changed_ = false;
201  ROS_INFO("[Shooter] Enter PUSH");
202  }
203  bool wheel_speed_ready = true;
204  for (size_t i = 0; i < ctrls_friction_.size(); i++)
205  {
206  for (size_t j = 0; j < ctrls_friction_[i].size(); j++)
207  {
208  if (wheel_speed_directions_[i][j] * ctrls_friction_[i][j]->joint_.getVelocity() <
209  push_wheel_speed_threshold_ * ctrls_friction_[i][j]->command_ ||
210  wheel_speed_directions_[i][j] * ctrls_friction_[i][j]->joint_.getVelocity() <= M_PI)
211  wheel_speed_ready = false;
212  }
213  }
214  if ((cmd_.wheel_speed == 0. || wheel_speed_ready) && (time - last_shoot_time_).toSec() >= 1. / cmd_.hz)
215  { // Time to shoot!!!
217  {
219  2. * M_PI / static_cast<double>(push_per_rotation_),
220  -1 * cmd_.hz * 2. * M_PI / static_cast<double>(push_per_rotation_));
221  last_shoot_time_ = time;
222  }
223  else if (std::fmod(std::abs(ctrl_trigger_.command_struct_.position_ - ctrl_trigger_.getPosition()), 2. * M_PI) <
225  {
227  2. * M_PI / static_cast<double>(push_per_rotation_));
228  last_shoot_time_ = time;
229  }
230  // Check block
233  ((time - last_shoot_time_).toSec() > 1 / cmd_.hz &&
235  {
236  if (!maybe_block_)
237  {
238  block_time_ = time;
239  maybe_block_ = true;
240  }
241  if ((time - block_time_).toSec() >= config_.block_duration)
242  {
243  state_ = BLOCK;
244  state_changed_ = true;
245  ROS_INFO("[Shooter] Exit PUSH");
246  }
247  }
248  else
249  maybe_block_ = false;
250  }
251  else
252  ROS_DEBUG("[Shooter] Wait for friction wheel");
253 }
254 
255 void Controller::block(const ros::Time& time, const ros::Duration& period)
256 {
257  if (state_changed_)
258  { // on enter
259  state_changed_ = false;
260  ROS_INFO("[Shooter] Trigger Enter BLOCK");
261  last_block_time_ = time;
263  }
264  if (std::abs(ctrl_trigger_.command_struct_.position_ - ctrl_trigger_.joint_.getPosition()) <
266  (time - last_block_time_).toSec() > config_.block_overtime)
267  {
268  normalize();
269  state_ = PUSH;
270  state_changed_ = true;
271  ROS_INFO("[Shooter] Trigger Exit BLOCK");
272  }
273 }
274 
275 void Controller::setSpeed(const rm_msgs::ShootCmd& cmd)
276 {
277  for (size_t i = 0; i < ctrls_friction_.size(); i++)
278  {
279  for (size_t j = 0; j < ctrls_friction_[i].size(); j++)
280  {
281  if (wheel_speed_directions_[i][j] * ctrls_friction_[i][j]->joint_.getVelocity() <= friction_block_vel_ &&
282  abs(ctrls_friction_[i][j]->joint_.getEffort()) >= friction_block_effort_ && cmd.wheel_speed != 0)
283  friction_wheel_block = true;
284  else
285  friction_wheel_block = false;
286  }
287  }
289  {
291  {
292  ROS_INFO("[Shooter] Frictions Exit BLOCK");
294  }
295  for (size_t i = 0; i < ctrls_friction_.size(); i++)
296  {
297  for (size_t j = 0; j < ctrls_friction_[i].size(); j++)
298  {
299  ctrls_friction_[i][j]->setCommand(wheel_speed_directions_[i][j] *
300  (cmd_.wheel_speed + config_.extra_wheel_speed + wheel_speed_offsets_[i][j]));
301  }
302  }
303  }
304  else
305  {
306  ROS_INFO("[Shooter] Frictions Enter BLOCK");
308  double command = (friction_block_count <= static_cast<int>(anti_friction_block_duty_cycle_ * 1000)) ?
310  0.;
311  for (size_t i = 0; i < ctrls_friction_.size(); i++)
312  {
313  for (size_t j = 0; j < ctrls_friction_[i].size(); j++)
314  {
315  ctrls_friction_[i][j]->setCommand(command);
316  }
317  }
319  }
320 }
321 
323 {
324  double push_angle = 2. * M_PI / static_cast<double>(push_per_rotation_);
325  if (cmd_.hz <= freq_threshold_)
326  {
328  push_angle * std::floor((ctrl_trigger_.joint_.getPosition() + 0.01 + config_.exit_push_threshold) / push_angle));
329  }
330  else if (enter_ready_)
331  {
332  ctrl_trigger_.setCommand(push_angle * std::floor((ctrl_trigger_.joint_.getPosition() + 0.01) / push_angle));
333  enter_ready_ = false;
334  }
335  else
336  ctrl_trigger_.setCommand(push_angle * std::floor((ctrl_trigger_.joint_.getPosition() - 0.01) / push_angle));
337 }
338 
339 void Controller::judgeBulletShoot(const ros::Time& time, const ros::Duration& period)
340 {
341  if (state_ != STOP)
342  {
343  if (abs(ctrls_friction_[0][0]->joint_.getVelocity()) - last_wheel_speed_ > config_.wheel_speed_raise_threshold &&
345  {
346  wheel_speed_raise_ = true;
347  wheel_speed_drop_ = false;
348  }
349 
350  if (last_wheel_speed_ - abs(ctrls_friction_[0][0]->joint_.getVelocity()) > config_.wheel_speed_drop_threshold &&
351  abs(ctrls_friction_[0][0]->joint_.getVelocity()) > 300. && wheel_speed_raise_)
352  {
354  wheel_speed_raise_ = false;
355  has_shoot_ = true;
356  }
357  }
358  double friction_change_vel = abs(ctrls_friction_[0][0]->joint_.getVelocity()) - last_wheel_speed_;
359  last_wheel_speed_ = abs(ctrls_friction_[0][0]->joint_.getVelocity());
360  count_++;
361  if (has_shoot_last_)
362  {
363  has_shoot_ = true;
364  }
366  if (count_ == 2)
367  {
368  if (local_heat_state_pub_->trylock())
369  {
370  local_heat_state_pub_->msg_.stamp = time;
371  local_heat_state_pub_->msg_.has_shoot = has_shoot_;
372  local_heat_state_pub_->msg_.friction_change_vel = friction_change_vel;
373  local_heat_state_pub_->unlockAndPublish();
374  }
375  has_shoot_last_ = false;
376  count_ = 0;
377  }
378  if (has_shoot_)
379  has_shoot_ = false;
380 }
381 void Controller::reconfigCB(rm_shooter_controllers::ShooterConfig& config, uint32_t /*level*/)
382 {
383  ROS_INFO("[Shooter] Dynamic params change");
385  {
386  Config init_config = *config_rt_buffer.readFromNonRT(); // config init use yaml
387  config.block_effort = init_config.block_effort;
388  config.block_speed = init_config.block_speed;
389  config.block_duration = init_config.block_duration;
390  config.block_overtime = init_config.block_overtime;
391  config.anti_block_angle = init_config.anti_block_angle;
392  config.anti_block_threshold = init_config.anti_block_threshold;
393  config.forward_push_threshold = init_config.forward_push_threshold;
394  config.exit_push_threshold = init_config.exit_push_threshold;
395  config.extra_wheel_speed = init_config.extra_wheel_speed;
396  config.wheel_speed_drop_threshold = init_config.wheel_speed_drop_threshold;
397  config.wheel_speed_raise_threshold = init_config.wheel_speed_raise_threshold;
399  }
400  Config config_non_rt{ .block_effort = config.block_effort,
401  .block_speed = config.block_speed,
402  .block_duration = config.block_duration,
403  .block_overtime = config.block_overtime,
404  .anti_block_angle = config.anti_block_angle,
405  .anti_block_threshold = config.anti_block_threshold,
406  .forward_push_threshold = config.forward_push_threshold,
407  .exit_push_threshold = config.exit_push_threshold,
408  .extra_wheel_speed = config.extra_wheel_speed,
409  .wheel_speed_drop_threshold = config.wheel_speed_drop_threshold,
410  .wheel_speed_raise_threshold = config.wheel_speed_raise_threshold };
411  config_rt_buffer.writeFromNonRT(config_non_rt);
412 }
413 
414 } // namespace rm_shooter_controllers
415 
rm_shooter_controllers::Controller::push_wheel_speed_threshold_
double push_wheel_speed_threshold_
Definition: standard.h:125
rm_shooter_controllers::Controller::friction_block_count
int friction_block_count
Definition: standard.h:131
rm_shooter_controllers::Controller::cmd_subscriber_
ros::Subscriber cmd_subscriber_
Definition: standard.h:154
rm_shooter_controllers::Controller::has_shoot_last_
bool has_shoot_last_
Definition: standard.h:135
rm_shooter_controllers::Controller::dynamic_reconfig_initialized_
bool dynamic_reconfig_initialized_
Definition: standard.h:127
rm_shooter_controllers::Config::block_overtime
double block_overtime
Definition: standard.h:121
rm_shooter_controllers::Controller::enter_ready_
bool enter_ready_
Definition: standard.h:129
rm_shooter_controllers::Controller::cmd_
rm_msgs::ShootCmd cmd_
Definition: standard.h:151
rm_shooter_controllers::Controller::count_
int count_
Definition: standard.h:124
rm_shooter_controllers::Controller::update
void update(const ros::Time &time, const ros::Duration &period) override
Definition: standard.cpp:145
rm_shooter_controllers::Controller::STOP
@ STOP
Definition: standard.h:142
hardware_interface::InterfaceManager::get
T * get()
rm_shooter_controllers::Controller::config_
Config config_
Definition: standard.h:148
ros::NodeHandle::getParam
bool getParam(const std::string &key, bool &b) const
rm_shooter_controllers::Controller::cmd_rt_buffer_
realtime_tools::RealtimeBuffer< rm_msgs::ShootCmd > cmd_rt_buffer_
Definition: standard.h:150
command
ROSLIB_DECL std::string command(const std::string &cmd)
rm_shooter_controllers::Config::block_speed
double block_speed
Definition: standard.h:121
effort_controllers::JointPositionController::init
bool init(hardware_interface::EffortJointInterface *robot, ros::NodeHandle &n)
rm_shooter_controllers::Controller::wheel_speed_drop_
bool wheel_speed_drop_
Definition: standard.h:136
rm_shooter_controllers::Config::exit_push_threshold
double exit_push_threshold
Definition: standard.h:122
rm_shooter_controllers::Controller::PUSH
@ PUSH
Definition: standard.h:144
rm_shooter_controllers::Controller::friction_block_effort_
double friction_block_effort_
Definition: standard.h:133
rm_shooter_controllers::Controller::effort_joint_interface_
hardware_interface::EffortJointInterface * effort_joint_interface_
Definition: standard.h:119
rm_shooter_controllers::Controller::push
void push(const ros::Time &time, const ros::Duration &period)
Definition: standard.cpp:227
rm_shooter_controllers::Controller::ctrls_friction_
std::vector< std::vector< effort_controllers::JointVelocityController * > > ctrls_friction_
Definition: standard.h:120
rm_shooter_controllers::Controller::state_changed_
bool state_changed_
Definition: standard.h:128
rm_shooter_controllers::Controller::BLOCK
@ BLOCK
Definition: standard.h:145
rm_shooter_controllers::Controller::anti_friction_block_duty_cycle_
double anti_friction_block_duty_cycle_
Definition: standard.h:134
realtime_tools::RealtimePublisher
effort_controllers::JointVelocityController
controller_interface::ControllerBase
rm_shooter_controllers::Config::block_duration
double block_duration
Definition: standard.h:121
rm_shooter_controllers::Controller::friction_wheel_block
bool friction_wheel_block
Definition: standard.h:132
rm_shooter_controllers::Controller::commandCB
void commandCB(const rm_msgs::ShootCmdConstPtr &msg)
Definition: standard.h:112
rm_shooter_controllers::Controller::local_heat_state_pub_
std::shared_ptr< realtime_tools::RealtimePublisher< rm_msgs::LocalHeatState > > local_heat_state_pub_
Definition: standard.h:152
rm_shooter_controllers::Controller::init
bool init(hardware_interface::RobotHW *robot_hw, ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh) override
Definition: standard.cpp:76
PLUGINLIB_EXPORT_CLASS
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
rm_shooter_controllers::Controller::freq_threshold_
double freq_threshold_
Definition: standard.h:126
rm_shooter_controllers::Controller::wheel_speed_offsets_
std::vector< std::vector< double > > wheel_speed_offsets_
Definition: standard.h:122
hardware_interface::RobotHW
ROS_DEBUG
#define ROS_DEBUG(...)
realtime_tools::RealtimeBuffer::readFromRT
T * readFromRT()
rm_shooter_controllers::Controller::setSpeed
void setSpeed(const rm_msgs::ShootCmd &cmd)
Definition: standard.cpp:306
rm_shooter_controllers
Definition: standard.h:55
standard.h
rm_shooter_controllers::Controller::state_
int state_
Definition: standard.h:147
effort_controllers::JointPositionController::update
void update(const ros::Time &time, const ros::Duration &period)
effort_controllers::JointPositionController::command_struct_
Commands command_struct_
rm_shooter_controllers::Controller::maybe_block_
bool maybe_block_
Definition: standard.h:130
hardware_interface::EffortJointInterface
effort_controllers::JointPositionController::joint_
hardware_interface::JointHandle joint_
rm_shooter_controllers::Controller::block
void block(const ros::Time &time, const ros::Duration &period)
Definition: standard.cpp:286
ros::NodeHandle::subscribe
Subscriber subscribe(const std::string &topic, uint32_t queue_size, const boost::function< void(C)> &callback, const VoidConstPtr &tracked_object=VoidConstPtr(), const TransportHints &transport_hints=TransportHints())
rm_shooter_controllers::Controller::last_friction_wheel_block
bool last_friction_wheel_block
Definition: standard.h:132
rm_shooter_controllers::Controller::friction_block_vel_
double friction_block_vel_
Definition: standard.h:133
rm_shooter_controllers::Controller::shoot_state_pub_
std::shared_ptr< realtime_tools::RealtimePublisher< rm_msgs::ShootState > > shoot_state_pub_
Definition: standard.h:153
effort_controllers::JointPositionController::setCommand
void setCommand(double pos_target)
rm_shooter_controllers::Config::anti_block_threshold
double anti_block_threshold
Definition: standard.h:121
effort_controllers::JointVelocityController::init
bool init(hardware_interface::EffortJointInterface *robot, const std::string &joint_name, const control_toolbox::Pid &pid)
rm_shooter_controllers::Controller::last_block_time_
ros::Time last_block_time_
Definition: standard.h:139
rm_shooter_controllers::Config::wheel_speed_raise_threshold
double wheel_speed_raise_threshold
Definition: standard.h:123
rm_shooter_controllers::Controller::READY
@ READY
Definition: standard.h:143
rm_shooter_controllers::Controller::reconfigCB
void reconfigCB(rm_shooter_controllers::ShooterConfig &config, uint32_t)
Definition: standard.cpp:412
hardware_interface::JointStateHandle::getVelocity
double getVelocity() const
ros::Time
rm_shooter_controllers::Controller::block_time_
ros::Time block_time_
Definition: standard.h:139
rm_shooter_controllers::Controller::normalize
void normalize()
Definition: standard.cpp:353
hardware_interface::JointStateHandle::getPosition
double getPosition() const
getParam
T getParam(ros::NodeHandle &pnh, const std::string &param_name, const T &default_val)
rm_shooter_controllers::Controller::ctrl_trigger_
effort_controllers::JointPositionController ctrl_trigger_
Definition: standard.h:121
rm_shooter_controllers::Controller
Definition: standard.h:95
rm_shooter_controllers::Controller::starting
void starting(const ros::Time &) override
Definition: standard.cpp:139
rm_shooter_controllers::Controller::stop
void stop(const ros::Time &time, const ros::Duration &period)
Definition: standard.cpp:199
rm_shooter_controllers::Controller::config_rt_buffer
realtime_tools::RealtimeBuffer< Config > config_rt_buffer
Definition: standard.h:149
rm_shooter_controllers::Config::block_effort
double block_effort
Definition: standard.h:121
rm_shooter_controllers::Config::wheel_speed_drop_threshold
double wheel_speed_drop_threshold
Definition: standard.h:123
rm_shooter_controllers::Config::extra_wheel_speed
double extra_wheel_speed
Definition: standard.h:123
class_list_macros.hpp
ros_utilities.h
rm_shooter_controllers::Config::forward_push_threshold
double forward_push_threshold
Definition: standard.h:122
rm_shooter_controllers::Controller::judgeBulletShoot
void judgeBulletShoot(const ros::Time &time, const ros::Duration &period)
Definition: standard.cpp:370
hardware_interface::JointStateHandle::getEffort
double getEffort() const
rm_shooter_controllers::Controller::last_shoot_time_
ros::Time last_shoot_time_
Definition: standard.h:139
rm_shooter_controllers::Config::anti_block_angle
double anti_block_angle
Definition: standard.h:121
rm_shooter_controllers::Controller::wheel_speed_directions_
std::vector< std::vector< double > > wheel_speed_directions_
Definition: standard.h:123
rm_shooter_controllers::Controller::last_wheel_speed_
double last_wheel_speed_
Definition: standard.h:137
cmd
string cmd
rm_shooter_controllers::Controller::push_per_rotation_
int push_per_rotation_
Definition: standard.h:124
ROS_INFO
#define ROS_INFO(...)
rm_shooter_controllers::Controller::anti_friction_block_vel_
double anti_friction_block_vel_
Definition: standard.h:134
rm_shooter_controllers::Controller::ready
void ready(const ros::Duration &period)
Definition: standard.cpp:216
ros::Duration
effort_controllers::JointPositionController::getPosition
double getPosition()
XmlRpc::XmlRpcValue
ros::NodeHandle
rm_shooter_controllers::Controller::wheel_speed_raise_
bool wheel_speed_raise_
Definition: standard.h:136
rm_shooter_controllers::Controller::has_shoot_
bool has_shoot_
Definition: standard.h:135
rm_shooter_controllers::Controller::d_srv_
dynamic_reconfigure::Server< rm_shooter_controllers::ShooterConfig > * d_srv_
Definition: standard.h:155


rm_shooter_controllers
Author(s): Qiayuan Liao
autogenerated on Sun May 4 2025 02:57:27