mc_rtc is an interface for simulated and real robotic systems suitable for real-time control
BSD 2-Clause "Simplified" License
122
stars
37
forks
source link
[mc_tasks] set cutoff period of low-pass filter again when dt is updated #230
Closed
mmurooka closed 2 years ago
If the controller
dt
is less than the defaultdt
(= 0.005), a patch of this PR is needed to set the cutoff period of low-pass filter correctly.This is because https://github.com/mmurooka/mc_rtc/blob/4e6364427f90841d34db56675d2fe28650a561d5/src/mc_tasks/ImpedanceTask.cpp#L178 is called before https://github.com/mmurooka/mc_rtc/blob/4e6364427f90841d34db56675d2fe28650a561d5/src/mc_tasks/ImpedanceTask.cpp#L189
Since the low-pass filter requires
cutoffPeriod > 2 * dt
, thecutoffPeriod
will be overwritten based on thedt
before the update. https://github.com/jrl-umi3218/mc_rtc/blob/a9a8dde1cf00f4e22a5a4090b5e333e77915e725/include/mc_filter/LowPass.h#L51-L55