From ff2804edc1503efb6bbd1c822f070fe3c32afc5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Sowa?= Date: Mon, 8 Aug 2022 16:52:34 +0200 Subject: [PATCH] Remove wheel torque constant parameter --- include/parameters.hpp | 2 +- src/parameters.cpp | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/include/parameters.hpp b/include/parameters.hpp index 750ff0c..1d1914b 100644 --- a/include/parameters.hpp +++ b/include/parameters.hpp @@ -9,7 +9,7 @@ struct Parameters : diff_drive_lib::DiffDriveParams { Parameters() { // Wheel wheel_encoder_resolution = 878.4F; - wheel_torque_constant = 1.17647F; + wheel_torque_constant = 1.0F; wheel_pid_p = 0.0F; wheel_pid_i = 0.005F; wheel_pid_d = 0.0F; diff --git a/src/parameters.cpp b/src/parameters.cpp index 3a3176d..db6be3f 100644 --- a/src/parameters.cpp +++ b/src/parameters.cpp @@ -2,8 +2,6 @@ static constexpr const char* wheel_encoder_resolution_param_name = "wheels/encoder_resolution"; -static constexpr const char* wheel_torque_constant_param_name = - "wheels/torque_constant"; static constexpr const char* wheel_pid_p_param_name = "wheels/pid/p"; static constexpr const char* wheel_pid_i_param_name = "wheels/pid/i"; static constexpr const char* wheel_pid_d_param_name = "wheels/pid/d"; @@ -47,8 +45,6 @@ bool Parameters::init(rclc_parameter_server_t* param_server) { RCCHECK(init_parameter_double(param_server, wheel_encoder_resolution_param_name, wheel_encoder_resolution)) - RCCHECK(init_parameter_double(param_server, wheel_torque_constant_param_name, - wheel_torque_constant)) RCCHECK( init_parameter_double(param_server, wheel_pid_p_param_name, wheel_pid_p)) RCCHECK( @@ -81,8 +77,6 @@ inline void get_parameter_double(rclc_parameter_server_t* param_server, void Parameters::update(rclc_parameter_server_t* param_server) { get_parameter_double(param_server, wheel_encoder_resolution_param_name, &wheel_encoder_resolution); - get_parameter_double(param_server, wheel_torque_constant_param_name, - &wheel_torque_constant); get_parameter_double(param_server, wheel_pid_p_param_name, &wheel_pid_p); get_parameter_double(param_server, wheel_pid_i_param_name, &wheel_pid_i); get_parameter_double(param_server, wheel_pid_d_param_name, &wheel_pid_d);