diff --git a/README.md b/README.md index 16fe266..4120705 100644 --- a/README.md +++ b/README.md @@ -438,7 +438,7 @@ unitree-go2/ │ ├── logger.cpp # Logging system implementation │ ├── main.cpp # Entry point │ ├── mqtt.cpp # MQTT client implementation -│ └── navigation.cpp # Navigation and SLAM implementation (inherits from unitree::robot::Client) +│ └── navigation.cpp # Navigation and SLAM implementation (inherits from unitree::robot::Client, with fixed Init method implementation) ├── scripts/ # Utility scripts │ ├── install_deps.sh # Install dependencies │ └── run_robot.sh # Run with optimal settings diff --git a/src/navigation.cpp b/src/navigation.cpp index ea57524..f2ca482 100644 --- a/src/navigation.cpp +++ b/src/navigation.cpp @@ -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()));