Add navigation functionality to CustomRobot and Controller classes. Introduced Navigation class for handling mapping and pose navigation commands. Updated CustomRobot to process navigation commands and manage Navigation instance. Enhanced Controller with motion switching capabilities, improving overall robot control and navigation features.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "config.hpp"
|
||||
#include "logger.hpp"
|
||||
#include "mqtt.hpp"
|
||||
#include "navigation.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <atomic>
|
||||
@@ -23,6 +24,7 @@ public:
|
||||
bool start();
|
||||
|
||||
Controller* getController() const { return controller_.get(); }
|
||||
Navigation* getNavigation() const { return navigation_.get(); }
|
||||
|
||||
bool GetServiceList(std::vector<unitree::robot::go2::ServiceState>& serviceList);
|
||||
bool SwitchService(const std::string& serviceName, bool enable);
|
||||
@@ -37,11 +39,13 @@ public:
|
||||
bool processOacCmd(const std::string& cmd, const nlohmann::json& message);
|
||||
bool processSportCmd(const std::string& cmd, const nlohmann::json& message);
|
||||
bool processRscCmd(const std::string& cmd, const nlohmann::json& message);
|
||||
bool processNavCmd(const std::string& cmd, const nlohmann::json& message);
|
||||
void printServiceList(const std::vector<unitree::robot::go2::ServiceState>& serviceList, int filterStatus = -1);
|
||||
|
||||
private:
|
||||
std::string generateRandomClientId() const;
|
||||
std::unique_ptr<Controller> controller_;
|
||||
std::unique_ptr<Navigation> navigation_;
|
||||
std::unique_ptr<unitree::robot::go2::RobotStateClient> rsc_;
|
||||
std::unique_ptr<MqttClient> mqttClient_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user