diff --git a/src/Config.hpp b/src/Config.hpp deleted file mode 100644 index d1d2f15..0000000 --- a/src/Config.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// -// Created by pengx on 2025/6/10. -// - -#ifndef CONFIG_HPP -#define CONFIG_HPP - -namespace Config { - /** - * 远程服务器IP - */ - // constexpr const char *REMOTE_SERVICE_IP = "111.198.10.15"; - constexpr const char *REMOTE_SERVICE_IP = "192.168.123.18"; - - /** - * 远程TCP服务端口 - */ - // constexpr int TCP_SERVICE_REMOTE_PORT = 30029; - constexpr int TCP_SERVICE_REMOTE_PORT = 9001; - - /** - * 本地TCP服务端口 - */ - constexpr int TCP_SERVICE_LOCALE_PORT = 8888; - - /** - * 甲烷模块串口号 - */ - constexpr const char *GAS_PORT = "/dev/ttyUSB0"; - /** - * 串口波特率 - */ - constexpr int BAUD_RATE = 115200; - - /** - * HTTP请求API - */ - constexpr const char *API_RECEIVE_DATA = "/device/receiveData"; - constexpr const char *API_UPLOAD_PCD_FILE = "/device/receiveFile"; - /** - * HTTP请求网络端口 - */ - constexpr const char *HTTP_PORT = "30028"; - - /** - * 机器狗设备编码 - */ - constexpr const char *DOG_CODE = "B42D4000OCAD3N82"; - - /** - * SLAM网络端口 - */ - constexpr const char *SLAM_NET_PORT = "eth0"; - - /** - * 机械臂模块端口 - */ - constexpr const char *ROBOTIC_ARM_PORT = "/dev/ttyACM0"; - - /** - * 机械臂命令配置文件 - */ - constexpr const char *ROBOTIC_ARM_COMMAND_CONFIG = "/home/unitree/Desktop/robotic_arm_commands.conf"; - - /** - * SLAM建图文件 - */ - constexpr const char *SLAM_PCD_FILE = "/unitree/module/graph_pid_ws/config_files/lio_sam_config/maps/pcd/default/GlobalMap.pcd"; -} - -#endif //CONFIG_HPP diff --git a/src/Config.hpp b/src/Config.hpp deleted file mode 100644 index d1d2f15..0000000 --- a/src/Config.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// -// Created by pengx on 2025/6/10. -// - -#ifndef CONFIG_HPP -#define CONFIG_HPP - -namespace Config { - /** - * 远程服务器IP - */ - // constexpr const char *REMOTE_SERVICE_IP = "111.198.10.15"; - constexpr const char *REMOTE_SERVICE_IP = "192.168.123.18"; - - /** - * 远程TCP服务端口 - */ - // constexpr int TCP_SERVICE_REMOTE_PORT = 30029; - constexpr int TCP_SERVICE_REMOTE_PORT = 9001; - - /** - * 本地TCP服务端口 - */ - constexpr int TCP_SERVICE_LOCALE_PORT = 8888; - - /** - * 甲烷模块串口号 - */ - constexpr const char *GAS_PORT = "/dev/ttyUSB0"; - /** - * 串口波特率 - */ - constexpr int BAUD_RATE = 115200; - - /** - * HTTP请求API - */ - constexpr const char *API_RECEIVE_DATA = "/device/receiveData"; - constexpr const char *API_UPLOAD_PCD_FILE = "/device/receiveFile"; - /** - * HTTP请求网络端口 - */ - constexpr const char *HTTP_PORT = "30028"; - - /** - * 机器狗设备编码 - */ - constexpr const char *DOG_CODE = "B42D4000OCAD3N82"; - - /** - * SLAM网络端口 - */ - constexpr const char *SLAM_NET_PORT = "eth0"; - - /** - * 机械臂模块端口 - */ - constexpr const char *ROBOTIC_ARM_PORT = "/dev/ttyACM0"; - - /** - * 机械臂命令配置文件 - */ - constexpr const char *ROBOTIC_ARM_COMMAND_CONFIG = "/home/unitree/Desktop/robotic_arm_commands.conf"; - - /** - * SLAM建图文件 - */ - constexpr const char *SLAM_PCD_FILE = "/unitree/module/graph_pid_ws/config_files/lio_sam_config/maps/pcd/default/GlobalMap.pcd"; -} - -#endif //CONFIG_HPP diff --git a/src/config.hpp b/src/config.hpp new file mode 100644 index 0000000..d1d2f15 --- /dev/null +++ b/src/config.hpp @@ -0,0 +1,71 @@ +// +// Created by pengx on 2025/6/10. +// + +#ifndef CONFIG_HPP +#define CONFIG_HPP + +namespace Config { + /** + * 远程服务器IP + */ + // constexpr const char *REMOTE_SERVICE_IP = "111.198.10.15"; + constexpr const char *REMOTE_SERVICE_IP = "192.168.123.18"; + + /** + * 远程TCP服务端口 + */ + // constexpr int TCP_SERVICE_REMOTE_PORT = 30029; + constexpr int TCP_SERVICE_REMOTE_PORT = 9001; + + /** + * 本地TCP服务端口 + */ + constexpr int TCP_SERVICE_LOCALE_PORT = 8888; + + /** + * 甲烷模块串口号 + */ + constexpr const char *GAS_PORT = "/dev/ttyUSB0"; + /** + * 串口波特率 + */ + constexpr int BAUD_RATE = 115200; + + /** + * HTTP请求API + */ + constexpr const char *API_RECEIVE_DATA = "/device/receiveData"; + constexpr const char *API_UPLOAD_PCD_FILE = "/device/receiveFile"; + /** + * HTTP请求网络端口 + */ + constexpr const char *HTTP_PORT = "30028"; + + /** + * 机器狗设备编码 + */ + constexpr const char *DOG_CODE = "B42D4000OCAD3N82"; + + /** + * SLAM网络端口 + */ + constexpr const char *SLAM_NET_PORT = "eth0"; + + /** + * 机械臂模块端口 + */ + constexpr const char *ROBOTIC_ARM_PORT = "/dev/ttyACM0"; + + /** + * 机械臂命令配置文件 + */ + constexpr const char *ROBOTIC_ARM_COMMAND_CONFIG = "/home/unitree/Desktop/robotic_arm_commands.conf"; + + /** + * SLAM建图文件 + */ + constexpr const char *SLAM_PCD_FILE = "/unitree/module/graph_pid_ws/config_files/lio_sam_config/maps/pcd/default/GlobalMap.pcd"; +} + +#endif //CONFIG_HPP diff --git a/src/Config.hpp b/src/Config.hpp deleted file mode 100644 index d1d2f15..0000000 --- a/src/Config.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// -// Created by pengx on 2025/6/10. -// - -#ifndef CONFIG_HPP -#define CONFIG_HPP - -namespace Config { - /** - * 远程服务器IP - */ - // constexpr const char *REMOTE_SERVICE_IP = "111.198.10.15"; - constexpr const char *REMOTE_SERVICE_IP = "192.168.123.18"; - - /** - * 远程TCP服务端口 - */ - // constexpr int TCP_SERVICE_REMOTE_PORT = 30029; - constexpr int TCP_SERVICE_REMOTE_PORT = 9001; - - /** - * 本地TCP服务端口 - */ - constexpr int TCP_SERVICE_LOCALE_PORT = 8888; - - /** - * 甲烷模块串口号 - */ - constexpr const char *GAS_PORT = "/dev/ttyUSB0"; - /** - * 串口波特率 - */ - constexpr int BAUD_RATE = 115200; - - /** - * HTTP请求API - */ - constexpr const char *API_RECEIVE_DATA = "/device/receiveData"; - constexpr const char *API_UPLOAD_PCD_FILE = "/device/receiveFile"; - /** - * HTTP请求网络端口 - */ - constexpr const char *HTTP_PORT = "30028"; - - /** - * 机器狗设备编码 - */ - constexpr const char *DOG_CODE = "B42D4000OCAD3N82"; - - /** - * SLAM网络端口 - */ - constexpr const char *SLAM_NET_PORT = "eth0"; - - /** - * 机械臂模块端口 - */ - constexpr const char *ROBOTIC_ARM_PORT = "/dev/ttyACM0"; - - /** - * 机械臂命令配置文件 - */ - constexpr const char *ROBOTIC_ARM_COMMAND_CONFIG = "/home/unitree/Desktop/robotic_arm_commands.conf"; - - /** - * SLAM建图文件 - */ - constexpr const char *SLAM_PCD_FILE = "/unitree/module/graph_pid_ws/config_files/lio_sam_config/maps/pcd/default/GlobalMap.pcd"; -} - -#endif //CONFIG_HPP diff --git a/src/config.hpp b/src/config.hpp new file mode 100644 index 0000000..d1d2f15 --- /dev/null +++ b/src/config.hpp @@ -0,0 +1,71 @@ +// +// Created by pengx on 2025/6/10. +// + +#ifndef CONFIG_HPP +#define CONFIG_HPP + +namespace Config { + /** + * 远程服务器IP + */ + // constexpr const char *REMOTE_SERVICE_IP = "111.198.10.15"; + constexpr const char *REMOTE_SERVICE_IP = "192.168.123.18"; + + /** + * 远程TCP服务端口 + */ + // constexpr int TCP_SERVICE_REMOTE_PORT = 30029; + constexpr int TCP_SERVICE_REMOTE_PORT = 9001; + + /** + * 本地TCP服务端口 + */ + constexpr int TCP_SERVICE_LOCALE_PORT = 8888; + + /** + * 甲烷模块串口号 + */ + constexpr const char *GAS_PORT = "/dev/ttyUSB0"; + /** + * 串口波特率 + */ + constexpr int BAUD_RATE = 115200; + + /** + * HTTP请求API + */ + constexpr const char *API_RECEIVE_DATA = "/device/receiveData"; + constexpr const char *API_UPLOAD_PCD_FILE = "/device/receiveFile"; + /** + * HTTP请求网络端口 + */ + constexpr const char *HTTP_PORT = "30028"; + + /** + * 机器狗设备编码 + */ + constexpr const char *DOG_CODE = "B42D4000OCAD3N82"; + + /** + * SLAM网络端口 + */ + constexpr const char *SLAM_NET_PORT = "eth0"; + + /** + * 机械臂模块端口 + */ + constexpr const char *ROBOTIC_ARM_PORT = "/dev/ttyACM0"; + + /** + * 机械臂命令配置文件 + */ + constexpr const char *ROBOTIC_ARM_COMMAND_CONFIG = "/home/unitree/Desktop/robotic_arm_commands.conf"; + + /** + * SLAM建图文件 + */ + constexpr const char *SLAM_PCD_FILE = "/unitree/module/graph_pid_ws/config_files/lio_sam_config/maps/pcd/default/GlobalMap.pcd"; +} + +#endif //CONFIG_HPP diff --git a/src/slam_wrapper.cpp b/src/slam_wrapper.cpp index 0a46d7b..9e906e0 100644 --- a/src/slam_wrapper.cpp +++ b/src/slam_wrapper.cpp @@ -196,9 +196,6 @@ const std::vector right_command = { 0XFE, 0XFE, 0X0F, 0X3C, 0X0A, 0X98, 0X07, 0X6F, 0X06, 0X91, 0X07, 0XCD, 0X0A, 0X93, 0X08, 0X56, 0X14, 0XFA }; - const std::vector default_command = { - 0xFE, 0xFE, 0x0F, 0x3C, 0x07, 0xF7, 0x08, 0x18, 0x08, 0x0B, 0x08, 0x4B, 0x0A, 0x7D, 0x08, 0x0A, 0x14, 0xFA - }; std::cout << "control_robotic_arm start" << std::endl; serial_port_->write(left_command);