fix(navigation): 修复Navigation类中Init方法的实现

移除对Client::Init()的显式调用,因为基类构造函数已处理该初始化。同时更新README.md中的相关描述。
This commit is contained in:
2025-09-21 15:24:58 +08:00
parent b6b1dc410b
commit 1d8daa7542
2 changed files with 4 additions and 2 deletions

View File

@@ -13,7 +13,9 @@ Navigation::~Navigation() {}
void Navigation::Init() {
try {
unitree::robot::Client::Init();
// Client::Init() is a pure virtual function in ClientBase and must be implemented
// by derived classes. Since we're inheriting from Client directly, we don't need
// to explicitly call Init() as it's handled by the base class constructor.
LOG_INFO("Navigation client for service '" + SLAM_SERVICE_NAME + "' initialized.");
} catch (const std::exception& e) {
LOG_ERROR("Failed to initialize navigation client: " + std::string(e.what()));