feat: 初始化 Go2 导航相关代码与配置

This commit is contained in:
2026-10-15 09:40:29 +08:00
commit 07426fcc09
1282 changed files with 331220 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
#ifndef __UT_JSON_HPP__
#define __UT_JSON_HPP__
#include <unitree/common/any.hpp>
namespace unitree
{
namespace common
{
typedef std::map<std::string,Any> JsonMap;
typedef std::vector<Any> JsonArray;
Any FromJsonString(const std::string& s);
std::string ToJsonString(const Any& a, bool pretty = false);
static inline bool IsNull(const Any& a)
{
return a.Empty();
}
static inline bool IsJsonArray(const Any& a)
{
return a.GetTypeInfo() == typeid(JsonArray);
}
static inline bool IsJsonMap(const Any& a)
{
return a.GetTypeInfo() == typeid(JsonMap);
}
static inline bool IsJsonObject(const Any& a)
{
return IsJsonMap(a);
}
}
}
#endif//__UT_JSON_HPP__