Files
lzwc-terminal-unitreeGo2/include/navigation.hpp

34 lines
851 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:
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:
std::unique_ptr<unitree::robot::Client> client_;
bool callSlamService(int api_id, const nlohmann::json& data);
};
} // namespace custom
#endif // NAVIGATION_HPP