|
MoveIt Pro API
Core Behaviors for MoveIt Pro
|
#include <signal_processing.hpp>
Public Member Functions | |
| void | start (std::int64_t num_samples) |
| void | reset () |
| bool | inProgress () const noexcept |
| std::optional< Eigen::Vector6d > | addSample (const Eigen::Vector6d &wrench) |
Accumulates raw force/torque samples following a tare request and, once the requested number of samples has been collected, returns their average. Averaging several readings prevents a single noisy outlier from biasing the sensor offset, which would otherwise introduce drift in compliant motions.
All operations are allocation-free and lock-free, so the accumulator can be driven directly from the realtime control loop.
| std::optional< Eigen::Vector6d > moveit_pro_controllers::WrenchTareAccumulator::addSample | ( | const Eigen::Vector6d & | wrench | ) |
Feeds one raw wrench sample while a tare is in progress.
| [in] | wrench | the raw force/torque measurement for this control cycle. |
|
noexcept |
| void moveit_pro_controllers::WrenchTareAccumulator::reset | ( | ) |
Cancels any in-progress tare, discarding the partial batch. Samples must come from consecutive control cycles of one control session: callers reset the accumulator on controller activation and deactivation, so a stale partial batch can never be completed with readings taken under different load or pose conditions across an inactive gap.
| void moveit_pro_controllers::WrenchTareAccumulator::start | ( | std::int64_t | num_samples | ) |
Begins a new tare. The next num_samples wrench readings passed to addSample() are averaged into the offset. Calling start() again while a tare is in progress discards the partial batch and restarts the count.
| [in] | num_samples | number of samples to average. Values below 1 are clamped to 1. |