diff --git a/include/unitree/common/json/jsonize.hpp b/include/unitree/common/json/jsonize.hpp index 4bdacaf..901a699 100644 --- a/include/unitree/common/json/jsonize.hpp +++ b/include/unitree/common/json/jsonize.hpp @@ -2,13 +2,13 @@ #define __UT_JSONIZE_HPP__ #define JN_FROM_WEAK(m, name, value) \ - if (m.find(name) != m.end()) { value = m[name]; } + if (m.find(name) != m.end()){ JN_FROM(m, name, value); } #define JN_FROM(m, name, value) \ - value = m[name] + unitree::common::FromJson(m[name], value) #define JN_TO(m, name, value) \ - m[name] = value + unitree::common::ToJson(value, m[name]) #include diff --git a/include/unitree/common/log/log_buffer.hpp b/include/unitree/common/log/log_buffer.hpp index f0a6676..e482281 100644 --- a/include/unitree/common/log/log_buffer.hpp +++ b/include/unitree/common/log/log_buffer.hpp @@ -10,49 +10,30 @@ namespace common class LogBuffer { public: - LogBuffer(); + explicit LogBuffer(); + virtual ~LogBuffer(); bool Append(const std::string& s); - - const std::string& Get(); - void Get(std::string& s); - - void Clear(); - + bool Get(std::string& s); bool Empty(); -private: +protected: std::string mData; }; typedef std::shared_ptr LogBufferPtr; -class LogBlockBuffer +class LogBlockBuffer : public LogBuffer { public: - typedef std::shared_ptr LOG_BUFFER_PTR; - - LogBlockBuffer(); + explicit LogBlockBuffer(); ~LogBlockBuffer(); bool Append(const std::string& s); - - /* - * Get reference of data. [UNSAFE] - */ - const std::string& Get(); - void Get(std::string& s); - - /* - * Clear data. - */ - void Clear(bool lock = false); - - void Exchange(); + bool Get(std::string& s); + bool Empty(); private: - volatile bool mR; - std::vector mChain; Mutex mLock; }; diff --git a/include/unitree/common/log/log_decl.hpp b/include/unitree/common/log/log_decl.hpp index 875a93d..f3f44f3 100644 --- a/include/unitree/common/log/log_decl.hpp +++ b/include/unitree/common/log/log_decl.hpp @@ -11,8 +11,9 @@ /* * log buffer size */ -#define UT_LOG_BUFFER_SIZE 65535 //64K -#define UT_LOG_MAX_BUFFER_SIZE 8388608 //8M +#define UT_LOG_BUFFER_SIZE 65535 //64K-1 +#define UT_LOG_CRT_BUFFER_SIZE 64512 //63K +#define UT_LOG_MAX_BUFFER_SIZE 4194303 //4M-1 /* * log file size */ @@ -20,11 +21,19 @@ #define UT_LOG_MAX_FILE_SIZE 10737418240 //10G #define UT_LOG_MIN_FILE_SIZE UT_LOG_MAX_BUFFER_SIZE +/* + * log write interval(micro second) + */ +#define UT_LOG_WRITE_INTER 100000 //100ms +#define UT_LOG_MAX_WRITE_INTER 1000000 //1s +#define UT_LOG_MIN_WRITE_INTER 2000 //2ms + /* * log file number */ -#define UT_LOG_FILE_NUMBER 10 -#define UT_LOG_MAX_FILE_NUMBER 1000 +#define UT_LOG_FILE_NUMBER 2 +#define UT_LOG_MAX_FILE_NUMBER 100 +#define UT_LOG_MIN_FILE_NUMBER UT_LOG_FILE_NUMBER #define UT_LOG_FILE_EXT ".LOG" @@ -157,6 +166,8 @@ #define UT_LOG_STORE_STDERR 3 #define UT_LOG_STORE_DESC_FILE_ASYNC "FILEASYNC" +#define UT_LOG_STORE_DESC_ASYNC_FILE "ASYNCFILE" +#define UT_LOG_STORE_DESC_ASYNC "ASYNC" #define UT_LOG_STORE_DESC_FILE "FILE" #define UT_LOG_STORE_DESC_STDOUT "STDOUT" #define UT_LOG_STORE_DESC_STDERR "STDERR" @@ -214,7 +225,9 @@ static inline const char* GetLogLevelDesc(int32_t level) static inline int32_t GetLogStoreType(const std::string& desc) { - if (desc == UT_LOG_STORE_DESC_FILE_ASYNC) { + if (desc == UT_LOG_STORE_DESC_FILE_ASYNC || + desc == UT_LOG_STORE_DESC_ASYNC_FILE || + desc == UT_LOG_STORE_DESC_ASYNC) { return UT_LOG_STORE_FILE_ASYNC; } else if (desc == UT_LOG_STORE_DESC_FILE) { return UT_LOG_STORE_FILE; } diff --git a/include/unitree/common/log/log_initor.hpp b/include/unitree/common/log/log_initor.hpp index 55014d3..b353692 100644 --- a/include/unitree/common/log/log_initor.hpp +++ b/include/unitree/common/log/log_initor.hpp @@ -12,32 +12,28 @@ namespace common class LogInitor { public: - static LogInitor* Instance() - { - static LogInitor inst; - return &inst; - } + explicit LogInitor(); + ~LogInitor(); - void Init(const std::string& configFileName); + void Init(const std::string& configFileName, bool stdoutDefault = false); Logger* GetLogger(const std::string& tag); void Final(); -private: - LogInitor(); void ParseConf(Any json); + void SetStdoutPolicy(); void InitLogger(); private: - bool mInited; std::set mStoreNames; std::vector mPolicis; std::vector mStorePolicis; std::map mLoggerMap; - Mutex mLock; }; -void LogInit(const std::string& configFileName = ""); +using LogInitorPtr = std::shared_ptr; + +void LogInit(const std::string& configFileName = "", bool stdoutDefault = false); void LogFinal(); Logger* GetLogger(const std::string& tag); diff --git a/include/unitree/common/log/log_keeper.hpp b/include/unitree/common/log/log_keeper.hpp index 11481a2..d5f91ae 100644 --- a/include/unitree/common/log/log_keeper.hpp +++ b/include/unitree/common/log/log_keeper.hpp @@ -2,7 +2,6 @@ #define __UT_LOG_FILE_KEEPER_H__ #include -#include namespace unitree { @@ -11,41 +10,30 @@ namespace common class LogKeeper { public: - enum - { - ROLLING_WAIT_MICROSEC = 1000000 - }; - LogKeeper(LogStorePolicyPtr storePolicyPtr); ~LogKeeper(); - void SetWriter(LogWriterPtr writerPtr); - void AppendDataSize(int64_t len); + LogStorePolicyPtr GetStorePolicy() const; + + bool Append(const std::string& s, bool rotate); private: - void Rolling(); + void Rotate(); + void AppendFile(const std::string& s); void OpenFile(); void CloseFile(); - bool CheckFile(); - - void ThreadRolling(); - bool IsNeedToRolling(int64_t len); - void CheckRolling(); + void CheckFileSize(); std::string MakeRegexExpress(); private: - bool mQuit; - int64_t mFileSize; + volatile int64_t mFileSize; std::string mFileName; std::string mDirectory; FilePtr mFilePtr; LogStorePolicyPtr mStorePolicyPtr; - LogWriterPtr mWriterPtr; - ThreadPtr mThreadPtr; - MutexCond mMutexCond; }; typedef std::shared_ptr LogKeeperPtr; diff --git a/include/unitree/common/log/log_policy.hpp b/include/unitree/common/log/log_policy.hpp index 34538c3..505b1c2 100644 --- a/include/unitree/common/log/log_policy.hpp +++ b/include/unitree/common/log/log_policy.hpp @@ -27,7 +27,8 @@ class LogStorePolicy { public: LogStorePolicy(); - LogStorePolicy(const std::string& name, int32_t type, int32_t fileNumber, int64_t fileSize, int32_t cpuId = UT_CPU_ID_NONE, + LogStorePolicy(const std::string& name, int32_t type, int32_t fileNumber, int64_t fileSize, + int64_t fileWriteInter = UT_LOG_WRITE_INTER, int32_t cpuId = UT_CPU_ID_NONE, const std::string& fileName = "", const std::string& directory = ""); void Dump(); @@ -37,6 +38,7 @@ class LogStorePolicy int32_t mType; int32_t mFileNumber; int64_t mFileSize; + int64_t mFileWriteInter; int32_t mCpuId; std::string mFileName; std::string mDirectory; diff --git a/include/unitree/common/log/log_store.hpp b/include/unitree/common/log/log_store.hpp index a002aa5..eba6a8e 100644 --- a/include/unitree/common/log/log_store.hpp +++ b/include/unitree/common/log/log_store.hpp @@ -11,7 +11,17 @@ namespace common class LogStore { public: + explicit LogStore() + {} + virtual ~LogStore() + { + mWriterPtr.reset(); + } + virtual void Append(const std::string& s) = 0; + +protected: + LogWriterPtr mWriterPtr; }; typedef std::shared_ptr LogStorePtr; @@ -19,12 +29,10 @@ typedef std::shared_ptr LogStorePtr; class LogStdoutStore : public LogStore { public: - LogStdoutStore(); + explicit LogStdoutStore(); + ~LogStdoutStore(); void Append(const std::string& s); - -protected: - LogWriterPtr mWriterPtr; }; typedef std::shared_ptr LogStdoutStorePtr; @@ -32,12 +40,10 @@ typedef std::shared_ptr LogStdoutStorePtr; class LogStderrStore : public LogStore { public: - LogStderrStore(); + explicit LogStderrStore(); + ~LogStderrStore(); void Append(const std::string& s); - -protected: - LogWriterPtr mWriterPtr; }; typedef std::shared_ptr LogStderrStorePtr; @@ -45,13 +51,10 @@ typedef std::shared_ptr LogStderrStorePtr; class LogFileStore : public LogStore { public: - LogFileStore(LogKeeperPtr keeperPtr); + explicit LogFileStore(LogKeeperPtr keeperPtr); + ~LogFileStore(); void Append(const std::string& s); - -private: - LogKeeperPtr mKeeperPtr; - LogWriterPtr mWriterPtr; }; typedef std::shared_ptr LogFileStorePtr; @@ -59,18 +62,10 @@ typedef std::shared_ptr LogFileStorePtr; class LogFileAsyncStore : public LogStore { public: - enum - { - WRITE_INTERVAL = 100000, - }; - - LogFileAsyncStore(LogKeeperPtr keeperPtr); + explicit LogFileAsyncStore(LogKeeperPtr keeperPtr); + ~LogFileAsyncStore(); void Append(const std::string& s); - -private: - LogWriterPtr mWriterPtr; - LogKeeperPtr mKeeperPtr; }; typedef std::shared_ptr LogFileAsyncStorePtr; diff --git a/include/unitree/common/log/log_writer.hpp b/include/unitree/common/log/log_writer.hpp index 60e3d89..8b7edd3 100644 --- a/include/unitree/common/log/log_writer.hpp +++ b/include/unitree/common/log/log_writer.hpp @@ -2,6 +2,7 @@ #define __LOG_WRITER_HPP__ #include +#include namespace unitree { @@ -10,27 +11,7 @@ namespace common class LogWriter { public: - LogWriter() : - mFd(UT_FD_INVALID) - {} - - virtual ~LogWriter() - {} - - virtual void SetFd(int32_t fd) - { - mFd = fd; - } - - virtual int32_t GetFd() - { - return mFd; - } - virtual void Write(const std::string& s) = 0; - -protected: - int32_t mFd; }; typedef std::shared_ptr LogWriterPtr; @@ -38,25 +19,22 @@ typedef std::shared_ptr LogWriterPtr; class LogDirectWriter : public LogWriter { public: - LogDirectWriter(); - LogDirectWriter(int32_t fd); - + explicit LogDirectWriter(int32_t fd); virtual ~LogDirectWriter(); - void SetFd(int32_t fd); void Write(const std::string& s); -protected: +private: Mutex mLock; + int32_t mFd; }; class LogStdoutWriter : public LogDirectWriter { public: - LogStdoutWriter() : + explicit LogStdoutWriter() : LogDirectWriter(UT_FD_STDOUT) {} - ~LogStdoutWriter() {} }; @@ -64,10 +42,9 @@ class LogStdoutWriter : public LogDirectWriter class LogStderrWriter : public LogDirectWriter { public: - LogStderrWriter() : + explicit LogStderrWriter() : LogDirectWriter(UT_FD_STDERR) {} - ~LogStderrWriter() {} }; @@ -75,34 +52,33 @@ class LogStderrWriter : public LogDirectWriter class LogBufferWriter : public LogWriter { public: - explicit LogBufferWriter(uint64_t writeIntervalMicrosec = 100000); - + explicit LogBufferWriter(LogKeeperPtr keeperPtr); ~LogBufferWriter(); - void SetFd(int32_t fd); void Write(const std::string& s); private: LogBufferPtr mBufferPtr; + LogKeeperPtr mKeeperPtr; Mutex mLock; }; class LogAsyncBufferWriter : public LogWriter { public: - explicit LogAsyncBufferWriter(uint64_t writeIntervalMicrosec = 10000); - + explicit LogAsyncBufferWriter(LogKeeperPtr keeperPtr); ~LogAsyncBufferWriter(); - void SetFd(int32_t fd); void Write(const std::string& s); private: void DoWrite(); - bool WriteFD(const std::string& s); private: - LogBlockBufferPtr mBufferPtr; + volatile bool mRotate; + std::string mTempBuf; + LogBufferPtr mBufferPtr; + LogKeeperPtr mKeeperPtr; ThreadPtr mThreadPtr; Mutex mLock; }; diff --git a/include/unitree/idl/go2/AudioData_.hpp b/include/unitree/idl/go2/AudioData_.hpp index 3b7f836..2bd6d92 100644 --- a/include/unitree/idl/go2/AudioData_.hpp +++ b/include/unitree/idl/go2/AudioData_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_AUDIODATA__HPP -#define DDSCXX_AUDIODATA__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_AUDIODATA__HPP +#define DDSCXX_UNITREE_IDL_GO2_AUDIODATA__HPP #include #include @@ -348,4 +348,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::AudioData_& instance, bool as_ke } //namespace eclipse } //namespace org -#endif // DDSCXX_AUDIODATA__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_AUDIODATA__HPP diff --git a/include/unitree/idl/go2/BmsCmd_.hpp b/include/unitree/idl/go2/BmsCmd_.hpp index 4d09b90..e635d33 100644 --- a/include/unitree/idl/go2/BmsCmd_.hpp +++ b/include/unitree/idl/go2/BmsCmd_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_BMSCMD__HPP -#define DDSCXX_BMSCMD__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_BMSCMD__HPP +#define DDSCXX_UNITREE_IDL_GO2_BMSCMD__HPP #include #include @@ -318,4 +318,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::BmsCmd_& instance, bool as_key) } //namespace eclipse } //namespace org -#endif // DDSCXX_BMSCMD__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_BMSCMD__HPP diff --git a/include/unitree/idl/go2/BmsState_.hpp b/include/unitree/idl/go2/BmsState_.hpp index f0db503..0082805 100644 --- a/include/unitree/idl/go2/BmsState_.hpp +++ b/include/unitree/idl/go2/BmsState_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_BMSSTATE__HPP -#define DDSCXX_BMSSTATE__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_BMSSTATE__HPP +#define DDSCXX_UNITREE_IDL_GO2_BMSSTATE__HPP #include #include @@ -648,4 +648,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::BmsState_& instance, bool as_key } //namespace eclipse } //namespace org -#endif // DDSCXX_BMSSTATE__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_BMSSTATE__HPP diff --git a/include/unitree/idl/go2/ConfigChangeStatus_.hpp b/include/unitree/idl/go2/ConfigChangeStatus_.hpp index d2ca949..6b021c7 100644 --- a/include/unitree/idl/go2/ConfigChangeStatus_.hpp +++ b/include/unitree/idl/go2/ConfigChangeStatus_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_CONFIGCHANGESTATUS__HPP -#define DDSCXX_CONFIGCHANGESTATUS__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_CONFIGCHANGESTATUS__HPP +#define DDSCXX_UNITREE_IDL_GO2_CONFIGCHANGESTATUS__HPP #include @@ -306,4 +306,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::ConfigChangeStatus_& instance, b } //namespace eclipse } //namespace org -#endif // DDSCXX_CONFIGCHANGESTATUS__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_CONFIGCHANGESTATUS__HPP diff --git a/include/unitree/idl/go2/Error_.hpp b/include/unitree/idl/go2/Error_.hpp index e8a6e53..ebf191c 100644 --- a/include/unitree/idl/go2/Error_.hpp +++ b/include/unitree/idl/go2/Error_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_ERROR__HPP -#define DDSCXX_ERROR__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_ERROR__HPP +#define DDSCXX_UNITREE_IDL_GO2_ERROR__HPP #include @@ -298,4 +298,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::Error_& instance, bool as_key) { } //namespace eclipse } //namespace org -#endif // DDSCXX_ERROR__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_ERROR__HPP diff --git a/include/unitree/idl/go2/Go2FrontVideoData_.hpp b/include/unitree/idl/go2/Go2FrontVideoData_.hpp index 14459b7..0f4ff45 100644 --- a/include/unitree/idl/go2/Go2FrontVideoData_.hpp +++ b/include/unitree/idl/go2/Go2FrontVideoData_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_GO2FRONTVIDEODATA__HPP -#define DDSCXX_GO2FRONTVIDEODATA__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_GO2FRONTVIDEODATA__HPP +#define DDSCXX_UNITREE_IDL_GO2_GO2FRONTVIDEODATA__HPP #include #include @@ -520,4 +520,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::Go2FrontVideoData_& instance, bo } //namespace eclipse } //namespace org -#endif // DDSCXX_GO2FRONTVIDEODATA__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_GO2FRONTVIDEODATA__HPP diff --git a/include/unitree/idl/go2/HeightMap_.hpp b/include/unitree/idl/go2/HeightMap_.hpp index ae2f8d0..b80ac52 100644 --- a/include/unitree/idl/go2/HeightMap_.hpp +++ b/include/unitree/idl/go2/HeightMap_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_HEIGHTMAP__HPP -#define DDSCXX_HEIGHTMAP__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_HEIGHTMAP__HPP +#define DDSCXX_UNITREE_IDL_GO2_HEIGHTMAP__HPP #include #include @@ -578,4 +578,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::HeightMap_& instance, bool as_ke } //namespace eclipse } //namespace org -#endif // DDSCXX_HEIGHTMAP__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_HEIGHTMAP__HPP diff --git a/include/unitree/idl/go2/IMUState_.hpp b/include/unitree/idl/go2/IMUState_.hpp index 0963c70..fb15a87 100644 --- a/include/unitree/idl/go2/IMUState_.hpp +++ b/include/unitree/idl/go2/IMUState_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_IMUSTATE__HPP -#define DDSCXX_IMUSTATE__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_IMUSTATE__HPP +#define DDSCXX_UNITREE_IDL_GO2_IMUSTATE__HPP #include #include @@ -500,4 +500,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::IMUState_& instance, bool as_key } //namespace eclipse } //namespace org -#endif // DDSCXX_IMUSTATE__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_IMUSTATE__HPP diff --git a/include/unitree/idl/go2/InterfaceConfig_.hpp b/include/unitree/idl/go2/InterfaceConfig_.hpp index 086e010..e6bcf49 100644 --- a/include/unitree/idl/go2/InterfaceConfig_.hpp +++ b/include/unitree/idl/go2/InterfaceConfig_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_INTERFACECONFIG__HPP -#define DDSCXX_INTERFACECONFIG__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_INTERFACECONFIG__HPP +#define DDSCXX_UNITREE_IDL_GO2_INTERFACECONFIG__HPP #include #include @@ -360,4 +360,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::InterfaceConfig_& instance, bool } //namespace eclipse } //namespace org -#endif // DDSCXX_INTERFACECONFIG__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_INTERFACECONFIG__HPP diff --git a/include/unitree/idl/go2/LidarState_.hpp b/include/unitree/idl/go2/LidarState_.hpp index 78f6c2d..5fe944a 100644 --- a/include/unitree/idl/go2/LidarState_.hpp +++ b/include/unitree/idl/go2/LidarState_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_LIDARSTATE__HPP -#define DDSCXX_LIDARSTATE__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_LIDARSTATE__HPP +#define DDSCXX_UNITREE_IDL_GO2_LIDARSTATE__HPP #include #include @@ -1004,4 +1004,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::LidarState_& instance, bool as_k } //namespace eclipse } //namespace org -#endif // DDSCXX_LIDARSTATE__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_LIDARSTATE__HPP diff --git a/include/unitree/idl/go2/LowCmd_.hpp b/include/unitree/idl/go2/LowCmd_.hpp index 24df6da..287c0db 100644 --- a/include/unitree/idl/go2/LowCmd_.hpp +++ b/include/unitree/idl/go2/LowCmd_.hpp @@ -6,12 +6,12 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_LOWCMD__HPP -#define DDSCXX_LOWCMD__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_LOWCMD__HPP +#define DDSCXX_UNITREE_IDL_GO2_LOWCMD__HPP -#include "BmsCmd_.hpp" +#include "unitree/idl/go2/BmsCmd_.hpp" -#include "MotorCmd_.hpp" +#include "unitree/idl/go2/MotorCmd_.hpp" #include #include @@ -996,4 +996,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::LowCmd_& instance, bool as_key) } //namespace eclipse } //namespace org -#endif // DDSCXX_LOWCMD__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_LOWCMD__HPP diff --git a/include/unitree/idl/go2/LowState_.hpp b/include/unitree/idl/go2/LowState_.hpp index 929a98e..383b31f 100644 --- a/include/unitree/idl/go2/LowState_.hpp +++ b/include/unitree/idl/go2/LowState_.hpp @@ -6,14 +6,14 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_LOWSTATE__HPP -#define DDSCXX_LOWSTATE__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_LOWSTATE__HPP +#define DDSCXX_UNITREE_IDL_GO2_LOWSTATE__HPP -#include "BmsState_.hpp" +#include "unitree/idl/go2/BmsState_.hpp" -#include "IMUState_.hpp" +#include "unitree/idl/go2/IMUState_.hpp" -#include "MotorState_.hpp" +#include "unitree/idl/go2/MotorState_.hpp" #include #include @@ -1424,4 +1424,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::LowState_& instance, bool as_key } //namespace eclipse } //namespace org -#endif // DDSCXX_LOWSTATE__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_LOWSTATE__HPP diff --git a/include/unitree/idl/go2/MotorCmd_.hpp b/include/unitree/idl/go2/MotorCmd_.hpp index 87dca5d..980978f 100644 --- a/include/unitree/idl/go2/MotorCmd_.hpp +++ b/include/unitree/idl/go2/MotorCmd_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_MOTORCMD__HPP -#define DDSCXX_MOTORCMD__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_MOTORCMD__HPP +#define DDSCXX_UNITREE_IDL_GO2_MOTORCMD__HPP #include #include @@ -525,4 +525,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::MotorCmd_& instance, bool as_key } //namespace eclipse } //namespace org -#endif // DDSCXX_MOTORCMD__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_MOTORCMD__HPP diff --git a/include/unitree/idl/go2/MotorCmds_.hpp b/include/unitree/idl/go2/MotorCmds_.hpp index 0f94d3e..cdce892 100644 --- a/include/unitree/idl/go2/MotorCmds_.hpp +++ b/include/unitree/idl/go2/MotorCmds_.hpp @@ -6,10 +6,10 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_MOTORCMDS__HPP -#define DDSCXX_MOTORCMDS__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_MOTORCMDS__HPP +#define DDSCXX_UNITREE_IDL_GO2_MOTORCMDS__HPP -#include "MotorCmd_.hpp" +#include "unitree/idl/go2/MotorCmd_.hpp" #include @@ -345,4 +345,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::MotorCmds_& instance, bool as_ke } //namespace eclipse } //namespace org -#endif // DDSCXX_MOTORCMDS__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_MOTORCMDS__HPP diff --git a/include/unitree/idl/go2/MotorState_.hpp b/include/unitree/idl/go2/MotorState_.hpp index c3e9a2d..792e68e 100644 --- a/include/unitree/idl/go2/MotorState_.hpp +++ b/include/unitree/idl/go2/MotorState_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_MOTORSTATE__HPP -#define DDSCXX_MOTORSTATE__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_MOTORSTATE__HPP +#define DDSCXX_UNITREE_IDL_GO2_MOTORSTATE__HPP #include #include @@ -693,4 +693,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::MotorState_& instance, bool as_k } //namespace eclipse } //namespace org -#endif // DDSCXX_MOTORSTATE__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_MOTORSTATE__HPP diff --git a/include/unitree/idl/go2/MotorStates_.hpp b/include/unitree/idl/go2/MotorStates_.hpp index 594fa31..56fbf2d 100644 --- a/include/unitree/idl/go2/MotorStates_.hpp +++ b/include/unitree/idl/go2/MotorStates_.hpp @@ -6,10 +6,10 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_MOTORSTATES__HPP -#define DDSCXX_MOTORSTATES__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_MOTORSTATES__HPP +#define DDSCXX_UNITREE_IDL_GO2_MOTORSTATES__HPP -#include "MotorState_.hpp" +#include "unitree/idl/go2/MotorState_.hpp" #include @@ -356,4 +356,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::MotorStates_& instance, bool as_ } //namespace eclipse } //namespace org -#endif // DDSCXX_MOTORSTATES__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_MOTORSTATES__HPP diff --git a/include/unitree/idl/go2/PathPoint_.hpp b/include/unitree/idl/go2/PathPoint_.hpp index 2c90142..d6f70b4 100644 --- a/include/unitree/idl/go2/PathPoint_.hpp +++ b/include/unitree/idl/go2/PathPoint_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_PATHPOINT__HPP -#define DDSCXX_PATHPOINT__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_PATHPOINT__HPP +#define DDSCXX_UNITREE_IDL_GO2_PATHPOINT__HPP namespace unitree_go @@ -505,4 +505,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::PathPoint_& instance, bool as_ke } //namespace eclipse } //namespace org -#endif // DDSCXX_PATHPOINT__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_PATHPOINT__HPP diff --git a/include/unitree/idl/go2/Req_.hpp b/include/unitree/idl/go2/Req_.hpp index 7f7ef61..3efeead 100644 --- a/include/unitree/idl/go2/Req_.hpp +++ b/include/unitree/idl/go2/Req_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_REQ__HPP -#define DDSCXX_REQ__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_REQ__HPP +#define DDSCXX_UNITREE_IDL_GO2_REQ__HPP #include @@ -305,4 +305,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::Req_& instance, bool as_key) { } //namespace eclipse } //namespace org -#endif // DDSCXX_REQ__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_REQ__HPP diff --git a/include/unitree/idl/go2/Res_.hpp b/include/unitree/idl/go2/Res_.hpp index 12600a4..bb37287 100644 --- a/include/unitree/idl/go2/Res_.hpp +++ b/include/unitree/idl/go2/Res_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_RES__HPP -#define DDSCXX_RES__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_RES__HPP +#define DDSCXX_UNITREE_IDL_GO2_RES__HPP #include #include @@ -392,4 +392,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::Res_& instance, bool as_key) { } //namespace eclipse } //namespace org -#endif // DDSCXX_RES__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_RES__HPP diff --git a/include/unitree/idl/go2/SportModeCmd_.hpp b/include/unitree/idl/go2/SportModeCmd_.hpp index f1cb43b..71cb8b7 100644 --- a/include/unitree/idl/go2/SportModeCmd_.hpp +++ b/include/unitree/idl/go2/SportModeCmd_.hpp @@ -6,12 +6,12 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_SPORTMODECMD__HPP -#define DDSCXX_SPORTMODECMD__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_SPORTMODECMD__HPP +#define DDSCXX_UNITREE_IDL_GO2_SPORTMODECMD__HPP -#include "BmsCmd_.hpp" +#include "unitree/idl/go2/BmsCmd_.hpp" -#include "PathPoint_.hpp" +#include "unitree/idl/go2/PathPoint_.hpp" #include #include @@ -816,4 +816,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::SportModeCmd_& instance, bool as } //namespace eclipse } //namespace org -#endif // DDSCXX_SPORTMODECMD__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_SPORTMODECMD__HPP diff --git a/include/unitree/idl/go2/SportModeState_.hpp b/include/unitree/idl/go2/SportModeState_.hpp index 810607d..0eda562 100644 --- a/include/unitree/idl/go2/SportModeState_.hpp +++ b/include/unitree/idl/go2/SportModeState_.hpp @@ -6,14 +6,14 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_SPORTMODESTATE__HPP -#define DDSCXX_SPORTMODESTATE__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_SPORTMODESTATE__HPP +#define DDSCXX_UNITREE_IDL_GO2_SPORTMODESTATE__HPP -#include "IMUState_.hpp" +#include "unitree/idl/go2/IMUState_.hpp" -#include "PathPoint_.hpp" +#include "unitree/idl/go2/PathPoint_.hpp" -#include "TimeSpec_.hpp" +#include "unitree/idl/go2/TimeSpec_.hpp" #include #include @@ -1118,4 +1118,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::SportModeState_& instance, bool } //namespace eclipse } //namespace org -#endif // DDSCXX_SPORTMODESTATE__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_SPORTMODESTATE__HPP diff --git a/include/unitree/idl/go2/TimeSpec_.hpp b/include/unitree/idl/go2/TimeSpec_.hpp index 64eb150..5cd7f36 100644 --- a/include/unitree/idl/go2/TimeSpec_.hpp +++ b/include/unitree/idl/go2/TimeSpec_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_TIMESPEC__HPP -#define DDSCXX_TIMESPEC__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_TIMESPEC__HPP +#define DDSCXX_UNITREE_IDL_GO2_TIMESPEC__HPP #include @@ -299,4 +299,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::TimeSpec_& instance, bool as_key } //namespace eclipse } //namespace org -#endif // DDSCXX_TIMESPEC__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_TIMESPEC__HPP diff --git a/include/unitree/idl/go2/UwbState_.hpp b/include/unitree/idl/go2/UwbState_.hpp index e76ffae..913e7a2 100644 --- a/include/unitree/idl/go2/UwbState_.hpp +++ b/include/unitree/idl/go2/UwbState_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_UWBSTATE__HPP -#define DDSCXX_UWBSTATE__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_UWBSTATE__HPP +#define DDSCXX_UNITREE_IDL_GO2_UWBSTATE__HPP #include #include @@ -965,4 +965,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::UwbState_& instance, bool as_key } //namespace eclipse } //namespace org -#endif // DDSCXX_UWBSTATE__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_UWBSTATE__HPP diff --git a/include/unitree/idl/go2/UwbSwitch_.hpp b/include/unitree/idl/go2/UwbSwitch_.hpp index f9c65a4..12abe7c 100644 --- a/include/unitree/idl/go2/UwbSwitch_.hpp +++ b/include/unitree/idl/go2/UwbSwitch_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_UWBSWITCH__HPP -#define DDSCXX_UWBSWITCH__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_UWBSWITCH__HPP +#define DDSCXX_UNITREE_IDL_GO2_UWBSWITCH__HPP #include @@ -257,4 +257,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::UwbSwitch_& instance, bool as_ke } //namespace eclipse } //namespace org -#endif // DDSCXX_UWBSWITCH__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_UWBSWITCH__HPP diff --git a/include/unitree/idl/go2/WirelessController_.hpp b/include/unitree/idl/go2/WirelessController_.hpp index 81b2ec8..1bd8bf4 100644 --- a/include/unitree/idl/go2/WirelessController_.hpp +++ b/include/unitree/idl/go2/WirelessController_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_WIRELESSCONTROLLER__HPP -#define DDSCXX_WIRELESSCONTROLLER__HPP +#ifndef DDSCXX_UNITREE_IDL_GO2_WIRELESSCONTROLLER__HPP +#define DDSCXX_UNITREE_IDL_GO2_WIRELESSCONTROLLER__HPP #include @@ -423,4 +423,4 @@ bool max(S& str, const ::unitree_go::msg::dds_::WirelessController_& instance, b } //namespace eclipse } //namespace org -#endif // DDSCXX_WIRELESSCONTROLLER__HPP +#endif // DDSCXX_UNITREE_IDL_GO2_WIRELESSCONTROLLER__HPP diff --git a/include/unitree/idl/ros2/Header_.hpp b/include/unitree/idl/ros2/Header_.hpp index a3da3cd..b09cb48 100644 --- a/include/unitree/idl/ros2/Header_.hpp +++ b/include/unitree/idl/ros2/Header_.hpp @@ -6,10 +6,10 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_HEADER__HPP -#define DDSCXX_HEADER__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_HEADER__HPP +#define DDSCXX_UNITREE_IDL_ROS2_HEADER__HPP -#include "Time_.hpp" +#include "unitree/idl/ros2/Time_.hpp" #include @@ -327,4 +327,4 @@ bool max(S& str, const ::std_msgs::msg::dds_::Header_& instance, bool as_key) { } //namespace eclipse } //namespace org -#endif // DDSCXX_HEADER__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_HEADER__HPP diff --git a/include/unitree/idl/ros2/Imu_.hpp b/include/unitree/idl/ros2/Imu_.hpp new file mode 100644 index 0000000..e26fbda --- /dev/null +++ b/include/unitree/idl/ros2/Imu_.hpp @@ -0,0 +1,672 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Imu_.idl + Source: Imu_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_IMU__HPP +#define DDSCXX_UNITREE_IDL_ROS2_IMU__HPP + +#include "unitree/idl/ros2/Quaternion_.hpp" + +#include "unitree/idl/ros2/Vector3_.hpp" + +#include "unitree/idl/ros2/Header_.hpp" + +#include + +namespace sensor_msgs +{ +namespace msg +{ +namespace dds_ +{ +class Imu_ +{ +private: + ::std_msgs::msg::dds_::Header_ header_; + ::geometry_msgs::msg::dds_::Quaternion_ orientation_; + std::array orientation_covariance_ = { }; + ::geometry_msgs::msg::dds_::Vector3_ angular_velocity_; + std::array angular_velocity_covariance_ = { }; + ::geometry_msgs::msg::dds_::Vector3_ linear_acceleration_; + std::array linear_acceleration_covariance_ = { }; + +public: + Imu_() = default; + + explicit Imu_( + const ::std_msgs::msg::dds_::Header_& header, + const ::geometry_msgs::msg::dds_::Quaternion_& orientation, + const std::array& orientation_covariance, + const ::geometry_msgs::msg::dds_::Vector3_& angular_velocity, + const std::array& angular_velocity_covariance, + const ::geometry_msgs::msg::dds_::Vector3_& linear_acceleration, + const std::array& linear_acceleration_covariance) : + header_(header), + orientation_(orientation), + orientation_covariance_(orientation_covariance), + angular_velocity_(angular_velocity), + angular_velocity_covariance_(angular_velocity_covariance), + linear_acceleration_(linear_acceleration), + linear_acceleration_covariance_(linear_acceleration_covariance) { } + + const ::std_msgs::msg::dds_::Header_& header() const { return this->header_; } + ::std_msgs::msg::dds_::Header_& header() { return this->header_; } + void header(const ::std_msgs::msg::dds_::Header_& _val_) { this->header_ = _val_; } + void header(::std_msgs::msg::dds_::Header_&& _val_) { this->header_ = _val_; } + const ::geometry_msgs::msg::dds_::Quaternion_& orientation() const { return this->orientation_; } + ::geometry_msgs::msg::dds_::Quaternion_& orientation() { return this->orientation_; } + void orientation(const ::geometry_msgs::msg::dds_::Quaternion_& _val_) { this->orientation_ = _val_; } + void orientation(::geometry_msgs::msg::dds_::Quaternion_&& _val_) { this->orientation_ = _val_; } + const std::array& orientation_covariance() const { return this->orientation_covariance_; } + std::array& orientation_covariance() { return this->orientation_covariance_; } + void orientation_covariance(const std::array& _val_) { this->orientation_covariance_ = _val_; } + void orientation_covariance(std::array&& _val_) { this->orientation_covariance_ = _val_; } + const ::geometry_msgs::msg::dds_::Vector3_& angular_velocity() const { return this->angular_velocity_; } + ::geometry_msgs::msg::dds_::Vector3_& angular_velocity() { return this->angular_velocity_; } + void angular_velocity(const ::geometry_msgs::msg::dds_::Vector3_& _val_) { this->angular_velocity_ = _val_; } + void angular_velocity(::geometry_msgs::msg::dds_::Vector3_&& _val_) { this->angular_velocity_ = _val_; } + const std::array& angular_velocity_covariance() const { return this->angular_velocity_covariance_; } + std::array& angular_velocity_covariance() { return this->angular_velocity_covariance_; } + void angular_velocity_covariance(const std::array& _val_) { this->angular_velocity_covariance_ = _val_; } + void angular_velocity_covariance(std::array&& _val_) { this->angular_velocity_covariance_ = _val_; } + const ::geometry_msgs::msg::dds_::Vector3_& linear_acceleration() const { return this->linear_acceleration_; } + ::geometry_msgs::msg::dds_::Vector3_& linear_acceleration() { return this->linear_acceleration_; } + void linear_acceleration(const ::geometry_msgs::msg::dds_::Vector3_& _val_) { this->linear_acceleration_ = _val_; } + void linear_acceleration(::geometry_msgs::msg::dds_::Vector3_&& _val_) { this->linear_acceleration_ = _val_; } + const std::array& linear_acceleration_covariance() const { return this->linear_acceleration_covariance_; } + std::array& linear_acceleration_covariance() { return this->linear_acceleration_covariance_; } + void linear_acceleration_covariance(const std::array& _val_) { this->linear_acceleration_covariance_ = _val_; } + void linear_acceleration_covariance(std::array&& _val_) { this->linear_acceleration_covariance_ = _val_; } + + bool operator==(const Imu_& _other) const + { + (void) _other; + return header_ == _other.header_ && + orientation_ == _other.orientation_ && + orientation_covariance_ == _other.orientation_covariance_ && + angular_velocity_ == _other.angular_velocity_ && + angular_velocity_covariance_ == _other.angular_velocity_covariance_ && + linear_acceleration_ == _other.linear_acceleration_ && + linear_acceleration_covariance_ == _other.linear_acceleration_covariance_; + } + + bool operator!=(const Imu_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::sensor_msgs::msg::dds_::Imu_>::getTypeName() +{ + return "sensor_msgs::msg::dds_::Imu_"; +} + +template <> constexpr bool TopicTraits<::sensor_msgs::msg::dds_::Imu_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::sensor_msgs::msg::dds_::Imu_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::sensor_msgs::msg::dds_::Imu_>::type_map_blob_sz() { return 1814; } +template<> constexpr unsigned int TopicTraits<::sensor_msgs::msg::dds_::Imu_>::type_info_blob_sz() { return 292; } +template<> inline const uint8_t * TopicTraits<::sensor_msgs::msg::dds_::Imu_>::type_map_blob() { + static const uint8_t blob[] = { + 0x5f, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf1, 0xd4, 0xf9, 0x81, 0x03, 0x5a, 0x0e, 0xd7, + 0x22, 0x6a, 0xd9, 0xb4, 0x81, 0xee, 0xcf, 0x00, 0xe6, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, + 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x09, 0x9f, 0xb9, 0x95, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, + 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0xda, 0x16, 0x39, 0x42, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x77, 0xf3, 0x0b, 0x71, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, + 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x58, 0x1e, 0xf3, 0x6e, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x09, 0x0a, 0xe6, 0x5c, 0x0b, 0xa5, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, + 0xbc, 0x1c, 0x0c, 0x95, 0xca, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x0a, 0xcb, 0x0e, + 0x14, 0xbf, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, + 0xf2, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, + 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x96, 0xb8, 0xc7, 0x8d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x4b, 0xb3, 0x9c, 0x5c, 0xf1, 0x56, 0x7c, 0x5a, + 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, 0x33, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x74, + 0x45, 0x9c, 0xa3, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, + 0x04, 0x64, 0xd5, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, + 0x62, 0xa1, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xf1, 0x29, 0x01, 0x86, 0xf1, 0x5e, 0x73, 0x97, 0xe7, + 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, + 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, + 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, + 0xad, 0xe9, 0xe3, 0x00, 0x10, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf2, 0x29, 0xbf, 0xf9, + 0x05, 0xfe, 0xca, 0x04, 0x21, 0xfc, 0x4f, 0x4e, 0x24, 0x64, 0xd8, 0x00, 0xb1, 0x01, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, + 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, + 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x49, 0x6d, 0x75, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0x7d, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, + 0x55, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x6f, + 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, + 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x61, 0x6e, 0x67, 0x75, + 0x6c, 0x61, 0x72, 0x5f, 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x61, 0x6e, 0x67, 0x75, + 0x6c, 0x61, 0x72, 0x5f, 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x76, + 0x61, 0x72, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, + 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x6c, 0x69, 0x6e, 0x65, + 0x61, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x00, 0x00, + 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, + 0x7b, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1d, 0x00, 0x00, 0x00, 0x73, 0x74, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, + 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, + 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x00, 0x00, 0x00, 0xf2, + 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, + 0x72, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x54, 0x69, 0x6d, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x6e, 0x6f, + 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, + 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x51, 0x75, 0x61, 0x74, 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, + 0x5f, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0xf2, 0xac, 0xe2, 0x5e, + 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x78, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x33, 0x5f, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0xf2, 0x29, 0xbf, 0xf9, 0x05, 0xfe, 0xca, 0x04, 0x21, 0xfc, 0x4f, 0x4e, 0x24, 0x64, 0xd8, 0xf1, + 0xd4, 0xf9, 0x81, 0x03, 0x5a, 0x0e, 0xd7, 0x22, 0x6a, 0xd9, 0xb4, 0x81, 0xee, 0xcf, 0xf2, 0xe5, + 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0xf1, 0xdc, 0xf1, + 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0xf2, 0xd4, 0x85, 0x4f, + 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0xf1, 0x56, 0x7c, 0x5a, 0x93, + 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, + 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, + 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, + 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, + 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::sensor_msgs::msg::dds_::Imu_>::type_info_blob() { + static const uint8_t blob[] = { + 0x20, 0x01, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xd4, 0xf9, 0x81, 0x03, 0x5a, 0x0e, 0xd7, 0x22, 0x6a, 0xd9, 0xb4, + 0x81, 0xee, 0xcf, 0x00, 0xea, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, + 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x00, 0x48, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, + 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, 0x57, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, + 0x47, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x29, 0xbf, 0xf9, 0x05, 0xfe, 0xca, 0x04, 0x21, 0xfc, 0x4f, 0x4e, + 0x24, 0x64, 0xd8, 0x00, 0xb5, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, + 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, + 0x76, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, + 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x94, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, + 0x7c, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::sensor_msgs::msg::dds_::Imu_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::sensor_msgs::msg::dds_::Imu_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::sensor_msgs::msg::dds_::Imu_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::sensor_msgs::msg::dds_::Imu_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::sensor_msgs::msg::dds_::Imu_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.orientation(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.orientation_covariance()[0], instance.orientation_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.angular_velocity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.angular_velocity_covariance()[0], instance.angular_velocity_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.linear_acceleration(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.linear_acceleration_covariance()[0], instance.linear_acceleration_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::sensor_msgs::msg::dds_::Imu_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::Imu_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::sensor_msgs::msg::dds_::Imu_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.orientation(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.orientation_covariance()[0], instance.orientation_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.angular_velocity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.angular_velocity_covariance()[0], instance.angular_velocity_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.linear_acceleration(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.linear_acceleration_covariance()[0], instance.linear_acceleration_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::sensor_msgs::msg::dds_::Imu_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::Imu_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::sensor_msgs::msg::dds_::Imu_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.orientation(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.orientation_covariance()[0], instance.orientation_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.angular_velocity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.angular_velocity_covariance()[0], instance.angular_velocity_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.linear_acceleration(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.linear_acceleration_covariance()[0], instance.linear_acceleration_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::sensor_msgs::msg::dds_::Imu_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::Imu_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::sensor_msgs::msg::dds_::Imu_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.orientation(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.orientation_covariance()[0], instance.orientation_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.angular_velocity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.angular_velocity_covariance()[0], instance.angular_velocity_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.linear_acceleration(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.linear_acceleration_covariance()[0], instance.linear_acceleration_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::sensor_msgs::msg::dds_::Imu_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::Imu_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_IMU__HPP diff --git a/include/unitree/idl/ros2/MapMetaData_.hpp b/include/unitree/idl/ros2/MapMetaData_.hpp index 3a6636f..45b908b 100644 --- a/include/unitree/idl/ros2/MapMetaData_.hpp +++ b/include/unitree/idl/ros2/MapMetaData_.hpp @@ -6,12 +6,12 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_MAPMETADATA__HPP -#define DDSCXX_MAPMETADATA__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_MAPMETADATA__HPP +#define DDSCXX_UNITREE_IDL_ROS2_MAPMETADATA__HPP -#include "Time_.hpp" +#include "unitree/idl/ros2/Time_.hpp" -#include "Pose_.hpp" +#include "unitree/idl/ros2/Pose_.hpp" #include @@ -514,4 +514,4 @@ bool max(S& str, const ::nav_msgs::msg::dds_::MapMetaData_& instance, bool as_ke } //namespace eclipse } //namespace org -#endif // DDSCXX_MAPMETADATA__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_MAPMETADATA__HPP diff --git a/include/unitree/idl/ros2/OccupancyGrid_.hpp b/include/unitree/idl/ros2/OccupancyGrid_.hpp index 1eb547e..d3e7360 100644 --- a/include/unitree/idl/ros2/OccupancyGrid_.hpp +++ b/include/unitree/idl/ros2/OccupancyGrid_.hpp @@ -6,12 +6,12 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_OCCUPANCYGRID__HPP -#define DDSCXX_OCCUPANCYGRID__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_OCCUPANCYGRID__HPP +#define DDSCXX_UNITREE_IDL_ROS2_OCCUPANCYGRID__HPP -#include "MapMetaData_.hpp" +#include "unitree/idl/ros2/MapMetaData_.hpp" -#include "Header_.hpp" +#include "unitree/idl/ros2/Header_.hpp" #include #include @@ -529,4 +529,4 @@ bool max(S& str, const ::nav_msgs::msg::dds_::OccupancyGrid_& instance, bool as_ } //namespace eclipse } //namespace org -#endif // DDSCXX_OCCUPANCYGRID__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_OCCUPANCYGRID__HPP diff --git a/include/unitree/idl/ros2/Odometry_.hpp b/include/unitree/idl/ros2/Odometry_.hpp index c94ca11..f60aff0 100644 --- a/include/unitree/idl/ros2/Odometry_.hpp +++ b/include/unitree/idl/ros2/Odometry_.hpp @@ -6,14 +6,14 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_ODOMETRY__HPP -#define DDSCXX_ODOMETRY__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_ODOMETRY__HPP +#define DDSCXX_UNITREE_IDL_ROS2_ODOMETRY__HPP -#include "PoseWithCovariance_.hpp" +#include "unitree/idl/ros2/PoseWithCovariance_.hpp" -#include "TwistWithCovariance_.hpp" +#include "unitree/idl/ros2/TwistWithCovariance_.hpp" -#include "Header_.hpp" +#include "unitree/idl/ros2/Header_.hpp" #include @@ -585,4 +585,4 @@ bool max(S& str, const ::nav_msgs::msg::dds_::Odometry_& instance, bool as_key) } //namespace eclipse } //namespace org -#endif // DDSCXX_ODOMETRY__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_ODOMETRY__HPP diff --git a/include/unitree/idl/ros2/Point32_.hpp b/include/unitree/idl/ros2/Point32_.hpp index b2b4d0f..7343187 100644 --- a/include/unitree/idl/ros2/Point32_.hpp +++ b/include/unitree/idl/ros2/Point32_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_POINT32__HPP -#define DDSCXX_POINT32__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_POINT32__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POINT32__HPP namespace geometry_msgs @@ -338,4 +338,4 @@ bool max(S& str, const ::geometry_msgs::msg::dds_::Point32_& instance, bool as_k } //namespace eclipse } //namespace org -#endif // DDSCXX_POINT32__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_POINT32__HPP diff --git a/include/unitree/idl/ros2/PointCloud2_.hpp b/include/unitree/idl/ros2/PointCloud2_.hpp index 6479f4e..fea5360 100644 --- a/include/unitree/idl/ros2/PointCloud2_.hpp +++ b/include/unitree/idl/ros2/PointCloud2_.hpp @@ -6,12 +6,12 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_POINTCLOUD2__HPP -#define DDSCXX_POINTCLOUD2__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_POINTCLOUD2__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POINTCLOUD2__HPP -#include "PointField_.hpp" +#include "unitree/idl/ros2/PointField_.hpp" -#include "Header_.hpp" +#include "unitree/idl/ros2/Header_.hpp" #include #include @@ -758,4 +758,4 @@ bool max(S& str, const ::sensor_msgs::msg::dds_::PointCloud2_& instance, bool as } //namespace eclipse } //namespace org -#endif // DDSCXX_POINTCLOUD2__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_POINTCLOUD2__HPP diff --git a/include/unitree/idl/ros2/PointField_.hpp b/include/unitree/idl/ros2/PointField_.hpp index 9ce9dbf..3fab88f 100644 --- a/include/unitree/idl/ros2/PointField_.hpp +++ b/include/unitree/idl/ros2/PointField_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_POINTFIELD__HPP -#define DDSCXX_POINTFIELD__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_POINTFIELD__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POINTFIELD__HPP #include #include @@ -409,4 +409,4 @@ bool max(S& str, const ::sensor_msgs::msg::dds_::PointField_& instance, bool as_ } //namespace eclipse } //namespace org -#endif // DDSCXX_POINTFIELD__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_POINTFIELD__HPP diff --git a/include/unitree/idl/ros2/PointStamped_.hpp b/include/unitree/idl/ros2/PointStamped_.hpp index 2981af4..4368725 100644 --- a/include/unitree/idl/ros2/PointStamped_.hpp +++ b/include/unitree/idl/ros2/PointStamped_.hpp @@ -6,12 +6,12 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_POINTSTAMPED__HPP -#define DDSCXX_POINTSTAMPED__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_POINTSTAMPED__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POINTSTAMPED__HPP -#include "Point_.hpp" +#include "unitree/idl/ros2/Point_.hpp" -#include "Header_.hpp" +#include "unitree/idl/ros2/Header_.hpp" namespace geometry_msgs @@ -369,4 +369,4 @@ bool max(S& str, const ::geometry_msgs::msg::dds_::PointStamped_& instance, bool } //namespace eclipse } //namespace org -#endif // DDSCXX_POINTSTAMPED__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_POINTSTAMPED__HPP diff --git a/include/unitree/idl/ros2/Point_.hpp b/include/unitree/idl/ros2/Point_.hpp index 6a89501..22ca13c 100644 --- a/include/unitree/idl/ros2/Point_.hpp +++ b/include/unitree/idl/ros2/Point_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_POINT__HPP -#define DDSCXX_POINT__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_POINT__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POINT__HPP namespace geometry_msgs @@ -338,4 +338,4 @@ bool max(S& str, const ::geometry_msgs::msg::dds_::Point_& instance, bool as_key } //namespace eclipse } //namespace org -#endif // DDSCXX_POINT__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_POINT__HPP diff --git a/include/unitree/idl/ros2/Pose2D_.hpp b/include/unitree/idl/ros2/Pose2D_.hpp index 99bf5e8..1e5ee41 100644 --- a/include/unitree/idl/ros2/Pose2D_.hpp +++ b/include/unitree/idl/ros2/Pose2D_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_POSE2D__HPP -#define DDSCXX_POSE2D__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_POSE2D__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POSE2D__HPP namespace geometry_msgs @@ -338,4 +338,4 @@ bool max(S& str, const ::geometry_msgs::msg::dds_::Pose2D_& instance, bool as_ke } //namespace eclipse } //namespace org -#endif // DDSCXX_POSE2D__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_POSE2D__HPP diff --git a/include/unitree/idl/ros2/PoseStamped_.hpp b/include/unitree/idl/ros2/PoseStamped_.hpp index 8c40d98..6b0935a 100644 --- a/include/unitree/idl/ros2/PoseStamped_.hpp +++ b/include/unitree/idl/ros2/PoseStamped_.hpp @@ -6,12 +6,12 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_POSESTAMPED__HPP -#define DDSCXX_POSESTAMPED__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_POSESTAMPED__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POSESTAMPED__HPP -#include "Pose_.hpp" +#include "unitree/idl/ros2/Pose_.hpp" -#include "Header_.hpp" +#include "unitree/idl/ros2/Header_.hpp" namespace geometry_msgs @@ -412,4 +412,4 @@ bool max(S& str, const ::geometry_msgs::msg::dds_::PoseStamped_& instance, bool } //namespace eclipse } //namespace org -#endif // DDSCXX_POSESTAMPED__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_POSESTAMPED__HPP diff --git a/include/unitree/idl/ros2/PoseWithCovarianceStamped_.hpp b/include/unitree/idl/ros2/PoseWithCovarianceStamped_.hpp index 19ebc1f..a1f2523 100644 --- a/include/unitree/idl/ros2/PoseWithCovarianceStamped_.hpp +++ b/include/unitree/idl/ros2/PoseWithCovarianceStamped_.hpp @@ -6,12 +6,12 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_POSEWITHCOVARIANCESTAMPED__HPP -#define DDSCXX_POSEWITHCOVARIANCESTAMPED__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_POSEWITHCOVARIANCESTAMPED__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POSEWITHCOVARIANCESTAMPED__HPP -#include "PoseWithCovariance_.hpp" +#include "unitree/idl/ros2/PoseWithCovariance_.hpp" -#include "Header_.hpp" +#include "unitree/idl/ros2/Header_.hpp" namespace geometry_msgs @@ -435,4 +435,4 @@ bool max(S& str, const ::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_& i } //namespace eclipse } //namespace org -#endif // DDSCXX_POSEWITHCOVARIANCESTAMPED__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_POSEWITHCOVARIANCESTAMPED__HPP diff --git a/include/unitree/idl/ros2/PoseWithCovariance_.hpp b/include/unitree/idl/ros2/PoseWithCovariance_.hpp index efd3b7b..724ce6c 100644 --- a/include/unitree/idl/ros2/PoseWithCovariance_.hpp +++ b/include/unitree/idl/ros2/PoseWithCovariance_.hpp @@ -6,10 +6,10 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_POSEWITHCOVARIANCE__HPP -#define DDSCXX_POSEWITHCOVARIANCE__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_POSEWITHCOVARIANCE__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POSEWITHCOVARIANCE__HPP -#include "Pose_.hpp" +#include "unitree/idl/ros2/Pose_.hpp" #include @@ -385,4 +385,4 @@ bool max(S& str, const ::geometry_msgs::msg::dds_::PoseWithCovariance_& instance } //namespace eclipse } //namespace org -#endif // DDSCXX_POSEWITHCOVARIANCE__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_POSEWITHCOVARIANCE__HPP diff --git a/include/unitree/idl/ros2/Pose_.hpp b/include/unitree/idl/ros2/Pose_.hpp index 3144d2f..5a49edd 100644 --- a/include/unitree/idl/ros2/Pose_.hpp +++ b/include/unitree/idl/ros2/Pose_.hpp @@ -6,12 +6,12 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_POSE__HPP -#define DDSCXX_POSE__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_POSE__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POSE__HPP -#include "Point_.hpp" +#include "unitree/idl/ros2/Point_.hpp" -#include "Quaternion_.hpp" +#include "unitree/idl/ros2/Quaternion_.hpp" namespace geometry_msgs @@ -348,4 +348,4 @@ bool max(S& str, const ::geometry_msgs::msg::dds_::Pose_& instance, bool as_key) } //namespace eclipse } //namespace org -#endif // DDSCXX_POSE__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_POSE__HPP diff --git a/include/unitree/idl/ros2/QuaternionStamped_.hpp b/include/unitree/idl/ros2/QuaternionStamped_.hpp index 3904b3d..2aff191 100644 --- a/include/unitree/idl/ros2/QuaternionStamped_.hpp +++ b/include/unitree/idl/ros2/QuaternionStamped_.hpp @@ -6,12 +6,12 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_QUATERNIONSTAMPED__HPP -#define DDSCXX_QUATERNIONSTAMPED__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_QUATERNIONSTAMPED__HPP +#define DDSCXX_UNITREE_IDL_ROS2_QUATERNIONSTAMPED__HPP -#include "Quaternion_.hpp" +#include "unitree/idl/ros2/Quaternion_.hpp" -#include "Header_.hpp" +#include "unitree/idl/ros2/Header_.hpp" namespace geometry_msgs @@ -372,4 +372,4 @@ bool max(S& str, const ::geometry_msgs::msg::dds_::QuaternionStamped_& instance, } //namespace eclipse } //namespace org -#endif // DDSCXX_QUATERNIONSTAMPED__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_QUATERNIONSTAMPED__HPP diff --git a/include/unitree/idl/ros2/Quaternion_.hpp b/include/unitree/idl/ros2/Quaternion_.hpp index a622b3e..1ab2559 100644 --- a/include/unitree/idl/ros2/Quaternion_.hpp +++ b/include/unitree/idl/ros2/Quaternion_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_QUATERNION__HPP -#define DDSCXX_QUATERNION__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_QUATERNION__HPP +#define DDSCXX_UNITREE_IDL_ROS2_QUATERNION__HPP namespace geometry_msgs @@ -380,4 +380,4 @@ bool max(S& str, const ::geometry_msgs::msg::dds_::Quaternion_& instance, bool a } //namespace eclipse } //namespace org -#endif // DDSCXX_QUATERNION__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_QUATERNION__HPP diff --git a/include/unitree/idl/ros2/String_.hpp b/include/unitree/idl/ros2/String_.hpp index a193617..b85ca71 100644 --- a/include/unitree/idl/ros2/String_.hpp +++ b/include/unitree/idl/ros2/String_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_STRING__HPP -#define DDSCXX_STRING__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_STRING__HPP +#define DDSCXX_UNITREE_IDL_ROS2_STRING__HPP #include @@ -263,4 +263,4 @@ bool max(S& str, const ::std_msgs::msg::dds_::String_& instance, bool as_key) { } //namespace eclipse } //namespace org -#endif // DDSCXX_STRING__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_STRING__HPP diff --git a/include/unitree/idl/ros2/Time_.hpp b/include/unitree/idl/ros2/Time_.hpp index a9e2b29..2489c5e 100644 --- a/include/unitree/idl/ros2/Time_.hpp +++ b/include/unitree/idl/ros2/Time_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_TIME__HPP -#define DDSCXX_TIME__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_TIME__HPP +#define DDSCXX_UNITREE_IDL_ROS2_TIME__HPP #include @@ -299,4 +299,4 @@ bool max(S& str, const ::builtin_interfaces::msg::dds_::Time_& instance, bool as } //namespace eclipse } //namespace org -#endif // DDSCXX_TIME__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_TIME__HPP diff --git a/include/unitree/idl/ros2/TwistStamped_.hpp b/include/unitree/idl/ros2/TwistStamped_.hpp index f869c02..3e351e5 100644 --- a/include/unitree/idl/ros2/TwistStamped_.hpp +++ b/include/unitree/idl/ros2/TwistStamped_.hpp @@ -6,12 +6,12 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_TWISTSTAMPED__HPP -#define DDSCXX_TWISTSTAMPED__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_TWISTSTAMPED__HPP +#define DDSCXX_UNITREE_IDL_ROS2_TWISTSTAMPED__HPP -#include "Twist_.hpp" +#include "unitree/idl/ros2/Twist_.hpp" -#include "Header_.hpp" +#include "unitree/idl/ros2/Header_.hpp" namespace geometry_msgs @@ -391,4 +391,4 @@ bool max(S& str, const ::geometry_msgs::msg::dds_::TwistStamped_& instance, bool } //namespace eclipse } //namespace org -#endif // DDSCXX_TWISTSTAMPED__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_TWISTSTAMPED__HPP diff --git a/include/unitree/idl/ros2/TwistWithCovarianceStamped_.hpp b/include/unitree/idl/ros2/TwistWithCovarianceStamped_.hpp index 86e82f8..a1b1384 100644 --- a/include/unitree/idl/ros2/TwistWithCovarianceStamped_.hpp +++ b/include/unitree/idl/ros2/TwistWithCovarianceStamped_.hpp @@ -6,12 +6,12 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_TWISTWITHCOVARIANCESTAMPED__HPP -#define DDSCXX_TWISTWITHCOVARIANCESTAMPED__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_TWISTWITHCOVARIANCESTAMPED__HPP +#define DDSCXX_UNITREE_IDL_ROS2_TWISTWITHCOVARIANCESTAMPED__HPP -#include "TwistWithCovariance_.hpp" +#include "unitree/idl/ros2/TwistWithCovariance_.hpp" -#include "Header_.hpp" +#include "unitree/idl/ros2/Header_.hpp" namespace geometry_msgs @@ -414,4 +414,4 @@ bool max(S& str, const ::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_& } //namespace eclipse } //namespace org -#endif // DDSCXX_TWISTWITHCOVARIANCESTAMPED__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_TWISTWITHCOVARIANCESTAMPED__HPP diff --git a/include/unitree/idl/ros2/TwistWithCovariance_.hpp b/include/unitree/idl/ros2/TwistWithCovariance_.hpp index ae3f2a8..35660f9 100644 --- a/include/unitree/idl/ros2/TwistWithCovariance_.hpp +++ b/include/unitree/idl/ros2/TwistWithCovariance_.hpp @@ -6,10 +6,10 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_TWISTWITHCOVARIANCE__HPP -#define DDSCXX_TWISTWITHCOVARIANCE__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_TWISTWITHCOVARIANCE__HPP +#define DDSCXX_UNITREE_IDL_ROS2_TWISTWITHCOVARIANCE__HPP -#include "Twist_.hpp" +#include "unitree/idl/ros2/Twist_.hpp" #include @@ -364,4 +364,4 @@ bool max(S& str, const ::geometry_msgs::msg::dds_::TwistWithCovariance_& instanc } //namespace eclipse } //namespace org -#endif // DDSCXX_TWISTWITHCOVARIANCE__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_TWISTWITHCOVARIANCE__HPP diff --git a/include/unitree/idl/ros2/Twist_.hpp b/include/unitree/idl/ros2/Twist_.hpp index 93cfdd1..5d63f3c 100644 --- a/include/unitree/idl/ros2/Twist_.hpp +++ b/include/unitree/idl/ros2/Twist_.hpp @@ -6,10 +6,10 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_TWIST__HPP -#define DDSCXX_TWIST__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_TWIST__HPP +#define DDSCXX_UNITREE_IDL_ROS2_TWIST__HPP -#include "Vector3_.hpp" +#include "unitree/idl/ros2/Vector3_.hpp" namespace geometry_msgs @@ -325,4 +325,4 @@ bool max(S& str, const ::geometry_msgs::msg::dds_::Twist_& instance, bool as_key } //namespace eclipse } //namespace org -#endif // DDSCXX_TWIST__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_TWIST__HPP diff --git a/include/unitree/idl/ros2/Vector3_.hpp b/include/unitree/idl/ros2/Vector3_.hpp index 8781c02..d4f6633 100644 --- a/include/unitree/idl/ros2/Vector3_.hpp +++ b/include/unitree/idl/ros2/Vector3_.hpp @@ -6,8 +6,8 @@ Cyclone DDS: v0.10.2 *****************************************************************/ -#ifndef DDSCXX_VECTOR3__HPP -#define DDSCXX_VECTOR3__HPP +#ifndef DDSCXX_UNITREE_IDL_ROS2_VECTOR3__HPP +#define DDSCXX_UNITREE_IDL_ROS2_VECTOR3__HPP namespace geometry_msgs @@ -338,4 +338,4 @@ bool max(S& str, const ::geometry_msgs::msg::dds_::Vector3_& instance, bool as_k } //namespace eclipse } //namespace org -#endif // DDSCXX_VECTOR3__HPP +#endif // DDSCXX_UNITREE_IDL_ROS2_VECTOR3__HPP diff --git a/include/unitree/robot/b2/sport/sport_api.hpp b/include/unitree/robot/b2/sport/sport_api.hpp index 765b9a9..4d3f97c 100644 --- a/include/unitree/robot/b2/sport/sport_api.hpp +++ b/include/unitree/robot/b2/sport/sport_api.hpp @@ -51,6 +51,7 @@ const int32_t ROBOT_SPORT_API_ID_SWITCHEULERMODE = 1037; const int32_t ROBOT_SPORT_API_ID_SWITCHMOVEMODE = 1038; const int32_t ROBOT_SPORT_API_ID_PRECISEYAW = 1039; const int32_t ROBOT_SPORT_API_ID_VISIONWALK = 1101; +const int32_t ROBOT_SPORT_API_ID_ENABLEWALKBLOCK = 1040; } } diff --git a/include/unitree/robot/b2/sport/sport_client.hpp b/include/unitree/robot/b2/sport/sport_client.hpp index 1199a3e..7703228 100644 --- a/include/unitree/robot/b2/sport/sport_client.hpp +++ b/include/unitree/robot/b2/sport/sport_client.hpp @@ -79,6 +79,9 @@ class SportClient : public Client int32_t PreciseYaw(float desiredYaw, float measuredYaw); + int32_t FrontJump(); + + int32_t EnableVisionWalk(); }; } } diff --git a/include/unitree/robot/go2/sport/sport_api.hpp b/include/unitree/robot/go2/sport/sport_api.hpp index 96eb4b3..e1778a5 100644 --- a/include/unitree/robot/go2/sport/sport_api.hpp +++ b/include/unitree/robot/go2/sport/sport_api.hpp @@ -35,7 +35,7 @@ const int32_t ROBOT_SPORT_API_ID_HELLO = 1016; const int32_t ROBOT_SPORT_API_ID_STRETCH = 1017; const int32_t ROBOT_SPORT_API_ID_TRAJECTORYFOLLOW = 1018; const int32_t ROBOT_SPORT_API_ID_CONTINUOUSGAIT = 1019; -// const int32_t ROBOT_SPORT_API_ID_CONTENT = 1020; +const int32_t ROBOT_SPORT_API_ID_CONTENT = 1020; const int32_t ROBOT_SPORT_API_ID_WALLOW = 1021; const int32_t ROBOT_SPORT_API_ID_DANCE1 = 1022; const int32_t ROBOT_SPORT_API_ID_DANCE2 = 1023; diff --git a/include/unitree/robot/go2/sport/sport_client.hpp b/include/unitree/robot/go2/sport/sport_client.hpp index b3cd29d..8d25f77 100644 --- a/include/unitree/robot/go2/sport/sport_client.hpp +++ b/include/unitree/robot/go2/sport/sport_client.hpp @@ -180,11 +180,11 @@ class SportClient : public Client */ int32_t Wallow(); - // /* - // * @brief Content - // * @api: 1020 - // */ - // int32_t Content(); + /* + * @brief Content + * @api: 1020 + */ + int32_t Content(); /* * @brief Heart diff --git a/include/unitree/robot/internal/internal_api.hpp b/include/unitree/robot/internal/internal_api.hpp index 4abb498..a94c886 100644 --- a/include/unitree/robot/internal/internal_api.hpp +++ b/include/unitree/robot/internal/internal_api.hpp @@ -15,6 +15,12 @@ namespace robot const int32_t ROBOT_INTERNAL_API_ID_MAX = 100; /////////////////////////////////////////////////////////////// +/* + * @brief invailed api id + * @value: -1 + */ +const int32_t ROBOT_API_ID_NONE = -1; + /* * @brief Get api version from server. * @value: 1 diff --git a/include/unitree/robot/server/server.hpp b/include/unitree/robot/server/server.hpp index f923d77..abef09c 100644 --- a/include/unitree/robot/server/server.hpp +++ b/include/unitree/robot/server/server.hpp @@ -37,6 +37,8 @@ class Server : public ServerBase const std::string& GetName(); const std::string& GetApiVersion() const; + int32_t GetCurrentApiId() const; + protected: void SetApiVersion(const std::string& version); @@ -62,6 +64,9 @@ class Server : public ServerBase std::set mApiBinarySet; LeaseServerPtr mLeaseServerPtr; + +private: + static thread_local int32_t mCurrentApiId; }; using ServerPtr = std::shared_ptr; diff --git a/include/unitree/robot/server/server_stub.hpp b/include/unitree/robot/server/server_stub.hpp index 3554508..5b89bcc 100644 --- a/include/unitree/robot/server/server_stub.hpp +++ b/include/unitree/robot/server/server_stub.hpp @@ -16,6 +16,7 @@ class ServerStub { public: explicit ServerStub(); + ~ServerStub(); void Init(const std::string& name, const ServerRequestHandler& handler, bool enableProiQueue); bool Send(const Response& response); @@ -28,6 +29,7 @@ class ServerStub private: bool mEnableProiQueue; + bool mRunning; ServerRequestHandler mRequestHandler; ChannelLaborPtr mChannelLaborPtr; common::BlockQueuePtr mQueuePtr; diff --git a/lib/aarch64/libunitree_sdk2.a b/lib/aarch64/libunitree_sdk2.a index b33bab1..89873c4 100644 Binary files a/lib/aarch64/libunitree_sdk2.a and b/lib/aarch64/libunitree_sdk2.a differ diff --git a/lib/x86_64/libunitree_sdk2.a b/lib/x86_64/libunitree_sdk2.a index 8e7695a..3ee7df8 100644 Binary files a/lib/x86_64/libunitree_sdk2.a and b/lib/x86_64/libunitree_sdk2.a differ