Files
lzwc-terminal-unitreeGo2/include/navigation.hpp
Sucan126 1a9fc5f7e1 refactor(navigation): 重构Navigation类继承unitree::robot::Client
移除不必要的client_成员变量,直接继承unitree::robot::Client类
简化初始化逻辑,更新相关文档说明
2025-09-21 15:15:09 +08:00

33 lines
830 B
C++

#ifndef NAVIGATION_HPP
#define NAVIGATION_HPP
#include <string>
#include <memory>
#include <nlohmann/json.hpp>
#include "unitree/robot/client/client.hpp"
namespace custom {
class Navigation : public unitree::robot::Client {
public:
Navigation();
~Navigation();
void Init();
bool startMapping();
bool endMapping(const std::string& address);
bool initializePose(double x, double y, double z, double q_x, double q_y, double q_z, double q_w, const std::string& address);
bool poseNavigation(double x, double y, double z, double q_x, double q_y, double q_z, double q_w, int mode, double speed);
bool pauseNavigation();
bool resumeNavigation();
bool closeSlam();
private:
bool callSlamService(int api_id, const nlohmann::json& data);
};
} // namespace custom
#endif // NAVIGATION_HPP