#include <spdlog/cfg/env.h>
#include <chrono>
#include <iostream>
#include <thread>
#include "drone/PioneerDrone.hpp"
int main() {
using namespace std::chrono_literals;
using namespace std;
spdlog::cfg::load_env_levels();
cout << "Setting surge for 1s" << endl;
drone.
set_force({.surge = 5, .sway = 0, .heave = 0, .yaw = 0});
this_thread::sleep_for(1s);
this_thread::sleep_for(1s);
cout << "Setting sway for 1s" << endl;
drone.
set_force({.surge = 0, .sway = 5, .heave = 0, .yaw = 0});
this_thread::sleep_for(1s);
this_thread::sleep_for(1s);
cout << "Setting heave for 1s" << endl;
drone.
set_force({.surge = 0, .sway = 0, .heave = 5, .yaw = 0});
this_thread::sleep_for(1s);
this_thread::sleep_for(1s);
cout << "Setting yaw for 1s" << endl;
drone.
set_force({.surge = 0, .sway = 0, .heave = 0, .yaw = 5});
this_thread::sleep_for(1s);
this_thread::sleep_for(100ms);
}
Class representing a drone.
Definition PioneerDrone.hpp:31
virtual void set_force(thrust_allocation::ControlForce force)
Apply a force on the drone.