monitor_emqx.h 806 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // Created by zx on 23-3-14.
  3. //
  4. #ifndef NAVIGATION_MPC_MONITOR_MONITOR_EMQX_H_
  5. #define NAVIGATION_MPC_MONITOR_MONITOR_EMQX_H_
  6. #include <mutex>
  7. #include "terminator_emqx.h"
  8. class Monitor_emqx : public Terminator_emqx
  9. {
  10. public:
  11. enum MoveMode{
  12. eSingle=1,
  13. eMain
  14. };
  15. enum SpeedType{
  16. eStop=0,
  17. eRotate=1,
  18. eHorizontal=2,
  19. eMPC=3,
  20. };
  21. public:
  22. Monitor_emqx(std::string nodeId);
  23. ~Monitor_emqx();
  24. void set_speedcmd_topic(std::string speedcmd);
  25. void set_speed(MoveMode mode,SpeedType type,double v,double a);
  26. void set_speed(MoveMode mode,SpeedType type,double v,double a,double L);
  27. void stop();
  28. protected:
  29. std::string speedcmd_topic_;
  30. public:
  31. int heat_=0;
  32. };
  33. #endif //NAVIGATION_MPC_MONITOR_MONITOR_EMQX_H_