Projektarbeit Line Following Robot bei Prof. Chowanetz im WS22/23
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

control_module.h 733B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <mutex>
  3. #include <vector>
  4. #include <iostream>
  5. class ControlModule
  6. {
  7. private:
  8. mutable std::mutex mtx;
  9. double motors[4]; //LeftFront; RightFront; LeftBack; RightBack
  10. double maxSpeed;
  11. double rotateSpeed;
  12. double moveSideSpeed;
  13. public:
  14. ControlModule(/* args */);
  15. ControlModule(double maxSpeed, double rotateSpeed, double moveSideSpeed);
  16. ~ControlModule();
  17. void adjustSpeed();
  18. void moveSide(int imageColumsMiddle, int contourColumsMiddle);
  19. void rotate(double angle);
  20. void unit(); //Brings the max Value to 1.0
  21. void calcSpeeds(int imageColumsMiddle, int contourColumsMiddle, double angle); //Funktion to be called
  22. std::vector<double> readMotors();
  23. };