Skip to content

Commit

Permalink
added limit for async loop rate
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Aug 23, 2023
1 parent 95c1d09 commit b740a5c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mpc_tracker/mpc_tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,11 @@ bool MpcTracker::initialize(const ros::NodeHandle& nh, std::shared_ptr<mrs_uav_m
param_loader.loadParam(yaml_prefix + "mpc_loop/synchronous_rate_limit", _mpc_synchronous_rate_limit_);
param_loader.loadParam(yaml_prefix + "mpc_loop/asynchronous_loop_rate", _mpc_asynchronous_rate_);

if (_mpc_asynchronous_rate_ < 15) {
ROS_ERROR("[MpcTracker]: the asynchronous_loop_rate must be > 15 Hz");
return false;
}

dt1_ = 1.0 / _mpc_asynchronous_rate_;

param_loader.loadParam(yaml_prefix + "braking/enabled", drs_params_.braking_enabled);
Expand Down

0 comments on commit b740a5c

Please sign in to comment.