Add RSC command processing to CustomRobot class. Introduced processRscCmd method for handling service list queries and service switching commands, enhancing functionality. Added printServiceList method for improved service status reporting. Removed unused publishCmdResponse method to streamline code.

This commit is contained in:
2025-09-09 14:25:32 +08:00
parent 54a9f9b544
commit 67b1a7fe80
2 changed files with 84 additions and 25 deletions

View File

@@ -36,7 +36,8 @@ public:
void processCmd(const nlohmann::json& message);
bool processOacCmd(const std::string& cmd, const nlohmann::json& message);
bool processSportCmd(const std::string& cmd, const nlohmann::json& message);
void publishCmdResponse(const std::string& type, const std::string& cmd, bool success);
bool processRscCmd(const std::string& cmd, const nlohmann::json& message);
void printServiceList(const std::vector<unitree::robot::go2::ServiceState>& serviceList, int filterStatus = -1);
private:
std::string generateRandomClientId() const;