Skip to content
Merged

Dev #19

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions PowerControl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ class PowerControl : public LibXR::Application {
static constexpr int MAX_MOTOR_COUNT = POWER_CONTROL_MAX_MOTOR_COUNT;

PowerControl(LibXR::HardwareContainer& hw, LibXR::ApplicationManager& app,
SuperPower* superpower, bool is_helm = false,
SuperPower* super_power, bool is_helm = false,
float chassis_static_power_loss = 0.0f, int motor_count_3508 = 4,
int motor_count_6020 = 4)
: superpower_(superpower),
: superpower_(super_power),
is_helm_(is_helm),
rls_(1e-5f, 0.99999f),
k3_chassis_(chassis_static_power_loss),
Expand Down Expand Up @@ -259,7 +259,7 @@ class PowerControl : public LibXR::Application {
float sum_error_6020 = 0.0f;

/*初始可用功率 = 最大功率 - 静态功耗*/
float available_power = max_power - k3_chassis_ - 3.0;
float available_power = max_power - k3_chassis_;

for (int i = 0; i < motor_count_3508_; i++) {
motor_power_3508_[i] = calculate_motor_model_power(
Expand Down
7 changes: 3 additions & 4 deletions RLS.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <Eigen/Core>

#pragma once

#include <Eigen/Core>

/**
* @brief 递归最小二乘(RLS)估计器
* @tparam dim 参数维度
Expand All @@ -23,7 +23,7 @@ class RLS {
lambda_(lambda_),
delta_(delta_),
defaultparamsvector_(ParamVector::Zero()) {
this->Reset(); // 初始化各个矩阵
this->Reset(); // 初始化各个矩阵
}

/**
Expand Down Expand Up @@ -68,7 +68,6 @@ class RLS {
}

private:

uint32_t dimension_;
float lambda_;
float delta_;
Expand Down
Loading