30 lines
808 B
C++
30 lines
808 B
C++
#ifndef NAVIGATION_HPP
|
|
#define NAVIGATION_HPP
|
|
|
|
#include <string>
|
|
#include <memory>
|
|
#include <nlohmann/json.hpp>
|
|
#include "unitree/robot/client/client.hpp"
|
|
|
|
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);
|
|
};
|
|
|
|
#endif // NAVIGATION_HPP
|