server_monitor.cpp 559 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <sys/types.h>
  4. #include <sys/socket.h>
  5. #include <netinet/in.h>
  6. #include <arpa/inet.h>
  7. #include <unistd.h>
  8. #include <fcntl.h>
  9. #include <vector>
  10. #include "pose2d.h"
  11. #include <thread>
  12. #include <mutex>
  13. #include <math.h>
  14. #include "RobotMonitorNode.h"
  15. int main(int argc, char* argv[])
  16. {
  17. //server.SetRecvCallback(recv_func);
  18. // server.Bind(34000);
  19. RobotMonitorNode node("robot1","AgvStatu/robot1","AgvCmd/cmd1");
  20. node.Connect("192.168.2.132",1883);
  21. for (;;){
  22. usleep(1000*50);
  23. }
  24. return 0;
  25. }