From 1ae520b764201e142d426a2950d0b49f6f066121 Mon Sep 17 00:00:00 2001 From: chfriedrich98 Date: Fri, 22 Mar 2024 16:34:03 +0100 Subject: [PATCH] cleanup --- src/modules/ackermann_drive/AckermannDrive.cpp | 13 +------------ src/modules/ackermann_drive/AckermannDrive.hpp | 12 ------------ src/modules/ackermann_drive/module.yaml | 4 ++-- 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/src/modules/ackermann_drive/AckermannDrive.cpp b/src/modules/ackermann_drive/AckermannDrive.cpp index c0b9097f58..753ffb0348 100644 --- a/src/modules/ackermann_drive/AckermannDrive.cpp +++ b/src/modules/ackermann_drive/AckermannDrive.cpp @@ -35,13 +35,10 @@ using namespace time_literals; using namespace matrix; -// namespace AckermannDrive -// { AckermannDrive::AckermannDrive() : ModuleParams(nullptr), ScheduledWorkItem(MODULE_NAME, px4::wq_configurations::rate_ctrl) - // _differential_drive_control(this) { updateParams(); } @@ -64,13 +61,7 @@ void AckermannDrive::Run() exit_and_cleanup(); } - if (_param_ca_airframe.get() == DIFFERENTIAL_DRIVE) { - // _differential_drive_control.Update(); - return; - - } else if (_param_ca_airframe.get() == ACKERMANN_DRIVE) { - _ackermann_drive_control.Update(); - } + _ackermann_drive_control.Update(); } int AckermannDrive::task_spawn(int argc, char *argv[]) @@ -123,5 +114,3 @@ extern "C" __EXPORT int ackermann_drive_main(int argc, char *argv[]) { return AckermannDrive::main(argc, argv); } - -// } // namespace rover_control diff --git a/src/modules/ackermann_drive/AckermannDrive.hpp b/src/modules/ackermann_drive/AckermannDrive.hpp index 0d807f021f..c82fcc9351 100644 --- a/src/modules/ackermann_drive/AckermannDrive.hpp +++ b/src/modules/ackermann_drive/AckermannDrive.hpp @@ -57,16 +57,8 @@ #include // Local includes -// #include -// #include "DifferentialDriveControl.hpp" #include "AckermannDriveControl/AckermannDriveControl.hpp" -#define DIFFERENTIAL_DRIVE 6 -#define ACKERMANN_DRIVE 5 - -// namespace rover_control -// { - class AckermannDrive : public ModuleBase, public ModuleParams, public px4::ScheduledWorkItem { @@ -91,13 +83,9 @@ protected: private: void Run() override; - // differential_drive_control::DifferentialDriveControl _differential_drive_control{this}; differential_drive_control::AckermannDriveControl _ackermann_drive_control{this}; - DEFINE_PARAMETERS( (ParamInt) _param_ca_airframe ) }; - -// } // namespace rover_control diff --git a/src/modules/ackermann_drive/module.yaml b/src/modules/ackermann_drive/module.yaml index 77bd61dda4..423bedbd35 100644 --- a/src/modules/ackermann_drive/module.yaml +++ b/src/modules/ackermann_drive/module.yaml @@ -1,7 +1,7 @@ -module_name: Differential Drive Control +module_name: Ackermann Drive Control parameters: - - group: Rover Differential Drive + - group: Rover Ackermann Drive definitions: RDD_WHEEL_BASE: description: