This commit is contained in:
chfriedrich98 2024-03-22 16:34:03 +01:00
parent 1f332d561e
commit 1ae520b764
3 changed files with 3 additions and 26 deletions

View File

@ -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

View File

@ -57,16 +57,8 @@
#include <math.h>
// Local includes
// #include <DifferentialDriveKinematics.hpp>
// #include "DifferentialDriveControl.hpp"
#include "AckermannDriveControl/AckermannDriveControl.hpp"
#define DIFFERENTIAL_DRIVE 6
#define ACKERMANN_DRIVE 5
// namespace rover_control
// {
class AckermannDrive : public ModuleBase<AckermannDrive>, 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<px4::params::CA_AIRFRAME>) _param_ca_airframe
)
};
// } // namespace rover_control

View File

@ -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: