初始化项目,包含fast_lio_ws和unitree_sdk2

This commit is contained in:
2026-10-12 15:01:52 +08:00
commit 8e16ecceba
1490 changed files with 232338 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__