mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-23 00:59:54 +08:00
add phase_interpolation_min_vel setting
This commit is contained in:
@@ -792,6 +792,9 @@ bool Encoder::update() {
|
||||
vel_estimate_counts_ = 0.0f; //align delta-sigma on zero to prevent jitter
|
||||
snap_to_zero_vel = true;
|
||||
}
|
||||
if (std::abs(vel_estimate_counts_ / (float)config_.cpr) < config_.phase_interpolation_min_vel) {
|
||||
snap_to_zero_vel = true;
|
||||
}
|
||||
|
||||
// Outputs from Encoder for Controller
|
||||
pos_estimate_ = pos_estimate_counts_ / (float)config_.cpr;
|
||||
|
||||
@@ -35,6 +35,7 @@ public:
|
||||
int32_t direction = 0; // direction with respect to motor
|
||||
bool use_index_offset = true;
|
||||
bool enable_phase_interpolation = true; // Use velocity to interpolate inside the count state
|
||||
float phase_interpolation_min_vel = 0.0f;
|
||||
bool find_idx_on_lockin_only = false; // Only be sensitive during lockin scan constant vel state
|
||||
bool ignore_illegal_hall_state = false; // dont error on bad states like 000 or 111
|
||||
uint8_t hall_polarity = 0;
|
||||
|
||||
@@ -981,6 +981,9 @@ interfaces:
|
||||
direction: int32
|
||||
pre_calibrated: {type: bool, c_setter: set_pre_calibrated}
|
||||
enable_phase_interpolation: bool
|
||||
phase_interpolation_min_vel:
|
||||
type: float32
|
||||
unit: turns/s
|
||||
bandwidth: {type: float32, c_setter: set_bandwidth}
|
||||
calib_range: float32
|
||||
calib_scan_distance: float32
|
||||
|
||||
Reference in New Issue
Block a user