#pragma once #include #include namespace custom { /** * @brief Robot motion gait types */ enum class Gait : int { IDLE = 0, // Standing still TROT = 1, // Normal walking TROT_RUNNING = 2 // Fast running }; // Network settings constexpr std::string_view NETWORK_INTERFACE = "eth0"; // MQTT settings constexpr std::string_view MQTT_BROKER = "120.24.241.164"; constexpr int MQTT_PORT = 1883; constexpr std::string_view MQTT_CLIENT_ID = "unitree_go2_client"; constexpr std::string_view MQTT_USERNAME = "lzwc"; constexpr std::string_view MQTT_PASSWORD = "Lzwc@4187."; // MQTT Topics constexpr const char* TOPIC_PREFIX = "unitree/go2"; constexpr const char* TOPIC_CMD = "cmd"; // Safety settings constexpr double MAX_LINEAR_VELOCITY = 1.5; // m/s constexpr double MAX_ANGULAR_VELOCITY = 2.0; // rad/s constexpr double EMERGENCY_STOP_TIMEOUT = 5.0; // seconds // Motion settings constexpr double STAND_HEIGHT = 0.0; // relative height constexpr Gait DEFAULT_GAIT = Gait::IDLE; class CustomConfig { public: std::string network_interface; std::string mqtt_broker; int mqtt_port; std::string mqtt_username; std::string mqtt_password; std::string mqtt_client_id; std::string topic_prefix; std::string topic_cmd; std::string topic_state; double control_frequency; double max_linear_velocity; double max_angular_velocity; double emergency_stop_timeout; double stand_height; int default_gait; void loadDefaults(); }; } // namespace custom