Update MQTT configuration in config.hpp. Changed broker address to a specific IP and added username and password for authentication. Removed commented-out sections for clarity.
This commit is contained in:
@@ -19,11 +19,11 @@ enum class Gait : int {
|
|||||||
constexpr std::string_view NETWORK_INTERFACE = "eth0";
|
constexpr std::string_view NETWORK_INTERFACE = "eth0";
|
||||||
|
|
||||||
// MQTT settings
|
// MQTT settings
|
||||||
constexpr std::string_view MQTT_BROKER = "localhost";
|
constexpr std::string_view MQTT_BROKER = "192.168.2.236";
|
||||||
constexpr int MQTT_PORT = 1883;
|
constexpr int MQTT_PORT = 1883;
|
||||||
constexpr std::string_view MQTT_CLIENT_ID = "unitree_go2_client";
|
constexpr std::string_view MQTT_CLIENT_ID = "unitree_go2_client";
|
||||||
constexpr std::string_view MQTT_USERNAME = "";
|
constexpr std::string_view MQTT_USERNAME = "lzwc";
|
||||||
constexpr std::string_view MQTT_PASSWORD = "";
|
constexpr std::string_view MQTT_PASSWORD = "Lzwc@4187.";
|
||||||
|
|
||||||
// Topic settings
|
// Topic settings
|
||||||
constexpr std::string_view TOPIC_PREFIX = "unitree/go2";
|
constexpr std::string_view TOPIC_PREFIX = "unitree/go2";
|
||||||
@@ -46,7 +46,6 @@ constexpr Gait DEFAULT_GAIT = Gait::IDLE;
|
|||||||
|
|
||||||
class CustomConfig {
|
class CustomConfig {
|
||||||
public:
|
public:
|
||||||
// 网络和MQTT连接
|
|
||||||
std::string network_interface;
|
std::string network_interface;
|
||||||
std::string mqtt_broker;
|
std::string mqtt_broker;
|
||||||
int mqtt_port;
|
int mqtt_port;
|
||||||
@@ -54,12 +53,10 @@ public:
|
|||||||
std::string mqtt_password;
|
std::string mqtt_password;
|
||||||
std::string mqtt_client_id;
|
std::string mqtt_client_id;
|
||||||
|
|
||||||
// MQTT话题
|
|
||||||
std::string topic_prefix;
|
std::string topic_prefix;
|
||||||
std::string topic_cmd;
|
std::string topic_cmd;
|
||||||
std::string topic_state;
|
std::string topic_state;
|
||||||
|
|
||||||
// 机器人控制和安全
|
|
||||||
double control_frequency;
|
double control_frequency;
|
||||||
double state_publish_frequency;
|
double state_publish_frequency;
|
||||||
double max_linear_velocity;
|
double max_linear_velocity;
|
||||||
@@ -68,7 +65,6 @@ public:
|
|||||||
double stand_height;
|
double stand_height;
|
||||||
int default_gait;
|
int default_gait;
|
||||||
|
|
||||||
|
|
||||||
void loadDefaults();
|
void loadDefaults();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user