diff --git a/__init__.py b/__init__.py index ff88aad..9c72eae 100644 --- a/__init__.py +++ b/__init__.py @@ -5,7 +5,8 @@ including LCM-Foxglove bridge functionality and LCM message definitions. """ -__version__ = "0.1.0" +# Keep in sync with [project].version in pyproject.toml +__version__ = "0.1.4" import os import sys diff --git a/flake.lock b/flake.lock index 619442b..5a60868 100644 --- a/flake.lock +++ b/flake.lock @@ -42,11 +42,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1767440528, - "narHash": "sha256-qR6+uIptymrkAyb24HPsA6P/65g8/KIIMwnqvQb+Zvk=", + "lastModified": 1785413335, + "narHash": "sha256-a06uhl+Io0gc84MePznhDXb9ZYaaRVjErgCAjJx7kqY=", "owner": "dimensionalOS", "repo": "lcm", - "rev": "25319d8e4c5a835d9a5fb103db0286afbbc1f09e", + "rev": "553171ca967d7c4e6c60a68235161d5be137d269", "type": "github" }, "original": { diff --git a/generate.sh b/generate.sh index 79fa57e..746d0cd 100755 --- a/generate.sh +++ b/generate.sh @@ -35,15 +35,21 @@ rm -rf "$SCRIPT_DIR/generated/lua_lcm_msgs" echo -e "\033[32mLCM -> Lua done\033[0m" # Generate TypeScript bindings -rm -rf "$SCRIPT_DIR/generated/ts_lcm_msgs" +# Only the per-package directories are generated; anything else in there is +# hand-written, so clear the packages instead of the whole tree. +mkdir -p "$SCRIPT_DIR/generated/ts_lcm_msgs" +find "$SCRIPT_DIR/generated/ts_lcm_msgs" -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} + deno run --allow-read --allow-write "$SCRIPT_DIR/tools/ts/gen/mod.ts" -q -o "$SCRIPT_DIR/generated/ts_lcm_msgs" "$SCRIPT_DIR/lcm_types"/*.lcm # Copy to msgs package (for JSR publishing - symlinks not supported) rm -rf "$SCRIPT_DIR/tools/ts/msgs/generated" -cp -r "$SCRIPT_DIR/generated/ts_lcm_msgs" "$SCRIPT_DIR/tools/ts/msgs/generated" +mkdir -p "$SCRIPT_DIR/tools/ts/msgs/generated" +cp -r "$SCRIPT_DIR/generated/ts_lcm_msgs"/*/ "$SCRIPT_DIR/tools/ts/msgs/generated/" echo -e "\033[32mLCM -> TypeScript done\033[0m" # Generate Rust bindings -rm -rf "$SCRIPT_DIR/generated/rust_lcm_msgs" +# The generator owns src/ and Cargo.toml; tests/, Cargo.lock and .gitignore are +# hand-written, so only clear src/ rather than the whole crate. +rm -rf "$SCRIPT_DIR/generated/rust_lcm_msgs/src" python3 "$SCRIPT_DIR/tools/rust/lcm_rust_gen.py" "$SCRIPT_DIR/lcm_types" -o "$SCRIPT_DIR/generated/rust_lcm_msgs" (cd "$SCRIPT_DIR/generated/rust_lcm_msgs" && cargo check --quiet) echo -e "\033[32mLCM -> Rust done\033[0m" diff --git a/generated/cpp_lcm_msgs/geographic_msgs/BoundingBox.hpp b/generated/cpp_lcm_msgs/geographic_msgs/BoundingBox.hpp new file mode 100644 index 0000000..8a50bd5 --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/BoundingBox.hpp @@ -0,0 +1,168 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_BoundingBox_hpp__ +#define __geographic_msgs_BoundingBox_hpp__ + +#include + +#include "geographic_msgs/GeoPoint.hpp" +#include "geographic_msgs/GeoPoint.hpp" + +namespace geographic_msgs +{ + +class BoundingBox +{ + public: + geographic_msgs::GeoPoint min_pt; + + geographic_msgs::GeoPoint max_pt; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "BoundingBox" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int BoundingBox::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int BoundingBox::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int BoundingBox::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t BoundingBox::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* BoundingBox::getTypeName() +{ + return "BoundingBox"; +} + +int BoundingBox::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = this->min_pt._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->max_pt._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int BoundingBox::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = this->min_pt._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->max_pt._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int BoundingBox::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += this->min_pt._getEncodedSizeNoHash(); + enc_size += this->max_pt._getEncodedSizeNoHash(); + return enc_size; +} + +uint64_t BoundingBox::_computeHash(const __lcm_hash_ptr *p) +{ + const __lcm_hash_ptr *fp; + for(fp = p; fp != NULL; fp = fp->parent) + if(fp->v == BoundingBox::getHash) + return 0; + const __lcm_hash_ptr cp = { p, BoundingBox::getHash }; + + uint64_t hash = 0xecb7cbaa66bccde0LL + + geographic_msgs::GeoPoint::_computeHash(&cp) + + geographic_msgs::GeoPoint::_computeHash(&cp); + + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/geographic_msgs/GeoPath.hpp b/generated/cpp_lcm_msgs/geographic_msgs/GeoPath.hpp new file mode 100644 index 0000000..6111144 --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/GeoPath.hpp @@ -0,0 +1,192 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_GeoPath_hpp__ +#define __geographic_msgs_GeoPath_hpp__ + +#include + +#include +#include "std_msgs/Header.hpp" +#include "geographic_msgs/GeoPoseStamped.hpp" + +namespace geographic_msgs +{ + +class GeoPath +{ + public: + int32_t poses_length; + + std_msgs::Header header; + + /** + * LCM Type: geographic_msgs.GeoPoseStamped[poses_length] + */ + std::vector< geographic_msgs::GeoPoseStamped > poses; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "GeoPath" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int GeoPath::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPath::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int GeoPath::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t GeoPath::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* GeoPath::getTypeName() +{ + return "GeoPath"; +} + +int GeoPath::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &this->poses_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->header._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + for (int a0 = 0; a0 < this->poses_length; a0++) { + tlen = this->poses[a0]._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int GeoPath::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &this->poses_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->header._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + try { + this->poses.resize(this->poses_length); + } catch (...) { + return -1; + } + for (int a0 = 0; a0 < this->poses_length; a0++) { + tlen = this->poses[a0]._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int GeoPath::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += __int32_t_encoded_array_size(NULL, 1); + enc_size += this->header._getEncodedSizeNoHash(); + for (int a0 = 0; a0 < this->poses_length; a0++) { + enc_size += this->poses[a0]._getEncodedSizeNoHash(); + } + return enc_size; +} + +uint64_t GeoPath::_computeHash(const __lcm_hash_ptr *p) +{ + const __lcm_hash_ptr *fp; + for(fp = p; fp != NULL; fp = fp->parent) + if(fp->v == GeoPath::getHash) + return 0; + const __lcm_hash_ptr cp = { p, GeoPath::getHash }; + + uint64_t hash = 0xc779b6acc503055aLL + + std_msgs::Header::_computeHash(&cp) + + geographic_msgs::GeoPoseStamped::_computeHash(&cp); + + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/geographic_msgs/GeoPoint.hpp b/generated/cpp_lcm_msgs/geographic_msgs/GeoPoint.hpp new file mode 100644 index 0000000..0ebc1d0 --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/GeoPoint.hpp @@ -0,0 +1,166 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_GeoPoint_hpp__ +#define __geographic_msgs_GeoPoint_hpp__ + +#include + + +namespace geographic_msgs +{ + +class GeoPoint +{ + public: + double latitude; + + double longitude; + + double altitude; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "GeoPoint" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int GeoPoint::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPoint::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int GeoPoint::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t GeoPoint::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* GeoPoint::getTypeName() +{ + return "GeoPoint"; +} + +int GeoPoint::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = __double_encode_array(buf, offset + pos, maxlen - pos, &this->latitude, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __double_encode_array(buf, offset + pos, maxlen - pos, &this->longitude, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __double_encode_array(buf, offset + pos, maxlen - pos, &this->altitude, 1); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPoint::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = __double_decode_array(buf, offset + pos, maxlen - pos, &this->latitude, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __double_decode_array(buf, offset + pos, maxlen - pos, &this->longitude, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __double_decode_array(buf, offset + pos, maxlen - pos, &this->altitude, 1); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPoint::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += __double_encoded_array_size(NULL, 1); + enc_size += __double_encoded_array_size(NULL, 1); + enc_size += __double_encoded_array_size(NULL, 1); + return enc_size; +} + +uint64_t GeoPoint::_computeHash(const __lcm_hash_ptr *) +{ + uint64_t hash = 0xb84ee2b89179c84eLL; + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/geographic_msgs/GeoPointStamped.hpp b/generated/cpp_lcm_msgs/geographic_msgs/GeoPointStamped.hpp new file mode 100644 index 0000000..710acd7 --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/GeoPointStamped.hpp @@ -0,0 +1,168 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_GeoPointStamped_hpp__ +#define __geographic_msgs_GeoPointStamped_hpp__ + +#include + +#include "std_msgs/Header.hpp" +#include "geographic_msgs/GeoPoint.hpp" + +namespace geographic_msgs +{ + +class GeoPointStamped +{ + public: + std_msgs::Header header; + + geographic_msgs::GeoPoint position; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "GeoPointStamped" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int GeoPointStamped::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPointStamped::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int GeoPointStamped::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t GeoPointStamped::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* GeoPointStamped::getTypeName() +{ + return "GeoPointStamped"; +} + +int GeoPointStamped::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = this->header._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->position._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPointStamped::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = this->header._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->position._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPointStamped::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += this->header._getEncodedSizeNoHash(); + enc_size += this->position._getEncodedSizeNoHash(); + return enc_size; +} + +uint64_t GeoPointStamped::_computeHash(const __lcm_hash_ptr *p) +{ + const __lcm_hash_ptr *fp; + for(fp = p; fp != NULL; fp = fp->parent) + if(fp->v == GeoPointStamped::getHash) + return 0; + const __lcm_hash_ptr cp = { p, GeoPointStamped::getHash }; + + uint64_t hash = 0x3a3685292ab14382LL + + std_msgs::Header::_computeHash(&cp) + + geographic_msgs::GeoPoint::_computeHash(&cp); + + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/geographic_msgs/GeoPose.hpp b/generated/cpp_lcm_msgs/geographic_msgs/GeoPose.hpp new file mode 100644 index 0000000..e2456a1 --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/GeoPose.hpp @@ -0,0 +1,168 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_GeoPose_hpp__ +#define __geographic_msgs_GeoPose_hpp__ + +#include + +#include "geographic_msgs/GeoPoint.hpp" +#include "geometry_msgs/Quaternion.hpp" + +namespace geographic_msgs +{ + +class GeoPose +{ + public: + geographic_msgs::GeoPoint position; + + geometry_msgs::Quaternion orientation; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "GeoPose" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int GeoPose::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPose::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int GeoPose::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t GeoPose::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* GeoPose::getTypeName() +{ + return "GeoPose"; +} + +int GeoPose::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = this->position._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->orientation._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPose::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = this->position._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->orientation._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPose::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += this->position._getEncodedSizeNoHash(); + enc_size += this->orientation._getEncodedSizeNoHash(); + return enc_size; +} + +uint64_t GeoPose::_computeHash(const __lcm_hash_ptr *p) +{ + const __lcm_hash_ptr *fp; + for(fp = p; fp != NULL; fp = fp->parent) + if(fp->v == GeoPose::getHash) + return 0; + const __lcm_hash_ptr cp = { p, GeoPose::getHash }; + + uint64_t hash = 0x2d70dd60bd541272LL + + geographic_msgs::GeoPoint::_computeHash(&cp) + + geometry_msgs::Quaternion::_computeHash(&cp); + + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/geographic_msgs/GeoPoseStamped.hpp b/generated/cpp_lcm_msgs/geographic_msgs/GeoPoseStamped.hpp new file mode 100644 index 0000000..0679e7b --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/GeoPoseStamped.hpp @@ -0,0 +1,168 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_GeoPoseStamped_hpp__ +#define __geographic_msgs_GeoPoseStamped_hpp__ + +#include + +#include "std_msgs/Header.hpp" +#include "geographic_msgs/GeoPose.hpp" + +namespace geographic_msgs +{ + +class GeoPoseStamped +{ + public: + std_msgs::Header header; + + geographic_msgs::GeoPose pose; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "GeoPoseStamped" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int GeoPoseStamped::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPoseStamped::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int GeoPoseStamped::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t GeoPoseStamped::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* GeoPoseStamped::getTypeName() +{ + return "GeoPoseStamped"; +} + +int GeoPoseStamped::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = this->header._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->pose._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPoseStamped::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = this->header._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->pose._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPoseStamped::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += this->header._getEncodedSizeNoHash(); + enc_size += this->pose._getEncodedSizeNoHash(); + return enc_size; +} + +uint64_t GeoPoseStamped::_computeHash(const __lcm_hash_ptr *p) +{ + const __lcm_hash_ptr *fp; + for(fp = p; fp != NULL; fp = fp->parent) + if(fp->v == GeoPoseStamped::getHash) + return 0; + const __lcm_hash_ptr cp = { p, GeoPoseStamped::getHash }; + + uint64_t hash = 0xe10feebec5c97663LL + + std_msgs::Header::_computeHash(&cp) + + geographic_msgs::GeoPose::_computeHash(&cp); + + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/geographic_msgs/GeoPoseWithCovariance.hpp b/generated/cpp_lcm_msgs/geographic_msgs/GeoPoseWithCovariance.hpp new file mode 100644 index 0000000..f00424b --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/GeoPoseWithCovariance.hpp @@ -0,0 +1,169 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_GeoPoseWithCovariance_hpp__ +#define __geographic_msgs_GeoPoseWithCovariance_hpp__ + +#include + +#include "geographic_msgs/GeoPose.hpp" + +namespace geographic_msgs +{ + +class GeoPoseWithCovariance +{ + public: + geographic_msgs::GeoPose pose; + + /** + * LCM Type: double[36] + */ + double covariance[36]; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "GeoPoseWithCovariance" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int GeoPoseWithCovariance::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPoseWithCovariance::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int GeoPoseWithCovariance::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t GeoPoseWithCovariance::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* GeoPoseWithCovariance::getTypeName() +{ + return "GeoPoseWithCovariance"; +} + +int GeoPoseWithCovariance::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = this->pose._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __double_encode_array(buf, offset + pos, maxlen - pos, &this->covariance[0], 36); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPoseWithCovariance::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = this->pose._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __double_decode_array(buf, offset + pos, maxlen - pos, &this->covariance[0], 36); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPoseWithCovariance::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += this->pose._getEncodedSizeNoHash(); + enc_size += __double_encoded_array_size(NULL, 36); + return enc_size; +} + +uint64_t GeoPoseWithCovariance::_computeHash(const __lcm_hash_ptr *p) +{ + const __lcm_hash_ptr *fp; + for(fp = p; fp != NULL; fp = fp->parent) + if(fp->v == GeoPoseWithCovariance::getHash) + return 0; + const __lcm_hash_ptr cp = { p, GeoPoseWithCovariance::getHash }; + + uint64_t hash = 0x42dbdfaa69371237LL + + geographic_msgs::GeoPose::_computeHash(&cp); + + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.hpp b/generated/cpp_lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.hpp new file mode 100644 index 0000000..299f820 --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.hpp @@ -0,0 +1,168 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_GeoPoseWithCovarianceStamped_hpp__ +#define __geographic_msgs_GeoPoseWithCovarianceStamped_hpp__ + +#include + +#include "std_msgs/Header.hpp" +#include "geographic_msgs/GeoPoseWithCovariance.hpp" + +namespace geographic_msgs +{ + +class GeoPoseWithCovarianceStamped +{ + public: + std_msgs::Header header; + + geographic_msgs::GeoPoseWithCovariance pose; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "GeoPoseWithCovarianceStamped" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int GeoPoseWithCovarianceStamped::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPoseWithCovarianceStamped::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int GeoPoseWithCovarianceStamped::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t GeoPoseWithCovarianceStamped::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* GeoPoseWithCovarianceStamped::getTypeName() +{ + return "GeoPoseWithCovarianceStamped"; +} + +int GeoPoseWithCovarianceStamped::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = this->header._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->pose._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPoseWithCovarianceStamped::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = this->header._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->pose._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeoPoseWithCovarianceStamped::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += this->header._getEncodedSizeNoHash(); + enc_size += this->pose._getEncodedSizeNoHash(); + return enc_size; +} + +uint64_t GeoPoseWithCovarianceStamped::_computeHash(const __lcm_hash_ptr *p) +{ + const __lcm_hash_ptr *fp; + for(fp = p; fp != NULL; fp = fp->parent) + if(fp->v == GeoPoseWithCovarianceStamped::getHash) + return 0; + const __lcm_hash_ptr cp = { p, GeoPoseWithCovarianceStamped::getHash }; + + uint64_t hash = 0xe10feebec5c97663LL + + std_msgs::Header::_computeHash(&cp) + + geographic_msgs::GeoPoseWithCovariance::_computeHash(&cp); + + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/geographic_msgs/GeographicMap.hpp b/generated/cpp_lcm_msgs/geographic_msgs/GeographicMap.hpp new file mode 100644 index 0000000..75d2734 --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/GeographicMap.hpp @@ -0,0 +1,282 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_GeographicMap_hpp__ +#define __geographic_msgs_GeographicMap_hpp__ + +#include + +#include +#include "std_msgs/Header.hpp" +#include "uuid_msgs/UniqueID.hpp" +#include "geographic_msgs/BoundingBox.hpp" +#include "geographic_msgs/WayPoint.hpp" +#include "geographic_msgs/MapFeature.hpp" +#include "geographic_msgs/KeyValue.hpp" + +namespace geographic_msgs +{ + +class GeographicMap +{ + public: + int32_t points_length; + + int32_t features_length; + + int32_t props_length; + + std_msgs::Header header; + + uuid_msgs::UniqueID id; + + geographic_msgs::BoundingBox bounds; + + /** + * LCM Type: geographic_msgs.WayPoint[points_length] + */ + std::vector< geographic_msgs::WayPoint > points; + + /** + * LCM Type: geographic_msgs.MapFeature[features_length] + */ + std::vector< geographic_msgs::MapFeature > features; + + /** + * LCM Type: geographic_msgs.KeyValue[props_length] + */ + std::vector< geographic_msgs::KeyValue > props; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "GeographicMap" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int GeographicMap::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeographicMap::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int GeographicMap::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t GeographicMap::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* GeographicMap::getTypeName() +{ + return "GeographicMap"; +} + +int GeographicMap::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &this->points_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &this->features_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &this->props_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->header._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->id._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->bounds._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + for (int a0 = 0; a0 < this->points_length; a0++) { + tlen = this->points[a0]._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + for (int a0 = 0; a0 < this->features_length; a0++) { + tlen = this->features[a0]._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + for (int a0 = 0; a0 < this->props_length; a0++) { + tlen = this->props[a0]._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int GeographicMap::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &this->points_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &this->features_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &this->props_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->header._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->id._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->bounds._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + try { + this->points.resize(this->points_length); + } catch (...) { + return -1; + } + for (int a0 = 0; a0 < this->points_length; a0++) { + tlen = this->points[a0]._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + try { + this->features.resize(this->features_length); + } catch (...) { + return -1; + } + for (int a0 = 0; a0 < this->features_length; a0++) { + tlen = this->features[a0]._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + try { + this->props.resize(this->props_length); + } catch (...) { + return -1; + } + for (int a0 = 0; a0 < this->props_length; a0++) { + tlen = this->props[a0]._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int GeographicMap::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += __int32_t_encoded_array_size(NULL, 1); + enc_size += __int32_t_encoded_array_size(NULL, 1); + enc_size += __int32_t_encoded_array_size(NULL, 1); + enc_size += this->header._getEncodedSizeNoHash(); + enc_size += this->id._getEncodedSizeNoHash(); + enc_size += this->bounds._getEncodedSizeNoHash(); + for (int a0 = 0; a0 < this->points_length; a0++) { + enc_size += this->points[a0]._getEncodedSizeNoHash(); + } + for (int a0 = 0; a0 < this->features_length; a0++) { + enc_size += this->features[a0]._getEncodedSizeNoHash(); + } + for (int a0 = 0; a0 < this->props_length; a0++) { + enc_size += this->props[a0]._getEncodedSizeNoHash(); + } + return enc_size; +} + +uint64_t GeographicMap::_computeHash(const __lcm_hash_ptr *p) +{ + const __lcm_hash_ptr *fp; + for(fp = p; fp != NULL; fp = fp->parent) + if(fp->v == GeographicMap::getHash) + return 0; + const __lcm_hash_ptr cp = { p, GeographicMap::getHash }; + + uint64_t hash = 0xb24465d7d9841c65LL + + std_msgs::Header::_computeHash(&cp) + + uuid_msgs::UniqueID::_computeHash(&cp) + + geographic_msgs::BoundingBox::_computeHash(&cp) + + geographic_msgs::WayPoint::_computeHash(&cp) + + geographic_msgs::MapFeature::_computeHash(&cp) + + geographic_msgs::KeyValue::_computeHash(&cp); + + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/geographic_msgs/GeographicMapChanges.hpp b/generated/cpp_lcm_msgs/geographic_msgs/GeographicMapChanges.hpp new file mode 100644 index 0000000..e1dbf83 --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/GeographicMapChanges.hpp @@ -0,0 +1,203 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_GeographicMapChanges_hpp__ +#define __geographic_msgs_GeographicMapChanges_hpp__ + +#include + +#include +#include "std_msgs/Header.hpp" +#include "geographic_msgs/GeographicMap.hpp" +#include "uuid_msgs/UniqueID.hpp" + +namespace geographic_msgs +{ + +class GeographicMapChanges +{ + public: + int32_t deletes_length; + + std_msgs::Header header; + + geographic_msgs::GeographicMap diffs; + + /** + * LCM Type: uuid_msgs.UniqueID[deletes_length] + */ + std::vector< uuid_msgs::UniqueID > deletes; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "GeographicMapChanges" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int GeographicMapChanges::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int GeographicMapChanges::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int GeographicMapChanges::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t GeographicMapChanges::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* GeographicMapChanges::getTypeName() +{ + return "GeographicMapChanges"; +} + +int GeographicMapChanges::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &this->deletes_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->header._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->diffs._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + for (int a0 = 0; a0 < this->deletes_length; a0++) { + tlen = this->deletes[a0]._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int GeographicMapChanges::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &this->deletes_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->header._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->diffs._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + try { + this->deletes.resize(this->deletes_length); + } catch (...) { + return -1; + } + for (int a0 = 0; a0 < this->deletes_length; a0++) { + tlen = this->deletes[a0]._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int GeographicMapChanges::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += __int32_t_encoded_array_size(NULL, 1); + enc_size += this->header._getEncodedSizeNoHash(); + enc_size += this->diffs._getEncodedSizeNoHash(); + for (int a0 = 0; a0 < this->deletes_length; a0++) { + enc_size += this->deletes[a0]._getEncodedSizeNoHash(); + } + return enc_size; +} + +uint64_t GeographicMapChanges::_computeHash(const __lcm_hash_ptr *p) +{ + const __lcm_hash_ptr *fp; + for(fp = p; fp != NULL; fp = fp->parent) + if(fp->v == GeographicMapChanges::getHash) + return 0; + const __lcm_hash_ptr cp = { p, GeographicMapChanges::getHash }; + + uint64_t hash = 0x5d92adbb4d9db2cbLL + + std_msgs::Header::_computeHash(&cp) + + geographic_msgs::GeographicMap::_computeHash(&cp) + + uuid_msgs::UniqueID::_computeHash(&cp); + + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/geographic_msgs/KeyValue.hpp b/generated/cpp_lcm_msgs/geographic_msgs/KeyValue.hpp new file mode 100644 index 0000000..7682d7a --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/KeyValue.hpp @@ -0,0 +1,174 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_KeyValue_hpp__ +#define __geographic_msgs_KeyValue_hpp__ + +#include + +#include + +namespace geographic_msgs +{ + +class KeyValue +{ + public: + std::string key; + + std::string value; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "KeyValue" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int KeyValue::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int KeyValue::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int KeyValue::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t KeyValue::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* KeyValue::getTypeName() +{ + return "KeyValue"; +} + +int KeyValue::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + char* key_cstr = const_cast(this->key.c_str()); + tlen = __string_encode_array( + buf, offset + pos, maxlen - pos, &key_cstr, 1); + if(tlen < 0) return tlen; else pos += tlen; + + char* value_cstr = const_cast(this->value.c_str()); + tlen = __string_encode_array( + buf, offset + pos, maxlen - pos, &value_cstr, 1); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int KeyValue::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + int32_t __key_len__; + tlen = __int32_t_decode_array( + buf, offset + pos, maxlen - pos, &__key_len__, 1); + if(tlen < 0) return tlen; else pos += tlen; + if(__key_len__ > maxlen - pos) return -1; + this->key.assign( + static_cast(buf) + offset + pos, __key_len__ - 1); + pos += __key_len__; + + int32_t __value_len__; + tlen = __int32_t_decode_array( + buf, offset + pos, maxlen - pos, &__value_len__, 1); + if(tlen < 0) return tlen; else pos += tlen; + if(__value_len__ > maxlen - pos) return -1; + this->value.assign( + static_cast(buf) + offset + pos, __value_len__ - 1); + pos += __value_len__; + + return pos; +} + +int KeyValue::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += this->key.size() + 4 + 1; + enc_size += this->value.size() + 4 + 1; + return enc_size; +} + +uint64_t KeyValue::_computeHash(const __lcm_hash_ptr *) +{ + uint64_t hash = 0x97574015d52eeddeLL; + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/geographic_msgs/MapFeature.hpp b/generated/cpp_lcm_msgs/geographic_msgs/MapFeature.hpp new file mode 100644 index 0000000..22b7dd8 --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/MapFeature.hpp @@ -0,0 +1,226 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_MapFeature_hpp__ +#define __geographic_msgs_MapFeature_hpp__ + +#include + +#include +#include "uuid_msgs/UniqueID.hpp" +#include "uuid_msgs/UniqueID.hpp" +#include "geographic_msgs/KeyValue.hpp" + +namespace geographic_msgs +{ + +class MapFeature +{ + public: + int32_t components_length; + + int32_t props_length; + + uuid_msgs::UniqueID id; + + /** + * LCM Type: uuid_msgs.UniqueID[components_length] + */ + std::vector< uuid_msgs::UniqueID > components; + + /** + * LCM Type: geographic_msgs.KeyValue[props_length] + */ + std::vector< geographic_msgs::KeyValue > props; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "MapFeature" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int MapFeature::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int MapFeature::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int MapFeature::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t MapFeature::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* MapFeature::getTypeName() +{ + return "MapFeature"; +} + +int MapFeature::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &this->components_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &this->props_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->id._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + for (int a0 = 0; a0 < this->components_length; a0++) { + tlen = this->components[a0]._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + for (int a0 = 0; a0 < this->props_length; a0++) { + tlen = this->props[a0]._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int MapFeature::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &this->components_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &this->props_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->id._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + try { + this->components.resize(this->components_length); + } catch (...) { + return -1; + } + for (int a0 = 0; a0 < this->components_length; a0++) { + tlen = this->components[a0]._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + try { + this->props.resize(this->props_length); + } catch (...) { + return -1; + } + for (int a0 = 0; a0 < this->props_length; a0++) { + tlen = this->props[a0]._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int MapFeature::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += __int32_t_encoded_array_size(NULL, 1); + enc_size += __int32_t_encoded_array_size(NULL, 1); + enc_size += this->id._getEncodedSizeNoHash(); + for (int a0 = 0; a0 < this->components_length; a0++) { + enc_size += this->components[a0]._getEncodedSizeNoHash(); + } + for (int a0 = 0; a0 < this->props_length; a0++) { + enc_size += this->props[a0]._getEncodedSizeNoHash(); + } + return enc_size; +} + +uint64_t MapFeature::_computeHash(const __lcm_hash_ptr *p) +{ + const __lcm_hash_ptr *fp; + for(fp = p; fp != NULL; fp = fp->parent) + if(fp->v == MapFeature::getHash) + return 0; + const __lcm_hash_ptr cp = { p, MapFeature::getHash }; + + uint64_t hash = 0x75975993f8dd2d22LL + + uuid_msgs::UniqueID::_computeHash(&cp) + + uuid_msgs::UniqueID::_computeHash(&cp) + + geographic_msgs::KeyValue::_computeHash(&cp); + + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/geographic_msgs/RouteNetwork.hpp b/generated/cpp_lcm_msgs/geographic_msgs/RouteNetwork.hpp new file mode 100644 index 0000000..c235caa --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/RouteNetwork.hpp @@ -0,0 +1,282 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_RouteNetwork_hpp__ +#define __geographic_msgs_RouteNetwork_hpp__ + +#include + +#include +#include "std_msgs/Header.hpp" +#include "uuid_msgs/UniqueID.hpp" +#include "geographic_msgs/BoundingBox.hpp" +#include "geographic_msgs/WayPoint.hpp" +#include "geographic_msgs/RouteSegment.hpp" +#include "geographic_msgs/KeyValue.hpp" + +namespace geographic_msgs +{ + +class RouteNetwork +{ + public: + int32_t points_length; + + int32_t segments_length; + + int32_t props_length; + + std_msgs::Header header; + + uuid_msgs::UniqueID id; + + geographic_msgs::BoundingBox bounds; + + /** + * LCM Type: geographic_msgs.WayPoint[points_length] + */ + std::vector< geographic_msgs::WayPoint > points; + + /** + * LCM Type: geographic_msgs.RouteSegment[segments_length] + */ + std::vector< geographic_msgs::RouteSegment > segments; + + /** + * LCM Type: geographic_msgs.KeyValue[props_length] + */ + std::vector< geographic_msgs::KeyValue > props; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "RouteNetwork" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int RouteNetwork::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int RouteNetwork::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int RouteNetwork::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t RouteNetwork::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* RouteNetwork::getTypeName() +{ + return "RouteNetwork"; +} + +int RouteNetwork::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &this->points_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &this->segments_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &this->props_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->header._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->id._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->bounds._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + for (int a0 = 0; a0 < this->points_length; a0++) { + tlen = this->points[a0]._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + for (int a0 = 0; a0 < this->segments_length; a0++) { + tlen = this->segments[a0]._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + for (int a0 = 0; a0 < this->props_length; a0++) { + tlen = this->props[a0]._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int RouteNetwork::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &this->points_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &this->segments_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &this->props_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->header._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->id._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->bounds._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + try { + this->points.resize(this->points_length); + } catch (...) { + return -1; + } + for (int a0 = 0; a0 < this->points_length; a0++) { + tlen = this->points[a0]._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + try { + this->segments.resize(this->segments_length); + } catch (...) { + return -1; + } + for (int a0 = 0; a0 < this->segments_length; a0++) { + tlen = this->segments[a0]._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + try { + this->props.resize(this->props_length); + } catch (...) { + return -1; + } + for (int a0 = 0; a0 < this->props_length; a0++) { + tlen = this->props[a0]._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int RouteNetwork::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += __int32_t_encoded_array_size(NULL, 1); + enc_size += __int32_t_encoded_array_size(NULL, 1); + enc_size += __int32_t_encoded_array_size(NULL, 1); + enc_size += this->header._getEncodedSizeNoHash(); + enc_size += this->id._getEncodedSizeNoHash(); + enc_size += this->bounds._getEncodedSizeNoHash(); + for (int a0 = 0; a0 < this->points_length; a0++) { + enc_size += this->points[a0]._getEncodedSizeNoHash(); + } + for (int a0 = 0; a0 < this->segments_length; a0++) { + enc_size += this->segments[a0]._getEncodedSizeNoHash(); + } + for (int a0 = 0; a0 < this->props_length; a0++) { + enc_size += this->props[a0]._getEncodedSizeNoHash(); + } + return enc_size; +} + +uint64_t RouteNetwork::_computeHash(const __lcm_hash_ptr *p) +{ + const __lcm_hash_ptr *fp; + for(fp = p; fp != NULL; fp = fp->parent) + if(fp->v == RouteNetwork::getHash) + return 0; + const __lcm_hash_ptr cp = { p, RouteNetwork::getHash }; + + uint64_t hash = 0xf50b14f90fc9a672LL + + std_msgs::Header::_computeHash(&cp) + + uuid_msgs::UniqueID::_computeHash(&cp) + + geographic_msgs::BoundingBox::_computeHash(&cp) + + geographic_msgs::WayPoint::_computeHash(&cp) + + geographic_msgs::RouteSegment::_computeHash(&cp) + + geographic_msgs::KeyValue::_computeHash(&cp); + + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/geographic_msgs/RoutePath.hpp b/generated/cpp_lcm_msgs/geographic_msgs/RoutePath.hpp new file mode 100644 index 0000000..58bfb0a --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/RoutePath.hpp @@ -0,0 +1,237 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_RoutePath_hpp__ +#define __geographic_msgs_RoutePath_hpp__ + +#include + +#include +#include "std_msgs/Header.hpp" +#include "uuid_msgs/UniqueID.hpp" +#include "uuid_msgs/UniqueID.hpp" +#include "geographic_msgs/KeyValue.hpp" + +namespace geographic_msgs +{ + +class RoutePath +{ + public: + int32_t segments_length; + + int32_t props_length; + + std_msgs::Header header; + + uuid_msgs::UniqueID network; + + /** + * LCM Type: uuid_msgs.UniqueID[segments_length] + */ + std::vector< uuid_msgs::UniqueID > segments; + + /** + * LCM Type: geographic_msgs.KeyValue[props_length] + */ + std::vector< geographic_msgs::KeyValue > props; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "RoutePath" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int RoutePath::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int RoutePath::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int RoutePath::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t RoutePath::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* RoutePath::getTypeName() +{ + return "RoutePath"; +} + +int RoutePath::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &this->segments_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &this->props_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->header._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->network._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + for (int a0 = 0; a0 < this->segments_length; a0++) { + tlen = this->segments[a0]._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + for (int a0 = 0; a0 < this->props_length; a0++) { + tlen = this->props[a0]._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int RoutePath::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &this->segments_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &this->props_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->header._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->network._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + try { + this->segments.resize(this->segments_length); + } catch (...) { + return -1; + } + for (int a0 = 0; a0 < this->segments_length; a0++) { + tlen = this->segments[a0]._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + try { + this->props.resize(this->props_length); + } catch (...) { + return -1; + } + for (int a0 = 0; a0 < this->props_length; a0++) { + tlen = this->props[a0]._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int RoutePath::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += __int32_t_encoded_array_size(NULL, 1); + enc_size += __int32_t_encoded_array_size(NULL, 1); + enc_size += this->header._getEncodedSizeNoHash(); + enc_size += this->network._getEncodedSizeNoHash(); + for (int a0 = 0; a0 < this->segments_length; a0++) { + enc_size += this->segments[a0]._getEncodedSizeNoHash(); + } + for (int a0 = 0; a0 < this->props_length; a0++) { + enc_size += this->props[a0]._getEncodedSizeNoHash(); + } + return enc_size; +} + +uint64_t RoutePath::_computeHash(const __lcm_hash_ptr *p) +{ + const __lcm_hash_ptr *fp; + for(fp = p; fp != NULL; fp = fp->parent) + if(fp->v == RoutePath::getHash) + return 0; + const __lcm_hash_ptr cp = { p, RoutePath::getHash }; + + uint64_t hash = 0x2f0bab3ed05e12c3LL + + std_msgs::Header::_computeHash(&cp) + + uuid_msgs::UniqueID::_computeHash(&cp) + + uuid_msgs::UniqueID::_computeHash(&cp) + + geographic_msgs::KeyValue::_computeHash(&cp); + + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/geographic_msgs/RouteSegment.hpp b/generated/cpp_lcm_msgs/geographic_msgs/RouteSegment.hpp new file mode 100644 index 0000000..a6b653e --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/RouteSegment.hpp @@ -0,0 +1,214 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_RouteSegment_hpp__ +#define __geographic_msgs_RouteSegment_hpp__ + +#include + +#include +#include "uuid_msgs/UniqueID.hpp" +#include "uuid_msgs/UniqueID.hpp" +#include "uuid_msgs/UniqueID.hpp" +#include "geographic_msgs/KeyValue.hpp" + +namespace geographic_msgs +{ + +class RouteSegment +{ + public: + int32_t props_length; + + uuid_msgs::UniqueID id; + + uuid_msgs::UniqueID start; + + uuid_msgs::UniqueID end; + + /** + * LCM Type: geographic_msgs.KeyValue[props_length] + */ + std::vector< geographic_msgs::KeyValue > props; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "RouteSegment" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int RouteSegment::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int RouteSegment::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int RouteSegment::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t RouteSegment::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* RouteSegment::getTypeName() +{ + return "RouteSegment"; +} + +int RouteSegment::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &this->props_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->id._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->start._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->end._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + for (int a0 = 0; a0 < this->props_length; a0++) { + tlen = this->props[a0]._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int RouteSegment::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &this->props_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->id._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->start._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->end._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + try { + this->props.resize(this->props_length); + } catch (...) { + return -1; + } + for (int a0 = 0; a0 < this->props_length; a0++) { + tlen = this->props[a0]._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int RouteSegment::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += __int32_t_encoded_array_size(NULL, 1); + enc_size += this->id._getEncodedSizeNoHash(); + enc_size += this->start._getEncodedSizeNoHash(); + enc_size += this->end._getEncodedSizeNoHash(); + for (int a0 = 0; a0 < this->props_length; a0++) { + enc_size += this->props[a0]._getEncodedSizeNoHash(); + } + return enc_size; +} + +uint64_t RouteSegment::_computeHash(const __lcm_hash_ptr *p) +{ + const __lcm_hash_ptr *fp; + for(fp = p; fp != NULL; fp = fp->parent) + if(fp->v == RouteSegment::getHash) + return 0; + const __lcm_hash_ptr cp = { p, RouteSegment::getHash }; + + uint64_t hash = 0x2757afe165f2b650LL + + uuid_msgs::UniqueID::_computeHash(&cp) + + uuid_msgs::UniqueID::_computeHash(&cp) + + uuid_msgs::UniqueID::_computeHash(&cp) + + geographic_msgs::KeyValue::_computeHash(&cp); + + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/geographic_msgs/WayPoint.hpp b/generated/cpp_lcm_msgs/geographic_msgs/WayPoint.hpp new file mode 100644 index 0000000..f77034c --- /dev/null +++ b/generated/cpp_lcm_msgs/geographic_msgs/WayPoint.hpp @@ -0,0 +1,203 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __geographic_msgs_WayPoint_hpp__ +#define __geographic_msgs_WayPoint_hpp__ + +#include + +#include +#include "uuid_msgs/UniqueID.hpp" +#include "geographic_msgs/GeoPoint.hpp" +#include "geographic_msgs/KeyValue.hpp" + +namespace geographic_msgs +{ + +class WayPoint +{ + public: + int32_t props_length; + + uuid_msgs::UniqueID id; + + geographic_msgs::GeoPoint position; + + /** + * LCM Type: geographic_msgs.KeyValue[props_length] + */ + std::vector< geographic_msgs::KeyValue > props; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "WayPoint" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int WayPoint::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int WayPoint::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int WayPoint::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t WayPoint::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* WayPoint::getTypeName() +{ + return "WayPoint"; +} + +int WayPoint::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = __int32_t_encode_array(buf, offset + pos, maxlen - pos, &this->props_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->id._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->position._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + for (int a0 = 0; a0 < this->props_length; a0++) { + tlen = this->props[a0]._encodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int WayPoint::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = __int32_t_decode_array(buf, offset + pos, maxlen - pos, &this->props_length, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->id._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->position._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + + try { + this->props.resize(this->props_length); + } catch (...) { + return -1; + } + for (int a0 = 0; a0 < this->props_length; a0++) { + tlen = this->props[a0]._decodeNoHash(buf, offset + pos, maxlen - pos); + if(tlen < 0) return tlen; else pos += tlen; + } + + return pos; +} + +int WayPoint::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += __int32_t_encoded_array_size(NULL, 1); + enc_size += this->id._getEncodedSizeNoHash(); + enc_size += this->position._getEncodedSizeNoHash(); + for (int a0 = 0; a0 < this->props_length; a0++) { + enc_size += this->props[a0]._getEncodedSizeNoHash(); + } + return enc_size; +} + +uint64_t WayPoint::_computeHash(const __lcm_hash_ptr *p) +{ + const __lcm_hash_ptr *fp; + for(fp = p; fp != NULL; fp = fp->parent) + if(fp->v == WayPoint::getHash) + return 0; + const __lcm_hash_ptr cp = { p, WayPoint::getHash }; + + uint64_t hash = 0xd32d71d9c391bc8fLL + + uuid_msgs::UniqueID::_computeHash(&cp) + + geographic_msgs::GeoPoint::_computeHash(&cp) + + geographic_msgs::KeyValue::_computeHash(&cp); + + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cpp_lcm_msgs/uuid_msgs/UniqueID.hpp b/generated/cpp_lcm_msgs/uuid_msgs/UniqueID.hpp new file mode 100644 index 0000000..ab698e4 --- /dev/null +++ b/generated/cpp_lcm_msgs/uuid_msgs/UniqueID.hpp @@ -0,0 +1,151 @@ +/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY + * BY HAND!! + * + * Generated by lcm-gen 1.5.2 + **/ + +#ifndef __uuid_msgs_UniqueID_hpp__ +#define __uuid_msgs_UniqueID_hpp__ + +#include + + +namespace uuid_msgs +{ + +class UniqueID +{ + public: + /** + * LCM Type: byte[16] + */ + uint8_t uuid[16]; + + public: + /** + * Encode a message into binary form. + * + * @param buf The output buffer. + * @param offset Encoding starts at thie byte offset into @p buf. + * @param maxlen Maximum number of bytes to write. This should generally be + * equal to getEncodedSize(). + * @return The number of bytes encoded, or <0 on error. + */ + inline int encode(void *buf, int offset, int maxlen) const; + + /** + * Check how many bytes are required to encode this message. + */ + inline int getEncodedSize() const; + + /** + * Decode a message from binary form into this instance. + * + * @param buf The buffer containing the encoded message. + * @param offset The byte offset into @p buf where the encoded message starts. + * @param maxlen The maximum number of bytes to read while decoding. + * @return The number of bytes decoded, or <0 if an error occured. + */ + inline int decode(const void *buf, int offset, int maxlen); + + /** + * Retrieve the 64-bit fingerprint identifying the structure of the message. + * Note that the fingerprint is the same for all instances of the same + * message type, and is a fingerprint on the message type definition, not on + * the message contents. + */ + inline static int64_t getHash(); + + /** + * Returns "UniqueID" + */ + inline static const char* getTypeName(); + + // LCM support functions. Users should not call these + inline int _encodeNoHash(void *buf, int offset, int maxlen) const; + inline int _getEncodedSizeNoHash() const; + inline int _decodeNoHash(const void *buf, int offset, int maxlen); + inline static uint64_t _computeHash(const __lcm_hash_ptr *p); +}; + +int UniqueID::encode(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + int64_t hash = getHash(); + + tlen = __int64_t_encode_array(buf, offset + pos, maxlen - pos, &hash, 1); + if(tlen < 0) return tlen; else pos += tlen; + + tlen = this->_encodeNoHash(buf, offset + pos, maxlen - pos); + if (tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int UniqueID::decode(const void *buf, int offset, int maxlen) +{ + int pos = 0, thislen; + + int64_t msg_hash; + thislen = __int64_t_decode_array(buf, offset + pos, maxlen - pos, &msg_hash, 1); + if (thislen < 0) return thislen; else pos += thislen; + if (msg_hash != getHash()) return -1; + + thislen = this->_decodeNoHash(buf, offset + pos, maxlen - pos); + if (thislen < 0) return thislen; else pos += thislen; + + return pos; +} + +int UniqueID::getEncodedSize() const +{ + return 8 + _getEncodedSizeNoHash(); +} + +int64_t UniqueID::getHash() +{ + static int64_t hash = static_cast(_computeHash(NULL)); + return hash; +} + +const char* UniqueID::getTypeName() +{ + return "UniqueID"; +} + +int UniqueID::_encodeNoHash(void *buf, int offset, int maxlen) const +{ + int pos = 0, tlen; + + tlen = __byte_encode_array(buf, offset + pos, maxlen - pos, &this->uuid[0], 16); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int UniqueID::_decodeNoHash(const void *buf, int offset, int maxlen) +{ + int pos = 0, tlen; + + tlen = __byte_decode_array(buf, offset + pos, maxlen - pos, &this->uuid[0], 16); + if(tlen < 0) return tlen; else pos += tlen; + + return pos; +} + +int UniqueID::_getEncodedSizeNoHash() const +{ + int enc_size = 0; + enc_size += __byte_encoded_array_size(NULL, 16); + return enc_size; +} + +uint64_t UniqueID::_computeHash(const __lcm_hash_ptr *) +{ + uint64_t hash = 0x697d4febd3ed5654LL; + return (hash<<1) + ((hash>>63)&1); +} + +} + +#endif diff --git a/generated/cs_lcm_msgs/geographic_msgs/BoundingBox.cs b/generated/cs_lcm_msgs/geographic_msgs/BoundingBox.cs new file mode 100644 index 0000000..72b81e1 --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/BoundingBox.cs @@ -0,0 +1,96 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class BoundingBox : LCM.LCM.LCMEncodable + { + public geographic_msgs.GeoPoint min_pt; + public geographic_msgs.GeoPoint max_pt; + + public BoundingBox() + { + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0xecb7cbaa66bccde0L; + + static BoundingBox() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.BoundingBox")) + return 0L; + + classes.Add("geographic_msgs.BoundingBox"); + ulong hash = LCM_FINGERPRINT_BASE + + geographic_msgs.GeoPoint._hashRecursive(classes) + + geographic_msgs.GeoPoint._hashRecursive(classes) + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + this.min_pt._encodeRecursive(outs); + + this.max_pt._encodeRecursive(outs); + + } + + public BoundingBox(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public BoundingBox(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.BoundingBox _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.BoundingBox o = new geographic_msgs.BoundingBox(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.min_pt = geographic_msgs.GeoPoint._decodeRecursiveFactory(ins); + + this.max_pt = geographic_msgs.GeoPoint._decodeRecursiveFactory(ins); + + } + + public geographic_msgs.BoundingBox Copy() + { + geographic_msgs.BoundingBox outobj = new geographic_msgs.BoundingBox(); + outobj.min_pt = this.min_pt.Copy(); + + outobj.max_pt = this.max_pt.Copy(); + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/geographic_msgs/GeoPath.cs b/generated/cs_lcm_msgs/geographic_msgs/GeoPath.cs new file mode 100644 index 0000000..3fd454b --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/GeoPath.cs @@ -0,0 +1,111 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class GeoPath : LCM.LCM.LCMEncodable + { + public int poses_length; + public std_msgs.Header header; + public geographic_msgs.GeoPoseStamped[] poses; + + public GeoPath() + { + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0xc779b6acc503055aL; + + static GeoPath() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.GeoPath")) + return 0L; + + classes.Add("geographic_msgs.GeoPath"); + ulong hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + geographic_msgs.GeoPoseStamped._hashRecursive(classes) + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + outs.Write(this.poses_length); + + this.header._encodeRecursive(outs); + + for (int a = 0; a < this.poses_length; a++) { + this.poses[a]._encodeRecursive(outs); + } + + } + + public GeoPath(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public GeoPath(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeoPath _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.GeoPath o = new geographic_msgs.GeoPath(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.poses_length = ins.ReadInt32(); + + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.poses = new geographic_msgs.GeoPoseStamped[(int) poses_length]; + for (int a = 0; a < this.poses_length; a++) { + this.poses[a] = geographic_msgs.GeoPoseStamped._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.GeoPath Copy() + { + geographic_msgs.GeoPath outobj = new geographic_msgs.GeoPath(); + outobj.poses_length = this.poses_length; + + outobj.header = this.header.Copy(); + + outobj.poses = new geographic_msgs.GeoPoseStamped[(int) poses_length]; + for (int a = 0; a < this.poses_length; a++) { + outobj.poses[a] = this.poses[a].Copy(); + } + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/geographic_msgs/GeoPoint.cs b/generated/cs_lcm_msgs/geographic_msgs/GeoPoint.cs new file mode 100644 index 0000000..55bd2cb --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/GeoPoint.cs @@ -0,0 +1,101 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class GeoPoint : LCM.LCM.LCMEncodable + { + public double latitude; + public double longitude; + public double altitude; + + public GeoPoint() + { + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0xb84ee2b89179c84eL; + + static GeoPoint() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.GeoPoint")) + return 0L; + + classes.Add("geographic_msgs.GeoPoint"); + ulong hash = LCM_FINGERPRINT_BASE + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + outs.Write(this.latitude); + + outs.Write(this.longitude); + + outs.Write(this.altitude); + + } + + public GeoPoint(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public GeoPoint(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeoPoint _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.GeoPoint o = new geographic_msgs.GeoPoint(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.latitude = ins.ReadDouble(); + + this.longitude = ins.ReadDouble(); + + this.altitude = ins.ReadDouble(); + + } + + public geographic_msgs.GeoPoint Copy() + { + geographic_msgs.GeoPoint outobj = new geographic_msgs.GeoPoint(); + outobj.latitude = this.latitude; + + outobj.longitude = this.longitude; + + outobj.altitude = this.altitude; + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/geographic_msgs/GeoPointStamped.cs b/generated/cs_lcm_msgs/geographic_msgs/GeoPointStamped.cs new file mode 100644 index 0000000..7e86db5 --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/GeoPointStamped.cs @@ -0,0 +1,96 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class GeoPointStamped : LCM.LCM.LCMEncodable + { + public std_msgs.Header header; + public geographic_msgs.GeoPoint position; + + public GeoPointStamped() + { + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0x3a3685292ab14382L; + + static GeoPointStamped() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.GeoPointStamped")) + return 0L; + + classes.Add("geographic_msgs.GeoPointStamped"); + ulong hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + geographic_msgs.GeoPoint._hashRecursive(classes) + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + this.header._encodeRecursive(outs); + + this.position._encodeRecursive(outs); + + } + + public GeoPointStamped(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public GeoPointStamped(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeoPointStamped _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.GeoPointStamped o = new geographic_msgs.GeoPointStamped(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.position = geographic_msgs.GeoPoint._decodeRecursiveFactory(ins); + + } + + public geographic_msgs.GeoPointStamped Copy() + { + geographic_msgs.GeoPointStamped outobj = new geographic_msgs.GeoPointStamped(); + outobj.header = this.header.Copy(); + + outobj.position = this.position.Copy(); + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/geographic_msgs/GeoPose.cs b/generated/cs_lcm_msgs/geographic_msgs/GeoPose.cs new file mode 100644 index 0000000..c0d11ab --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/GeoPose.cs @@ -0,0 +1,96 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class GeoPose : LCM.LCM.LCMEncodable + { + public geographic_msgs.GeoPoint position; + public geometry_msgs.Quaternion orientation; + + public GeoPose() + { + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0x2d70dd60bd541272L; + + static GeoPose() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.GeoPose")) + return 0L; + + classes.Add("geographic_msgs.GeoPose"); + ulong hash = LCM_FINGERPRINT_BASE + + geographic_msgs.GeoPoint._hashRecursive(classes) + + geometry_msgs.Quaternion._hashRecursive(classes) + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + this.position._encodeRecursive(outs); + + this.orientation._encodeRecursive(outs); + + } + + public GeoPose(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public GeoPose(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeoPose _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.GeoPose o = new geographic_msgs.GeoPose(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.position = geographic_msgs.GeoPoint._decodeRecursiveFactory(ins); + + this.orientation = geometry_msgs.Quaternion._decodeRecursiveFactory(ins); + + } + + public geographic_msgs.GeoPose Copy() + { + geographic_msgs.GeoPose outobj = new geographic_msgs.GeoPose(); + outobj.position = this.position.Copy(); + + outobj.orientation = this.orientation.Copy(); + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/geographic_msgs/GeoPoseStamped.cs b/generated/cs_lcm_msgs/geographic_msgs/GeoPoseStamped.cs new file mode 100644 index 0000000..ff3292c --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/GeoPoseStamped.cs @@ -0,0 +1,96 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class GeoPoseStamped : LCM.LCM.LCMEncodable + { + public std_msgs.Header header; + public geographic_msgs.GeoPose pose; + + public GeoPoseStamped() + { + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0xe10feebec5c97663L; + + static GeoPoseStamped() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.GeoPoseStamped")) + return 0L; + + classes.Add("geographic_msgs.GeoPoseStamped"); + ulong hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + geographic_msgs.GeoPose._hashRecursive(classes) + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + this.header._encodeRecursive(outs); + + this.pose._encodeRecursive(outs); + + } + + public GeoPoseStamped(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public GeoPoseStamped(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeoPoseStamped _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.GeoPoseStamped o = new geographic_msgs.GeoPoseStamped(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.pose = geographic_msgs.GeoPose._decodeRecursiveFactory(ins); + + } + + public geographic_msgs.GeoPoseStamped Copy() + { + geographic_msgs.GeoPoseStamped outobj = new geographic_msgs.GeoPoseStamped(); + outobj.header = this.header.Copy(); + + outobj.pose = this.pose.Copy(); + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/geographic_msgs/GeoPoseWithCovariance.cs b/generated/cs_lcm_msgs/geographic_msgs/GeoPoseWithCovariance.cs new file mode 100644 index 0000000..04fd438 --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/GeoPoseWithCovariance.cs @@ -0,0 +1,104 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class GeoPoseWithCovariance : LCM.LCM.LCMEncodable + { + public geographic_msgs.GeoPose pose; + public double[] covariance; + + public GeoPoseWithCovariance() + { + covariance = new double[36]; + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0x42dbdfaa69371237L; + + static GeoPoseWithCovariance() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.GeoPoseWithCovariance")) + return 0L; + + classes.Add("geographic_msgs.GeoPoseWithCovariance"); + ulong hash = LCM_FINGERPRINT_BASE + + geographic_msgs.GeoPose._hashRecursive(classes) + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + this.pose._encodeRecursive(outs); + + for (int a = 0; a < 36; a++) { + outs.Write(this.covariance[a]); + } + + } + + public GeoPoseWithCovariance(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public GeoPoseWithCovariance(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeoPoseWithCovariance _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.GeoPoseWithCovariance o = new geographic_msgs.GeoPoseWithCovariance(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.pose = geographic_msgs.GeoPose._decodeRecursiveFactory(ins); + + this.covariance = new double[(int) 36]; + for (int a = 0; a < 36; a++) { + this.covariance[a] = ins.ReadDouble(); + } + + } + + public geographic_msgs.GeoPoseWithCovariance Copy() + { + geographic_msgs.GeoPoseWithCovariance outobj = new geographic_msgs.GeoPoseWithCovariance(); + outobj.pose = this.pose.Copy(); + + outobj.covariance = new double[(int) 36]; + for (int a = 0; a < 36; a++) { + outobj.covariance[a] = this.covariance[a]; + } + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.cs b/generated/cs_lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.cs new file mode 100644 index 0000000..ff29da8 --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.cs @@ -0,0 +1,96 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class GeoPoseWithCovarianceStamped : LCM.LCM.LCMEncodable + { + public std_msgs.Header header; + public geographic_msgs.GeoPoseWithCovariance pose; + + public GeoPoseWithCovarianceStamped() + { + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0xe10feebec5c97663L; + + static GeoPoseWithCovarianceStamped() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.GeoPoseWithCovarianceStamped")) + return 0L; + + classes.Add("geographic_msgs.GeoPoseWithCovarianceStamped"); + ulong hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + geographic_msgs.GeoPoseWithCovariance._hashRecursive(classes) + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + this.header._encodeRecursive(outs); + + this.pose._encodeRecursive(outs); + + } + + public GeoPoseWithCovarianceStamped(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public GeoPoseWithCovarianceStamped(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeoPoseWithCovarianceStamped _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.GeoPoseWithCovarianceStamped o = new geographic_msgs.GeoPoseWithCovarianceStamped(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.pose = geographic_msgs.GeoPoseWithCovariance._decodeRecursiveFactory(ins); + + } + + public geographic_msgs.GeoPoseWithCovarianceStamped Copy() + { + geographic_msgs.GeoPoseWithCovarianceStamped outobj = new geographic_msgs.GeoPoseWithCovarianceStamped(); + outobj.header = this.header.Copy(); + + outobj.pose = this.pose.Copy(); + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/geographic_msgs/GeographicMap.cs b/generated/cs_lcm_msgs/geographic_msgs/GeographicMap.cs new file mode 100644 index 0000000..acc878d --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/GeographicMap.cs @@ -0,0 +1,173 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class GeographicMap : LCM.LCM.LCMEncodable + { + public int points_length; + public int features_length; + public int props_length; + public std_msgs.Header header; + public uuid_msgs.UniqueID id; + public geographic_msgs.BoundingBox bounds; + public geographic_msgs.WayPoint[] points; + public geographic_msgs.MapFeature[] features; + public geographic_msgs.KeyValue[] props; + + public GeographicMap() + { + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0xb24465d7d9841c65L; + + static GeographicMap() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.GeographicMap")) + return 0L; + + classes.Add("geographic_msgs.GeographicMap"); + ulong hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + + geographic_msgs.BoundingBox._hashRecursive(classes) + + geographic_msgs.WayPoint._hashRecursive(classes) + + geographic_msgs.MapFeature._hashRecursive(classes) + + geographic_msgs.KeyValue._hashRecursive(classes) + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + outs.Write(this.points_length); + + outs.Write(this.features_length); + + outs.Write(this.props_length); + + this.header._encodeRecursive(outs); + + this.id._encodeRecursive(outs); + + this.bounds._encodeRecursive(outs); + + for (int a = 0; a < this.points_length; a++) { + this.points[a]._encodeRecursive(outs); + } + + for (int a = 0; a < this.features_length; a++) { + this.features[a]._encodeRecursive(outs); + } + + for (int a = 0; a < this.props_length; a++) { + this.props[a]._encodeRecursive(outs); + } + + } + + public GeographicMap(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public GeographicMap(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeographicMap _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.GeographicMap o = new geographic_msgs.GeographicMap(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.points_length = ins.ReadInt32(); + + this.features_length = ins.ReadInt32(); + + this.props_length = ins.ReadInt32(); + + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.id = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.bounds = geographic_msgs.BoundingBox._decodeRecursiveFactory(ins); + + this.points = new geographic_msgs.WayPoint[(int) points_length]; + for (int a = 0; a < this.points_length; a++) { + this.points[a] = geographic_msgs.WayPoint._decodeRecursiveFactory(ins); + } + + this.features = new geographic_msgs.MapFeature[(int) features_length]; + for (int a = 0; a < this.features_length; a++) { + this.features[a] = geographic_msgs.MapFeature._decodeRecursiveFactory(ins); + } + + this.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + this.props[a] = geographic_msgs.KeyValue._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.GeographicMap Copy() + { + geographic_msgs.GeographicMap outobj = new geographic_msgs.GeographicMap(); + outobj.points_length = this.points_length; + + outobj.features_length = this.features_length; + + outobj.props_length = this.props_length; + + outobj.header = this.header.Copy(); + + outobj.id = this.id.Copy(); + + outobj.bounds = this.bounds.Copy(); + + outobj.points = new geographic_msgs.WayPoint[(int) points_length]; + for (int a = 0; a < this.points_length; a++) { + outobj.points[a] = this.points[a].Copy(); + } + + outobj.features = new geographic_msgs.MapFeature[(int) features_length]; + for (int a = 0; a < this.features_length; a++) { + outobj.features[a] = this.features[a].Copy(); + } + + outobj.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + outobj.props[a] = this.props[a].Copy(); + } + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/geographic_msgs/GeographicMapChanges.cs b/generated/cs_lcm_msgs/geographic_msgs/GeographicMapChanges.cs new file mode 100644 index 0000000..5783267 --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/GeographicMapChanges.cs @@ -0,0 +1,119 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class GeographicMapChanges : LCM.LCM.LCMEncodable + { + public int deletes_length; + public std_msgs.Header header; + public geographic_msgs.GeographicMap diffs; + public uuid_msgs.UniqueID[] deletes; + + public GeographicMapChanges() + { + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0x5d92adbb4d9db2cbL; + + static GeographicMapChanges() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.GeographicMapChanges")) + return 0L; + + classes.Add("geographic_msgs.GeographicMapChanges"); + ulong hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + geographic_msgs.GeographicMap._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + outs.Write(this.deletes_length); + + this.header._encodeRecursive(outs); + + this.diffs._encodeRecursive(outs); + + for (int a = 0; a < this.deletes_length; a++) { + this.deletes[a]._encodeRecursive(outs); + } + + } + + public GeographicMapChanges(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public GeographicMapChanges(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeographicMapChanges _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.GeographicMapChanges o = new geographic_msgs.GeographicMapChanges(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.deletes_length = ins.ReadInt32(); + + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.diffs = geographic_msgs.GeographicMap._decodeRecursiveFactory(ins); + + this.deletes = new uuid_msgs.UniqueID[(int) deletes_length]; + for (int a = 0; a < this.deletes_length; a++) { + this.deletes[a] = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.GeographicMapChanges Copy() + { + geographic_msgs.GeographicMapChanges outobj = new geographic_msgs.GeographicMapChanges(); + outobj.deletes_length = this.deletes_length; + + outobj.header = this.header.Copy(); + + outobj.diffs = this.diffs.Copy(); + + outobj.deletes = new uuid_msgs.UniqueID[(int) deletes_length]; + for (int a = 0; a < this.deletes_length; a++) { + outobj.deletes[a] = this.deletes[a].Copy(); + } + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/geographic_msgs/KeyValue.cs b/generated/cs_lcm_msgs/geographic_msgs/KeyValue.cs new file mode 100644 index 0000000..4362317 --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/KeyValue.cs @@ -0,0 +1,96 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class KeyValue : LCM.LCM.LCMEncodable + { + public String key; + public String value; + + public KeyValue() + { + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0x97574015d52eeddeL; + + static KeyValue() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.KeyValue")) + return 0L; + + classes.Add("geographic_msgs.KeyValue"); + ulong hash = LCM_FINGERPRINT_BASE + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + byte[] __strbuf = null; + __strbuf = System.Text.Encoding.GetEncoding("US-ASCII").GetBytes(this.key); outs.Write(__strbuf.Length+1); outs.Write(__strbuf, 0, __strbuf.Length); outs.Write((byte) 0); + + __strbuf = System.Text.Encoding.GetEncoding("US-ASCII").GetBytes(this.value); outs.Write(__strbuf.Length+1); outs.Write(__strbuf, 0, __strbuf.Length); outs.Write((byte) 0); + + } + + public KeyValue(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public KeyValue(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.KeyValue _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.KeyValue o = new geographic_msgs.KeyValue(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + byte[] __strbuf = null; + __strbuf = new byte[ins.ReadInt32()-1]; ins.ReadFully(__strbuf); ins.ReadByte(); this.key = System.Text.Encoding.GetEncoding("US-ASCII").GetString(__strbuf); + + __strbuf = new byte[ins.ReadInt32()-1]; ins.ReadFully(__strbuf); ins.ReadByte(); this.value = System.Text.Encoding.GetEncoding("US-ASCII").GetString(__strbuf); + + } + + public geographic_msgs.KeyValue Copy() + { + geographic_msgs.KeyValue outobj = new geographic_msgs.KeyValue(); + outobj.key = this.key; + + outobj.value = this.value; + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/geographic_msgs/MapFeature.cs b/generated/cs_lcm_msgs/geographic_msgs/MapFeature.cs new file mode 100644 index 0000000..eccd427 --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/MapFeature.cs @@ -0,0 +1,134 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class MapFeature : LCM.LCM.LCMEncodable + { + public int components_length; + public int props_length; + public uuid_msgs.UniqueID id; + public uuid_msgs.UniqueID[] components; + public geographic_msgs.KeyValue[] props; + + public MapFeature() + { + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0x75975993f8dd2d22L; + + static MapFeature() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.MapFeature")) + return 0L; + + classes.Add("geographic_msgs.MapFeature"); + ulong hash = LCM_FINGERPRINT_BASE + + uuid_msgs.UniqueID._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + + geographic_msgs.KeyValue._hashRecursive(classes) + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + outs.Write(this.components_length); + + outs.Write(this.props_length); + + this.id._encodeRecursive(outs); + + for (int a = 0; a < this.components_length; a++) { + this.components[a]._encodeRecursive(outs); + } + + for (int a = 0; a < this.props_length; a++) { + this.props[a]._encodeRecursive(outs); + } + + } + + public MapFeature(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public MapFeature(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.MapFeature _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.MapFeature o = new geographic_msgs.MapFeature(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.components_length = ins.ReadInt32(); + + this.props_length = ins.ReadInt32(); + + this.id = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.components = new uuid_msgs.UniqueID[(int) components_length]; + for (int a = 0; a < this.components_length; a++) { + this.components[a] = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + } + + this.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + this.props[a] = geographic_msgs.KeyValue._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.MapFeature Copy() + { + geographic_msgs.MapFeature outobj = new geographic_msgs.MapFeature(); + outobj.components_length = this.components_length; + + outobj.props_length = this.props_length; + + outobj.id = this.id.Copy(); + + outobj.components = new uuid_msgs.UniqueID[(int) components_length]; + for (int a = 0; a < this.components_length; a++) { + outobj.components[a] = this.components[a].Copy(); + } + + outobj.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + outobj.props[a] = this.props[a].Copy(); + } + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/geographic_msgs/RouteNetwork.cs b/generated/cs_lcm_msgs/geographic_msgs/RouteNetwork.cs new file mode 100644 index 0000000..a6511f0 --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/RouteNetwork.cs @@ -0,0 +1,173 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class RouteNetwork : LCM.LCM.LCMEncodable + { + public int points_length; + public int segments_length; + public int props_length; + public std_msgs.Header header; + public uuid_msgs.UniqueID id; + public geographic_msgs.BoundingBox bounds; + public geographic_msgs.WayPoint[] points; + public geographic_msgs.RouteSegment[] segments; + public geographic_msgs.KeyValue[] props; + + public RouteNetwork() + { + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0xf50b14f90fc9a672L; + + static RouteNetwork() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.RouteNetwork")) + return 0L; + + classes.Add("geographic_msgs.RouteNetwork"); + ulong hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + + geographic_msgs.BoundingBox._hashRecursive(classes) + + geographic_msgs.WayPoint._hashRecursive(classes) + + geographic_msgs.RouteSegment._hashRecursive(classes) + + geographic_msgs.KeyValue._hashRecursive(classes) + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + outs.Write(this.points_length); + + outs.Write(this.segments_length); + + outs.Write(this.props_length); + + this.header._encodeRecursive(outs); + + this.id._encodeRecursive(outs); + + this.bounds._encodeRecursive(outs); + + for (int a = 0; a < this.points_length; a++) { + this.points[a]._encodeRecursive(outs); + } + + for (int a = 0; a < this.segments_length; a++) { + this.segments[a]._encodeRecursive(outs); + } + + for (int a = 0; a < this.props_length; a++) { + this.props[a]._encodeRecursive(outs); + } + + } + + public RouteNetwork(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public RouteNetwork(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.RouteNetwork _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.RouteNetwork o = new geographic_msgs.RouteNetwork(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.points_length = ins.ReadInt32(); + + this.segments_length = ins.ReadInt32(); + + this.props_length = ins.ReadInt32(); + + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.id = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.bounds = geographic_msgs.BoundingBox._decodeRecursiveFactory(ins); + + this.points = new geographic_msgs.WayPoint[(int) points_length]; + for (int a = 0; a < this.points_length; a++) { + this.points[a] = geographic_msgs.WayPoint._decodeRecursiveFactory(ins); + } + + this.segments = new geographic_msgs.RouteSegment[(int) segments_length]; + for (int a = 0; a < this.segments_length; a++) { + this.segments[a] = geographic_msgs.RouteSegment._decodeRecursiveFactory(ins); + } + + this.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + this.props[a] = geographic_msgs.KeyValue._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.RouteNetwork Copy() + { + geographic_msgs.RouteNetwork outobj = new geographic_msgs.RouteNetwork(); + outobj.points_length = this.points_length; + + outobj.segments_length = this.segments_length; + + outobj.props_length = this.props_length; + + outobj.header = this.header.Copy(); + + outobj.id = this.id.Copy(); + + outobj.bounds = this.bounds.Copy(); + + outobj.points = new geographic_msgs.WayPoint[(int) points_length]; + for (int a = 0; a < this.points_length; a++) { + outobj.points[a] = this.points[a].Copy(); + } + + outobj.segments = new geographic_msgs.RouteSegment[(int) segments_length]; + for (int a = 0; a < this.segments_length; a++) { + outobj.segments[a] = this.segments[a].Copy(); + } + + outobj.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + outobj.props[a] = this.props[a].Copy(); + } + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/geographic_msgs/RoutePath.cs b/generated/cs_lcm_msgs/geographic_msgs/RoutePath.cs new file mode 100644 index 0000000..b6208b5 --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/RoutePath.cs @@ -0,0 +1,142 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class RoutePath : LCM.LCM.LCMEncodable + { + public int segments_length; + public int props_length; + public std_msgs.Header header; + public uuid_msgs.UniqueID network; + public uuid_msgs.UniqueID[] segments; + public geographic_msgs.KeyValue[] props; + + public RoutePath() + { + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0x2f0bab3ed05e12c3L; + + static RoutePath() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.RoutePath")) + return 0L; + + classes.Add("geographic_msgs.RoutePath"); + ulong hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + + geographic_msgs.KeyValue._hashRecursive(classes) + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + outs.Write(this.segments_length); + + outs.Write(this.props_length); + + this.header._encodeRecursive(outs); + + this.network._encodeRecursive(outs); + + for (int a = 0; a < this.segments_length; a++) { + this.segments[a]._encodeRecursive(outs); + } + + for (int a = 0; a < this.props_length; a++) { + this.props[a]._encodeRecursive(outs); + } + + } + + public RoutePath(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public RoutePath(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.RoutePath _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.RoutePath o = new geographic_msgs.RoutePath(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.segments_length = ins.ReadInt32(); + + this.props_length = ins.ReadInt32(); + + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.network = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.segments = new uuid_msgs.UniqueID[(int) segments_length]; + for (int a = 0; a < this.segments_length; a++) { + this.segments[a] = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + } + + this.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + this.props[a] = geographic_msgs.KeyValue._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.RoutePath Copy() + { + geographic_msgs.RoutePath outobj = new geographic_msgs.RoutePath(); + outobj.segments_length = this.segments_length; + + outobj.props_length = this.props_length; + + outobj.header = this.header.Copy(); + + outobj.network = this.network.Copy(); + + outobj.segments = new uuid_msgs.UniqueID[(int) segments_length]; + for (int a = 0; a < this.segments_length; a++) { + outobj.segments[a] = this.segments[a].Copy(); + } + + outobj.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + outobj.props[a] = this.props[a].Copy(); + } + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/geographic_msgs/RouteSegment.cs b/generated/cs_lcm_msgs/geographic_msgs/RouteSegment.cs new file mode 100644 index 0000000..efac702 --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/RouteSegment.cs @@ -0,0 +1,127 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class RouteSegment : LCM.LCM.LCMEncodable + { + public int props_length; + public uuid_msgs.UniqueID id; + public uuid_msgs.UniqueID start; + public uuid_msgs.UniqueID end; + public geographic_msgs.KeyValue[] props; + + public RouteSegment() + { + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0x2757afe165f2b650L; + + static RouteSegment() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.RouteSegment")) + return 0L; + + classes.Add("geographic_msgs.RouteSegment"); + ulong hash = LCM_FINGERPRINT_BASE + + uuid_msgs.UniqueID._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + + geographic_msgs.KeyValue._hashRecursive(classes) + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + outs.Write(this.props_length); + + this.id._encodeRecursive(outs); + + this.start._encodeRecursive(outs); + + this.end._encodeRecursive(outs); + + for (int a = 0; a < this.props_length; a++) { + this.props[a]._encodeRecursive(outs); + } + + } + + public RouteSegment(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public RouteSegment(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.RouteSegment _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.RouteSegment o = new geographic_msgs.RouteSegment(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.props_length = ins.ReadInt32(); + + this.id = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.start = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.end = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + this.props[a] = geographic_msgs.KeyValue._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.RouteSegment Copy() + { + geographic_msgs.RouteSegment outobj = new geographic_msgs.RouteSegment(); + outobj.props_length = this.props_length; + + outobj.id = this.id.Copy(); + + outobj.start = this.start.Copy(); + + outobj.end = this.end.Copy(); + + outobj.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + outobj.props[a] = this.props[a].Copy(); + } + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/geographic_msgs/WayPoint.cs b/generated/cs_lcm_msgs/geographic_msgs/WayPoint.cs new file mode 100644 index 0000000..72efa7d --- /dev/null +++ b/generated/cs_lcm_msgs/geographic_msgs/WayPoint.cs @@ -0,0 +1,119 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace geographic_msgs +{ + public sealed class WayPoint : LCM.LCM.LCMEncodable + { + public int props_length; + public uuid_msgs.UniqueID id; + public geographic_msgs.GeoPoint position; + public geographic_msgs.KeyValue[] props; + + public WayPoint() + { + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0xd32d71d9c391bc8fL; + + static WayPoint() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("geographic_msgs.WayPoint")) + return 0L; + + classes.Add("geographic_msgs.WayPoint"); + ulong hash = LCM_FINGERPRINT_BASE + + uuid_msgs.UniqueID._hashRecursive(classes) + + geographic_msgs.GeoPoint._hashRecursive(classes) + + geographic_msgs.KeyValue._hashRecursive(classes) + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + outs.Write(this.props_length); + + this.id._encodeRecursive(outs); + + this.position._encodeRecursive(outs); + + for (int a = 0; a < this.props_length; a++) { + this.props[a]._encodeRecursive(outs); + } + + } + + public WayPoint(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public WayPoint(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.WayPoint _decodeRecursiveFactory(LCMDataInputStream ins) + { + geographic_msgs.WayPoint o = new geographic_msgs.WayPoint(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.props_length = ins.ReadInt32(); + + this.id = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.position = geographic_msgs.GeoPoint._decodeRecursiveFactory(ins); + + this.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + this.props[a] = geographic_msgs.KeyValue._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.WayPoint Copy() + { + geographic_msgs.WayPoint outobj = new geographic_msgs.WayPoint(); + outobj.props_length = this.props_length; + + outobj.id = this.id.Copy(); + + outobj.position = this.position.Copy(); + + outobj.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + outobj.props[a] = this.props[a].Copy(); + } + + return outobj; + } + } +} + diff --git a/generated/cs_lcm_msgs/uuid_msgs/UniqueID.cs b/generated/cs_lcm_msgs/uuid_msgs/UniqueID.cs new file mode 100644 index 0000000..a2078df --- /dev/null +++ b/generated/cs_lcm_msgs/uuid_msgs/UniqueID.cs @@ -0,0 +1,96 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen 1.5.2 + * DO NOT MODIFY BY HAND!!!! + */ + +using System; +using System.Collections.Generic; +using System.IO; +using LCM.LCM; + +namespace uuid_msgs +{ + public sealed class UniqueID : LCM.LCM.LCMEncodable + { + public byte[] uuid; + + public UniqueID() + { + uuid = new byte[16]; + } + + public static readonly ulong LCM_FINGERPRINT; + public static readonly ulong LCM_FINGERPRINT_BASE = 0x697d4febd3ed5654L; + + static UniqueID() + { + LCM_FINGERPRINT = _hashRecursive(new List()); + } + + public static ulong _hashRecursive(List classes) + { + if (classes.Contains("uuid_msgs.UniqueID")) + return 0L; + + classes.Add("uuid_msgs.UniqueID"); + ulong hash = LCM_FINGERPRINT_BASE + ; + classes.RemoveAt(classes.Count - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void Encode(LCMDataOutputStream outs) + { + outs.Write((long) LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(LCMDataOutputStream outs) + { + for (int a = 0; a < 16; a++) { + outs.Write(this.uuid[a]); + } + + } + + public UniqueID(byte[] data) : this(new LCMDataInputStream(data)) + { + } + + public UniqueID(LCMDataInputStream ins) + { + if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT) + throw new System.IO.IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static uuid_msgs.UniqueID _decodeRecursiveFactory(LCMDataInputStream ins) + { + uuid_msgs.UniqueID o = new uuid_msgs.UniqueID(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(LCMDataInputStream ins) + { + this.uuid = new byte[(int) 16]; + for (int a = 0; a < 16; a++) { + this.uuid[a] = ins.ReadByte(); + } + + } + + public uuid_msgs.UniqueID Copy() + { + uuid_msgs.UniqueID outobj = new uuid_msgs.UniqueID(); + outobj.uuid = new byte[(int) 16]; + for (int a = 0; a < 16; a++) { + outobj.uuid[a] = this.uuid[a]; + } + + return outobj; + } + } +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/BoundingBox.java b/generated/java_lcm_msgs/geographic_msgs/BoundingBox.java new file mode 100644 index 0000000..653a736 --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/BoundingBox.java @@ -0,0 +1,98 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class BoundingBox implements lcm.lcm.LCMEncodable +{ + public geographic_msgs.GeoPoint min_pt; + + public geographic_msgs.GeoPoint max_pt; + + + public BoundingBox() + { + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0xecb7cbaa66bccde0L; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.BoundingBox.class)) + return 0L; + + classes.add(geographic_msgs.BoundingBox.class); + long hash = LCM_FINGERPRINT_BASE + + geographic_msgs.GeoPoint._hashRecursive(classes) + + geographic_msgs.GeoPoint._hashRecursive(classes) + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + this.min_pt._encodeRecursive(outs); + + this.max_pt._encodeRecursive(outs); + + } + + public BoundingBox(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public BoundingBox(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.BoundingBox _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.BoundingBox o = new geographic_msgs.BoundingBox(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.min_pt = geographic_msgs.GeoPoint._decodeRecursiveFactory(ins); + + this.max_pt = geographic_msgs.GeoPoint._decodeRecursiveFactory(ins); + + } + + public geographic_msgs.BoundingBox copy() + { + geographic_msgs.BoundingBox outobj = new geographic_msgs.BoundingBox(); + outobj.min_pt = this.min_pt.copy(); + + outobj.max_pt = this.max_pt.copy(); + + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/GeoPath.java b/generated/java_lcm_msgs/geographic_msgs/GeoPath.java new file mode 100644 index 0000000..b724e37 --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/GeoPath.java @@ -0,0 +1,117 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class GeoPath implements lcm.lcm.LCMEncodable +{ + public int poses_length; + + public std_msgs.Header header; + + /** + * LCM Type: geographic_msgs.GeoPoseStamped[poses_length] + */ + public geographic_msgs.GeoPoseStamped poses[]; + + + public GeoPath() + { + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0xc779b6acc503055aL; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.GeoPath.class)) + return 0L; + + classes.add(geographic_msgs.GeoPath.class); + long hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + geographic_msgs.GeoPoseStamped._hashRecursive(classes) + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + outs.writeInt(this.poses_length); + + this.header._encodeRecursive(outs); + + for (int a = 0; a < this.poses_length; a++) { + this.poses[a]._encodeRecursive(outs); + } + + } + + public GeoPath(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public GeoPath(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeoPath _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.GeoPath o = new geographic_msgs.GeoPath(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.poses_length = ins.readInt(); + + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.poses = new geographic_msgs.GeoPoseStamped[(int) poses_length]; + for (int a = 0; a < this.poses_length; a++) { + this.poses[a] = geographic_msgs.GeoPoseStamped._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.GeoPath copy() + { + geographic_msgs.GeoPath outobj = new geographic_msgs.GeoPath(); + outobj.poses_length = this.poses_length; + + outobj.header = this.header.copy(); + + outobj.poses = new geographic_msgs.GeoPoseStamped[(int) poses_length]; + for (int a = 0; a < this.poses_length; a++) { + outobj.poses[a] = this.poses[a].copy(); + } + + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/GeoPoint.java b/generated/java_lcm_msgs/geographic_msgs/GeoPoint.java new file mode 100644 index 0000000..ece8f15 --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/GeoPoint.java @@ -0,0 +1,104 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class GeoPoint implements lcm.lcm.LCMEncodable +{ + public double latitude; + + public double longitude; + + public double altitude; + + + public GeoPoint() + { + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0xb84ee2b89179c84eL; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.GeoPoint.class)) + return 0L; + + classes.add(geographic_msgs.GeoPoint.class); + long hash = LCM_FINGERPRINT_BASE + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + outs.writeDouble(this.latitude); + + outs.writeDouble(this.longitude); + + outs.writeDouble(this.altitude); + + } + + public GeoPoint(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public GeoPoint(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeoPoint _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.GeoPoint o = new geographic_msgs.GeoPoint(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.latitude = ins.readDouble(); + + this.longitude = ins.readDouble(); + + this.altitude = ins.readDouble(); + + } + + public geographic_msgs.GeoPoint copy() + { + geographic_msgs.GeoPoint outobj = new geographic_msgs.GeoPoint(); + outobj.latitude = this.latitude; + + outobj.longitude = this.longitude; + + outobj.altitude = this.altitude; + + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/GeoPointStamped.java b/generated/java_lcm_msgs/geographic_msgs/GeoPointStamped.java new file mode 100644 index 0000000..105c3a9 --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/GeoPointStamped.java @@ -0,0 +1,98 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class GeoPointStamped implements lcm.lcm.LCMEncodable +{ + public std_msgs.Header header; + + public geographic_msgs.GeoPoint position; + + + public GeoPointStamped() + { + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0x3a3685292ab14382L; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.GeoPointStamped.class)) + return 0L; + + classes.add(geographic_msgs.GeoPointStamped.class); + long hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + geographic_msgs.GeoPoint._hashRecursive(classes) + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + this.header._encodeRecursive(outs); + + this.position._encodeRecursive(outs); + + } + + public GeoPointStamped(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public GeoPointStamped(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeoPointStamped _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.GeoPointStamped o = new geographic_msgs.GeoPointStamped(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.position = geographic_msgs.GeoPoint._decodeRecursiveFactory(ins); + + } + + public geographic_msgs.GeoPointStamped copy() + { + geographic_msgs.GeoPointStamped outobj = new geographic_msgs.GeoPointStamped(); + outobj.header = this.header.copy(); + + outobj.position = this.position.copy(); + + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/GeoPose.java b/generated/java_lcm_msgs/geographic_msgs/GeoPose.java new file mode 100644 index 0000000..c8c3e64c --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/GeoPose.java @@ -0,0 +1,98 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class GeoPose implements lcm.lcm.LCMEncodable +{ + public geographic_msgs.GeoPoint position; + + public geometry_msgs.Quaternion orientation; + + + public GeoPose() + { + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0x2d70dd60bd541272L; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.GeoPose.class)) + return 0L; + + classes.add(geographic_msgs.GeoPose.class); + long hash = LCM_FINGERPRINT_BASE + + geographic_msgs.GeoPoint._hashRecursive(classes) + + geometry_msgs.Quaternion._hashRecursive(classes) + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + this.position._encodeRecursive(outs); + + this.orientation._encodeRecursive(outs); + + } + + public GeoPose(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public GeoPose(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeoPose _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.GeoPose o = new geographic_msgs.GeoPose(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.position = geographic_msgs.GeoPoint._decodeRecursiveFactory(ins); + + this.orientation = geometry_msgs.Quaternion._decodeRecursiveFactory(ins); + + } + + public geographic_msgs.GeoPose copy() + { + geographic_msgs.GeoPose outobj = new geographic_msgs.GeoPose(); + outobj.position = this.position.copy(); + + outobj.orientation = this.orientation.copy(); + + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/GeoPoseStamped.java b/generated/java_lcm_msgs/geographic_msgs/GeoPoseStamped.java new file mode 100644 index 0000000..6ff9f16 --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/GeoPoseStamped.java @@ -0,0 +1,98 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class GeoPoseStamped implements lcm.lcm.LCMEncodable +{ + public std_msgs.Header header; + + public geographic_msgs.GeoPose pose; + + + public GeoPoseStamped() + { + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0xe10feebec5c97663L; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.GeoPoseStamped.class)) + return 0L; + + classes.add(geographic_msgs.GeoPoseStamped.class); + long hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + geographic_msgs.GeoPose._hashRecursive(classes) + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + this.header._encodeRecursive(outs); + + this.pose._encodeRecursive(outs); + + } + + public GeoPoseStamped(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public GeoPoseStamped(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeoPoseStamped _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.GeoPoseStamped o = new geographic_msgs.GeoPoseStamped(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.pose = geographic_msgs.GeoPose._decodeRecursiveFactory(ins); + + } + + public geographic_msgs.GeoPoseStamped copy() + { + geographic_msgs.GeoPoseStamped outobj = new geographic_msgs.GeoPoseStamped(); + outobj.header = this.header.copy(); + + outobj.pose = this.pose.copy(); + + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/GeoPoseWithCovariance.java b/generated/java_lcm_msgs/geographic_msgs/GeoPoseWithCovariance.java new file mode 100644 index 0000000..7237e65 --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/GeoPoseWithCovariance.java @@ -0,0 +1,106 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class GeoPoseWithCovariance implements lcm.lcm.LCMEncodable +{ + public geographic_msgs.GeoPose pose; + + /** + * LCM Type: double[36] + */ + public double covariance[]; + + + public GeoPoseWithCovariance() + { + covariance = new double[36]; + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0x42dbdfaa69371237L; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.GeoPoseWithCovariance.class)) + return 0L; + + classes.add(geographic_msgs.GeoPoseWithCovariance.class); + long hash = LCM_FINGERPRINT_BASE + + geographic_msgs.GeoPose._hashRecursive(classes) + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + this.pose._encodeRecursive(outs); + + for (int a = 0; a < 36; a++) { + outs.writeDouble(this.covariance[a]); + } + + } + + public GeoPoseWithCovariance(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public GeoPoseWithCovariance(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeoPoseWithCovariance _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.GeoPoseWithCovariance o = new geographic_msgs.GeoPoseWithCovariance(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.pose = geographic_msgs.GeoPose._decodeRecursiveFactory(ins); + + this.covariance = new double[(int) 36]; + for (int a = 0; a < 36; a++) { + this.covariance[a] = ins.readDouble(); + } + + } + + public geographic_msgs.GeoPoseWithCovariance copy() + { + geographic_msgs.GeoPoseWithCovariance outobj = new geographic_msgs.GeoPoseWithCovariance(); + outobj.pose = this.pose.copy(); + + outobj.covariance = new double[(int) 36]; + System.arraycopy(this.covariance, 0, outobj.covariance, 0, 36); + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.java b/generated/java_lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.java new file mode 100644 index 0000000..9bcf012 --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.java @@ -0,0 +1,98 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class GeoPoseWithCovarianceStamped implements lcm.lcm.LCMEncodable +{ + public std_msgs.Header header; + + public geographic_msgs.GeoPoseWithCovariance pose; + + + public GeoPoseWithCovarianceStamped() + { + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0xe10feebec5c97663L; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.GeoPoseWithCovarianceStamped.class)) + return 0L; + + classes.add(geographic_msgs.GeoPoseWithCovarianceStamped.class); + long hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + geographic_msgs.GeoPoseWithCovariance._hashRecursive(classes) + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + this.header._encodeRecursive(outs); + + this.pose._encodeRecursive(outs); + + } + + public GeoPoseWithCovarianceStamped(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public GeoPoseWithCovarianceStamped(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeoPoseWithCovarianceStamped _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.GeoPoseWithCovarianceStamped o = new geographic_msgs.GeoPoseWithCovarianceStamped(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.pose = geographic_msgs.GeoPoseWithCovariance._decodeRecursiveFactory(ins); + + } + + public geographic_msgs.GeoPoseWithCovarianceStamped copy() + { + geographic_msgs.GeoPoseWithCovarianceStamped outobj = new geographic_msgs.GeoPoseWithCovarianceStamped(); + outobj.header = this.header.copy(); + + outobj.pose = this.pose.copy(); + + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/GeographicMap.java b/generated/java_lcm_msgs/geographic_msgs/GeographicMap.java new file mode 100644 index 0000000..86c9632 --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/GeographicMap.java @@ -0,0 +1,191 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class GeographicMap implements lcm.lcm.LCMEncodable +{ + public int points_length; + + public int features_length; + + public int props_length; + + public std_msgs.Header header; + + public uuid_msgs.UniqueID id; + + public geographic_msgs.BoundingBox bounds; + + /** + * LCM Type: geographic_msgs.WayPoint[points_length] + */ + public geographic_msgs.WayPoint points[]; + + /** + * LCM Type: geographic_msgs.MapFeature[features_length] + */ + public geographic_msgs.MapFeature features[]; + + /** + * LCM Type: geographic_msgs.KeyValue[props_length] + */ + public geographic_msgs.KeyValue props[]; + + + public GeographicMap() + { + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0xb24465d7d9841c65L; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.GeographicMap.class)) + return 0L; + + classes.add(geographic_msgs.GeographicMap.class); + long hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + + geographic_msgs.BoundingBox._hashRecursive(classes) + + geographic_msgs.WayPoint._hashRecursive(classes) + + geographic_msgs.MapFeature._hashRecursive(classes) + + geographic_msgs.KeyValue._hashRecursive(classes) + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + outs.writeInt(this.points_length); + + outs.writeInt(this.features_length); + + outs.writeInt(this.props_length); + + this.header._encodeRecursive(outs); + + this.id._encodeRecursive(outs); + + this.bounds._encodeRecursive(outs); + + for (int a = 0; a < this.points_length; a++) { + this.points[a]._encodeRecursive(outs); + } + + for (int a = 0; a < this.features_length; a++) { + this.features[a]._encodeRecursive(outs); + } + + for (int a = 0; a < this.props_length; a++) { + this.props[a]._encodeRecursive(outs); + } + + } + + public GeographicMap(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public GeographicMap(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeographicMap _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.GeographicMap o = new geographic_msgs.GeographicMap(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.points_length = ins.readInt(); + + this.features_length = ins.readInt(); + + this.props_length = ins.readInt(); + + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.id = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.bounds = geographic_msgs.BoundingBox._decodeRecursiveFactory(ins); + + this.points = new geographic_msgs.WayPoint[(int) points_length]; + for (int a = 0; a < this.points_length; a++) { + this.points[a] = geographic_msgs.WayPoint._decodeRecursiveFactory(ins); + } + + this.features = new geographic_msgs.MapFeature[(int) features_length]; + for (int a = 0; a < this.features_length; a++) { + this.features[a] = geographic_msgs.MapFeature._decodeRecursiveFactory(ins); + } + + this.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + this.props[a] = geographic_msgs.KeyValue._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.GeographicMap copy() + { + geographic_msgs.GeographicMap outobj = new geographic_msgs.GeographicMap(); + outobj.points_length = this.points_length; + + outobj.features_length = this.features_length; + + outobj.props_length = this.props_length; + + outobj.header = this.header.copy(); + + outobj.id = this.id.copy(); + + outobj.bounds = this.bounds.copy(); + + outobj.points = new geographic_msgs.WayPoint[(int) points_length]; + for (int a = 0; a < this.points_length; a++) { + outobj.points[a] = this.points[a].copy(); + } + + outobj.features = new geographic_msgs.MapFeature[(int) features_length]; + for (int a = 0; a < this.features_length; a++) { + outobj.features[a] = this.features[a].copy(); + } + + outobj.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + outobj.props[a] = this.props[a].copy(); + } + + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/GeographicMapChanges.java b/generated/java_lcm_msgs/geographic_msgs/GeographicMapChanges.java new file mode 100644 index 0000000..9e1f15c --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/GeographicMapChanges.java @@ -0,0 +1,126 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class GeographicMapChanges implements lcm.lcm.LCMEncodable +{ + public int deletes_length; + + public std_msgs.Header header; + + public geographic_msgs.GeographicMap diffs; + + /** + * LCM Type: uuid_msgs.UniqueID[deletes_length] + */ + public uuid_msgs.UniqueID deletes[]; + + + public GeographicMapChanges() + { + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0x5d92adbb4d9db2cbL; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.GeographicMapChanges.class)) + return 0L; + + classes.add(geographic_msgs.GeographicMapChanges.class); + long hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + geographic_msgs.GeographicMap._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + outs.writeInt(this.deletes_length); + + this.header._encodeRecursive(outs); + + this.diffs._encodeRecursive(outs); + + for (int a = 0; a < this.deletes_length; a++) { + this.deletes[a]._encodeRecursive(outs); + } + + } + + public GeographicMapChanges(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public GeographicMapChanges(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.GeographicMapChanges _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.GeographicMapChanges o = new geographic_msgs.GeographicMapChanges(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.deletes_length = ins.readInt(); + + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.diffs = geographic_msgs.GeographicMap._decodeRecursiveFactory(ins); + + this.deletes = new uuid_msgs.UniqueID[(int) deletes_length]; + for (int a = 0; a < this.deletes_length; a++) { + this.deletes[a] = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.GeographicMapChanges copy() + { + geographic_msgs.GeographicMapChanges outobj = new geographic_msgs.GeographicMapChanges(); + outobj.deletes_length = this.deletes_length; + + outobj.header = this.header.copy(); + + outobj.diffs = this.diffs.copy(); + + outobj.deletes = new uuid_msgs.UniqueID[(int) deletes_length]; + for (int a = 0; a < this.deletes_length; a++) { + outobj.deletes[a] = this.deletes[a].copy(); + } + + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/KeyValue.java b/generated/java_lcm_msgs/geographic_msgs/KeyValue.java new file mode 100644 index 0000000..b15dcc8 --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/KeyValue.java @@ -0,0 +1,98 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class KeyValue implements lcm.lcm.LCMEncodable +{ + public String key; + + public String value; + + + public KeyValue() + { + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0x97574015d52eeddeL; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.KeyValue.class)) + return 0L; + + classes.add(geographic_msgs.KeyValue.class); + long hash = LCM_FINGERPRINT_BASE + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + char[] __strbuf = null; + __strbuf = new char[this.key.length()]; this.key.getChars(0, this.key.length(), __strbuf, 0); outs.writeInt(__strbuf.length+1); for (int _i = 0; _i < __strbuf.length; _i++) outs.write(__strbuf[_i]); outs.writeByte(0); + + __strbuf = new char[this.value.length()]; this.value.getChars(0, this.value.length(), __strbuf, 0); outs.writeInt(__strbuf.length+1); for (int _i = 0; _i < __strbuf.length; _i++) outs.write(__strbuf[_i]); outs.writeByte(0); + + } + + public KeyValue(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public KeyValue(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.KeyValue _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.KeyValue o = new geographic_msgs.KeyValue(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + char[] __strbuf = null; + __strbuf = new char[ins.readInt()-1]; for (int _i = 0; _i < __strbuf.length; _i++) __strbuf[_i] = (char) (ins.readByte()&0xff); ins.readByte(); this.key = new String(__strbuf); + + __strbuf = new char[ins.readInt()-1]; for (int _i = 0; _i < __strbuf.length; _i++) __strbuf[_i] = (char) (ins.readByte()&0xff); ins.readByte(); this.value = new String(__strbuf); + + } + + public geographic_msgs.KeyValue copy() + { + geographic_msgs.KeyValue outobj = new geographic_msgs.KeyValue(); + outobj.key = this.key; + + outobj.value = this.value; + + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/MapFeature.java b/generated/java_lcm_msgs/geographic_msgs/MapFeature.java new file mode 100644 index 0000000..060c2ae --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/MapFeature.java @@ -0,0 +1,145 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class MapFeature implements lcm.lcm.LCMEncodable +{ + public int components_length; + + public int props_length; + + public uuid_msgs.UniqueID id; + + /** + * LCM Type: uuid_msgs.UniqueID[components_length] + */ + public uuid_msgs.UniqueID components[]; + + /** + * LCM Type: geographic_msgs.KeyValue[props_length] + */ + public geographic_msgs.KeyValue props[]; + + + public MapFeature() + { + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0x75975993f8dd2d22L; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.MapFeature.class)) + return 0L; + + classes.add(geographic_msgs.MapFeature.class); + long hash = LCM_FINGERPRINT_BASE + + uuid_msgs.UniqueID._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + + geographic_msgs.KeyValue._hashRecursive(classes) + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + outs.writeInt(this.components_length); + + outs.writeInt(this.props_length); + + this.id._encodeRecursive(outs); + + for (int a = 0; a < this.components_length; a++) { + this.components[a]._encodeRecursive(outs); + } + + for (int a = 0; a < this.props_length; a++) { + this.props[a]._encodeRecursive(outs); + } + + } + + public MapFeature(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public MapFeature(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.MapFeature _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.MapFeature o = new geographic_msgs.MapFeature(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.components_length = ins.readInt(); + + this.props_length = ins.readInt(); + + this.id = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.components = new uuid_msgs.UniqueID[(int) components_length]; + for (int a = 0; a < this.components_length; a++) { + this.components[a] = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + } + + this.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + this.props[a] = geographic_msgs.KeyValue._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.MapFeature copy() + { + geographic_msgs.MapFeature outobj = new geographic_msgs.MapFeature(); + outobj.components_length = this.components_length; + + outobj.props_length = this.props_length; + + outobj.id = this.id.copy(); + + outobj.components = new uuid_msgs.UniqueID[(int) components_length]; + for (int a = 0; a < this.components_length; a++) { + outobj.components[a] = this.components[a].copy(); + } + + outobj.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + outobj.props[a] = this.props[a].copy(); + } + + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/RouteNetwork.java b/generated/java_lcm_msgs/geographic_msgs/RouteNetwork.java new file mode 100644 index 0000000..ef81cde --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/RouteNetwork.java @@ -0,0 +1,191 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class RouteNetwork implements lcm.lcm.LCMEncodable +{ + public int points_length; + + public int segments_length; + + public int props_length; + + public std_msgs.Header header; + + public uuid_msgs.UniqueID id; + + public geographic_msgs.BoundingBox bounds; + + /** + * LCM Type: geographic_msgs.WayPoint[points_length] + */ + public geographic_msgs.WayPoint points[]; + + /** + * LCM Type: geographic_msgs.RouteSegment[segments_length] + */ + public geographic_msgs.RouteSegment segments[]; + + /** + * LCM Type: geographic_msgs.KeyValue[props_length] + */ + public geographic_msgs.KeyValue props[]; + + + public RouteNetwork() + { + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0xf50b14f90fc9a672L; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.RouteNetwork.class)) + return 0L; + + classes.add(geographic_msgs.RouteNetwork.class); + long hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + + geographic_msgs.BoundingBox._hashRecursive(classes) + + geographic_msgs.WayPoint._hashRecursive(classes) + + geographic_msgs.RouteSegment._hashRecursive(classes) + + geographic_msgs.KeyValue._hashRecursive(classes) + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + outs.writeInt(this.points_length); + + outs.writeInt(this.segments_length); + + outs.writeInt(this.props_length); + + this.header._encodeRecursive(outs); + + this.id._encodeRecursive(outs); + + this.bounds._encodeRecursive(outs); + + for (int a = 0; a < this.points_length; a++) { + this.points[a]._encodeRecursive(outs); + } + + for (int a = 0; a < this.segments_length; a++) { + this.segments[a]._encodeRecursive(outs); + } + + for (int a = 0; a < this.props_length; a++) { + this.props[a]._encodeRecursive(outs); + } + + } + + public RouteNetwork(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public RouteNetwork(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.RouteNetwork _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.RouteNetwork o = new geographic_msgs.RouteNetwork(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.points_length = ins.readInt(); + + this.segments_length = ins.readInt(); + + this.props_length = ins.readInt(); + + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.id = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.bounds = geographic_msgs.BoundingBox._decodeRecursiveFactory(ins); + + this.points = new geographic_msgs.WayPoint[(int) points_length]; + for (int a = 0; a < this.points_length; a++) { + this.points[a] = geographic_msgs.WayPoint._decodeRecursiveFactory(ins); + } + + this.segments = new geographic_msgs.RouteSegment[(int) segments_length]; + for (int a = 0; a < this.segments_length; a++) { + this.segments[a] = geographic_msgs.RouteSegment._decodeRecursiveFactory(ins); + } + + this.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + this.props[a] = geographic_msgs.KeyValue._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.RouteNetwork copy() + { + geographic_msgs.RouteNetwork outobj = new geographic_msgs.RouteNetwork(); + outobj.points_length = this.points_length; + + outobj.segments_length = this.segments_length; + + outobj.props_length = this.props_length; + + outobj.header = this.header.copy(); + + outobj.id = this.id.copy(); + + outobj.bounds = this.bounds.copy(); + + outobj.points = new geographic_msgs.WayPoint[(int) points_length]; + for (int a = 0; a < this.points_length; a++) { + outobj.points[a] = this.points[a].copy(); + } + + outobj.segments = new geographic_msgs.RouteSegment[(int) segments_length]; + for (int a = 0; a < this.segments_length; a++) { + outobj.segments[a] = this.segments[a].copy(); + } + + outobj.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + outobj.props[a] = this.props[a].copy(); + } + + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/RoutePath.java b/generated/java_lcm_msgs/geographic_msgs/RoutePath.java new file mode 100644 index 0000000..b280f9b --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/RoutePath.java @@ -0,0 +1,154 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class RoutePath implements lcm.lcm.LCMEncodable +{ + public int segments_length; + + public int props_length; + + public std_msgs.Header header; + + public uuid_msgs.UniqueID network; + + /** + * LCM Type: uuid_msgs.UniqueID[segments_length] + */ + public uuid_msgs.UniqueID segments[]; + + /** + * LCM Type: geographic_msgs.KeyValue[props_length] + */ + public geographic_msgs.KeyValue props[]; + + + public RoutePath() + { + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0x2f0bab3ed05e12c3L; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.RoutePath.class)) + return 0L; + + classes.add(geographic_msgs.RoutePath.class); + long hash = LCM_FINGERPRINT_BASE + + std_msgs.Header._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + + geographic_msgs.KeyValue._hashRecursive(classes) + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + outs.writeInt(this.segments_length); + + outs.writeInt(this.props_length); + + this.header._encodeRecursive(outs); + + this.network._encodeRecursive(outs); + + for (int a = 0; a < this.segments_length; a++) { + this.segments[a]._encodeRecursive(outs); + } + + for (int a = 0; a < this.props_length; a++) { + this.props[a]._encodeRecursive(outs); + } + + } + + public RoutePath(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public RoutePath(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.RoutePath _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.RoutePath o = new geographic_msgs.RoutePath(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.segments_length = ins.readInt(); + + this.props_length = ins.readInt(); + + this.header = std_msgs.Header._decodeRecursiveFactory(ins); + + this.network = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.segments = new uuid_msgs.UniqueID[(int) segments_length]; + for (int a = 0; a < this.segments_length; a++) { + this.segments[a] = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + } + + this.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + this.props[a] = geographic_msgs.KeyValue._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.RoutePath copy() + { + geographic_msgs.RoutePath outobj = new geographic_msgs.RoutePath(); + outobj.segments_length = this.segments_length; + + outobj.props_length = this.props_length; + + outobj.header = this.header.copy(); + + outobj.network = this.network.copy(); + + outobj.segments = new uuid_msgs.UniqueID[(int) segments_length]; + for (int a = 0; a < this.segments_length; a++) { + outobj.segments[a] = this.segments[a].copy(); + } + + outobj.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + outobj.props[a] = this.props[a].copy(); + } + + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/RouteSegment.java b/generated/java_lcm_msgs/geographic_msgs/RouteSegment.java new file mode 100644 index 0000000..568dec9 --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/RouteSegment.java @@ -0,0 +1,135 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class RouteSegment implements lcm.lcm.LCMEncodable +{ + public int props_length; + + public uuid_msgs.UniqueID id; + + public uuid_msgs.UniqueID start; + + public uuid_msgs.UniqueID end; + + /** + * LCM Type: geographic_msgs.KeyValue[props_length] + */ + public geographic_msgs.KeyValue props[]; + + + public RouteSegment() + { + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0x2757afe165f2b650L; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.RouteSegment.class)) + return 0L; + + classes.add(geographic_msgs.RouteSegment.class); + long hash = LCM_FINGERPRINT_BASE + + uuid_msgs.UniqueID._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + + uuid_msgs.UniqueID._hashRecursive(classes) + + geographic_msgs.KeyValue._hashRecursive(classes) + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + outs.writeInt(this.props_length); + + this.id._encodeRecursive(outs); + + this.start._encodeRecursive(outs); + + this.end._encodeRecursive(outs); + + for (int a = 0; a < this.props_length; a++) { + this.props[a]._encodeRecursive(outs); + } + + } + + public RouteSegment(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public RouteSegment(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.RouteSegment _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.RouteSegment o = new geographic_msgs.RouteSegment(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.props_length = ins.readInt(); + + this.id = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.start = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.end = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + this.props[a] = geographic_msgs.KeyValue._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.RouteSegment copy() + { + geographic_msgs.RouteSegment outobj = new geographic_msgs.RouteSegment(); + outobj.props_length = this.props_length; + + outobj.id = this.id.copy(); + + outobj.start = this.start.copy(); + + outobj.end = this.end.copy(); + + outobj.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + outobj.props[a] = this.props[a].copy(); + } + + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/geographic_msgs/WayPoint.java b/generated/java_lcm_msgs/geographic_msgs/WayPoint.java new file mode 100644 index 0000000..09021d9 --- /dev/null +++ b/generated/java_lcm_msgs/geographic_msgs/WayPoint.java @@ -0,0 +1,126 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package geographic_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class WayPoint implements lcm.lcm.LCMEncodable +{ + public int props_length; + + public uuid_msgs.UniqueID id; + + public geographic_msgs.GeoPoint position; + + /** + * LCM Type: geographic_msgs.KeyValue[props_length] + */ + public geographic_msgs.KeyValue props[]; + + + public WayPoint() + { + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0xd32d71d9c391bc8fL; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(geographic_msgs.WayPoint.class)) + return 0L; + + classes.add(geographic_msgs.WayPoint.class); + long hash = LCM_FINGERPRINT_BASE + + uuid_msgs.UniqueID._hashRecursive(classes) + + geographic_msgs.GeoPoint._hashRecursive(classes) + + geographic_msgs.KeyValue._hashRecursive(classes) + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + outs.writeInt(this.props_length); + + this.id._encodeRecursive(outs); + + this.position._encodeRecursive(outs); + + for (int a = 0; a < this.props_length; a++) { + this.props[a]._encodeRecursive(outs); + } + + } + + public WayPoint(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public WayPoint(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static geographic_msgs.WayPoint _decodeRecursiveFactory(DataInput ins) throws IOException + { + geographic_msgs.WayPoint o = new geographic_msgs.WayPoint(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.props_length = ins.readInt(); + + this.id = uuid_msgs.UniqueID._decodeRecursiveFactory(ins); + + this.position = geographic_msgs.GeoPoint._decodeRecursiveFactory(ins); + + this.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + this.props[a] = geographic_msgs.KeyValue._decodeRecursiveFactory(ins); + } + + } + + public geographic_msgs.WayPoint copy() + { + geographic_msgs.WayPoint outobj = new geographic_msgs.WayPoint(); + outobj.props_length = this.props_length; + + outobj.id = this.id.copy(); + + outobj.position = this.position.copy(); + + outobj.props = new geographic_msgs.KeyValue[(int) props_length]; + for (int a = 0; a < this.props_length; a++) { + outobj.props[a] = this.props[a].copy(); + } + + return outobj; + } + +} + diff --git a/generated/java_lcm_msgs/uuid_msgs/UniqueID.java b/generated/java_lcm_msgs/uuid_msgs/UniqueID.java new file mode 100644 index 0000000..04754e6 --- /dev/null +++ b/generated/java_lcm_msgs/uuid_msgs/UniqueID.java @@ -0,0 +1,92 @@ +/* LCM type definition class file + * This file was automatically generated by lcm-gen + * DO NOT MODIFY BY HAND!!!! + * lcm-gen 1.5.2 + */ + +package uuid_msgs; + +import java.io.*; +import java.util.*; +import lcm.lcm.*; + +public final class UniqueID implements lcm.lcm.LCMEncodable +{ + /** + * LCM Type: byte[16] + */ + public byte uuid[]; + + + public UniqueID() + { + uuid = new byte[16]; + } + + public static final long LCM_FINGERPRINT; + public static final long LCM_FINGERPRINT_BASE = 0x697d4febd3ed5654L; + + static { + LCM_FINGERPRINT = _hashRecursive(new ArrayList>()); + } + + public static long _hashRecursive(ArrayList> classes) + { + if (classes.contains(uuid_msgs.UniqueID.class)) + return 0L; + + classes.add(uuid_msgs.UniqueID.class); + long hash = LCM_FINGERPRINT_BASE + ; + classes.remove(classes.size() - 1); + return (hash<<1) + ((hash>>63)&1); + } + + public void encode(DataOutput outs) throws IOException + { + outs.writeLong(LCM_FINGERPRINT); + _encodeRecursive(outs); + } + + public void _encodeRecursive(DataOutput outs) throws IOException + { + outs.write(this.uuid, 0, 16); + + } + + public UniqueID(byte[] data) throws IOException + { + this(new LCMDataInputStream(data)); + } + + public UniqueID(DataInput ins) throws IOException + { + if (ins.readLong() != LCM_FINGERPRINT) + throw new IOException("LCM Decode error: bad fingerprint"); + + _decodeRecursive(ins); + } + + public static uuid_msgs.UniqueID _decodeRecursiveFactory(DataInput ins) throws IOException + { + uuid_msgs.UniqueID o = new uuid_msgs.UniqueID(); + o._decodeRecursive(ins); + return o; + } + + public void _decodeRecursive(DataInput ins) throws IOException + { + this.uuid = new byte[(int) 16]; + ins.readFully(this.uuid, 0, (int) 16); + } + + public uuid_msgs.UniqueID copy() + { + uuid_msgs.UniqueID outobj = new uuid_msgs.UniqueID(); + outobj.uuid = new byte[(int) 16]; + System.arraycopy(this.uuid, 0, outobj.uuid, 0, 16); + return outobj; + } + +} + diff --git a/generated/lua_lcm_msgs/geographic_msgs/BoundingBox.lua b/generated/lua_lcm_msgs/geographic_msgs/BoundingBox.lua new file mode 100644 index 0000000..71a18bb --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/BoundingBox.lua @@ -0,0 +1,120 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local geographic_msgs_GeoPoint = require('geographic_msgs.GeoPoint') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local BoundingBox = {} +BoundingBox.__index = BoundingBox + +BoundingBox.name = 'geographic_msgs.BoundingBox' +BoundingBox.packagename = 'geographic_msgs' +BoundingBox.shortname = 'BoundingBox' + +function BoundingBox:new() + + local obj = {} + + obj.min_pt = nil + obj.max_pt = nil + + setmetatable(obj, self) + + return obj +end + +function BoundingBox._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == BoundingBox then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, BoundingBox) + + local hash = lcm._hash.new('0xecb7cbaa66bccde0') + + geographic_msgs_GeoPoint._get_hash_recursive(newparents) + + geographic_msgs_GeoPoint._get_hash_recursive(newparents) + hash:rotate(1) + + return hash +end + +BoundingBox._packed_fingerprint = lcm._pack.pack('>X', BoundingBox._get_hash_recursive({})) + +function BoundingBox:encode() + + return BoundingBox._packed_fingerprint .. self:_encode_one() +end + +function BoundingBox:_encode_one() + + local buf_table = {} + + table.insert(buf_table, self.min_pt:_encode_one()) + table.insert(buf_table, self.max_pt:_encode_one()) + + return table.concat(buf_table) +end + +function BoundingBox.decode(data) + + if data:sub(1, 8) ~= BoundingBox._packed_fingerprint then + error('bad fingerprint') + end + + return BoundingBox._decode_one(data:sub(9)) +end + +function BoundingBox._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = BoundingBox:new() + + obj.min_pt = geographic_msgs_GeoPoint._decode_one(data) + obj.max_pt = geographic_msgs_GeoPoint._decode_one(data) + + return obj +end + +return BoundingBox + diff --git a/generated/lua_lcm_msgs/geographic_msgs/GeoPath.lua b/generated/lua_lcm_msgs/geographic_msgs/GeoPath.lua new file mode 100644 index 0000000..29b8434 --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/GeoPath.lua @@ -0,0 +1,129 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local std_msgs_Header = require('std_msgs.Header') +local geographic_msgs_GeoPoseStamped = require('geographic_msgs.GeoPoseStamped') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local GeoPath = {} +GeoPath.__index = GeoPath + +GeoPath.name = 'geographic_msgs.GeoPath' +GeoPath.packagename = 'geographic_msgs' +GeoPath.shortname = 'GeoPath' + +function GeoPath:new() + + local obj = {} + + obj.poses_length = 0 + obj.header = nil + obj.poses = {} + + setmetatable(obj, self) + + return obj +end + +function GeoPath._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == GeoPath then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, GeoPath) + + local hash = lcm._hash.new('0xc779b6acc503055a') + + std_msgs_Header._get_hash_recursive(newparents) + + geographic_msgs_GeoPoseStamped._get_hash_recursive(newparents) + hash:rotate(1) + + return hash +end + +GeoPath._packed_fingerprint = lcm._pack.pack('>X', GeoPath._get_hash_recursive({})) + +function GeoPath:encode() + + return GeoPath._packed_fingerprint .. self:_encode_one() +end + +function GeoPath:_encode_one() + + local buf_table = {} + + table.insert(buf_table, lcm._pack.pack('>i', self.poses_length)) + table.insert(buf_table, self.header:_encode_one()) + for i0 = 1, self.poses_length do + table.insert(buf_table, self.poses[i0]:_encode_one()) + end + + return table.concat(buf_table) +end + +function GeoPath.decode(data) + + if data:sub(1, 8) ~= GeoPath._packed_fingerprint then + error('bad fingerprint') + end + + return GeoPath._decode_one(data:sub(9)) +end + +function GeoPath._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = GeoPath:new() + + obj.poses_length = lcm._pack.unpack('>i', data:read(4)) + obj.header = std_msgs_Header._decode_one(data) + obj.poses = {} + for i0 = 1, obj.poses_length do + obj.poses[i0] = geographic_msgs_GeoPoseStamped._decode_one(data) + end + + return obj +end + +return GeoPath + diff --git a/generated/lua_lcm_msgs/geographic_msgs/GeoPoint.lua b/generated/lua_lcm_msgs/geographic_msgs/GeoPoint.lua new file mode 100644 index 0000000..94abc5b --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/GeoPoint.lua @@ -0,0 +1,115 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local GeoPoint = {} +GeoPoint.__index = GeoPoint + +GeoPoint.name = 'geographic_msgs.GeoPoint' +GeoPoint.packagename = 'geographic_msgs' +GeoPoint.shortname = 'GeoPoint' + +function GeoPoint:new() + + local obj = {} + + obj.latitude = 0.0 + obj.longitude = 0.0 + obj.altitude = 0.0 + + setmetatable(obj, self) + + return obj +end + +function GeoPoint._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == GeoPoint then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, GeoPoint) + + local hash = lcm._hash.new('0xb84ee2b89179c84e') + hash:rotate(1) + + return hash +end + +GeoPoint._packed_fingerprint = lcm._pack.pack('>X', GeoPoint._get_hash_recursive({})) + +function GeoPoint:encode() + + return GeoPoint._packed_fingerprint .. self:_encode_one() +end + +function GeoPoint:_encode_one() + + local buf_table = {} + + table.insert(buf_table, lcm._pack.pack('>ddd', self.latitude, self.longitude, self.altitude)) + + return table.concat(buf_table) +end + +function GeoPoint.decode(data) + + if data:sub(1, 8) ~= GeoPoint._packed_fingerprint then + error('bad fingerprint') + end + + return GeoPoint._decode_one(data:sub(9)) +end + +function GeoPoint._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = GeoPoint:new() + + obj.latitude, obj.longitude, obj.altitude = lcm._pack.unpack('>ddd', data:read(24)) + + return obj +end + +return GeoPoint + diff --git a/generated/lua_lcm_msgs/geographic_msgs/GeoPointStamped.lua b/generated/lua_lcm_msgs/geographic_msgs/GeoPointStamped.lua new file mode 100644 index 0000000..a729e53 --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/GeoPointStamped.lua @@ -0,0 +1,121 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local geographic_msgs_GeoPoint = require('geographic_msgs.GeoPoint') +local std_msgs_Header = require('std_msgs.Header') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local GeoPointStamped = {} +GeoPointStamped.__index = GeoPointStamped + +GeoPointStamped.name = 'geographic_msgs.GeoPointStamped' +GeoPointStamped.packagename = 'geographic_msgs' +GeoPointStamped.shortname = 'GeoPointStamped' + +function GeoPointStamped:new() + + local obj = {} + + obj.header = nil + obj.position = nil + + setmetatable(obj, self) + + return obj +end + +function GeoPointStamped._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == GeoPointStamped then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, GeoPointStamped) + + local hash = lcm._hash.new('0x3a3685292ab14382') + + std_msgs_Header._get_hash_recursive(newparents) + + geographic_msgs_GeoPoint._get_hash_recursive(newparents) + hash:rotate(1) + + return hash +end + +GeoPointStamped._packed_fingerprint = lcm._pack.pack('>X', GeoPointStamped._get_hash_recursive({})) + +function GeoPointStamped:encode() + + return GeoPointStamped._packed_fingerprint .. self:_encode_one() +end + +function GeoPointStamped:_encode_one() + + local buf_table = {} + + table.insert(buf_table, self.header:_encode_one()) + table.insert(buf_table, self.position:_encode_one()) + + return table.concat(buf_table) +end + +function GeoPointStamped.decode(data) + + if data:sub(1, 8) ~= GeoPointStamped._packed_fingerprint then + error('bad fingerprint') + end + + return GeoPointStamped._decode_one(data:sub(9)) +end + +function GeoPointStamped._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = GeoPointStamped:new() + + obj.header = std_msgs_Header._decode_one(data) + obj.position = geographic_msgs_GeoPoint._decode_one(data) + + return obj +end + +return GeoPointStamped + diff --git a/generated/lua_lcm_msgs/geographic_msgs/GeoPose.lua b/generated/lua_lcm_msgs/geographic_msgs/GeoPose.lua new file mode 100644 index 0000000..251d33c --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/GeoPose.lua @@ -0,0 +1,121 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local geographic_msgs_GeoPoint = require('geographic_msgs.GeoPoint') +local geometry_msgs_Quaternion = require('geometry_msgs.Quaternion') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local GeoPose = {} +GeoPose.__index = GeoPose + +GeoPose.name = 'geographic_msgs.GeoPose' +GeoPose.packagename = 'geographic_msgs' +GeoPose.shortname = 'GeoPose' + +function GeoPose:new() + + local obj = {} + + obj.position = nil + obj.orientation = nil + + setmetatable(obj, self) + + return obj +end + +function GeoPose._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == GeoPose then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, GeoPose) + + local hash = lcm._hash.new('0x2d70dd60bd541272') + + geographic_msgs_GeoPoint._get_hash_recursive(newparents) + + geometry_msgs_Quaternion._get_hash_recursive(newparents) + hash:rotate(1) + + return hash +end + +GeoPose._packed_fingerprint = lcm._pack.pack('>X', GeoPose._get_hash_recursive({})) + +function GeoPose:encode() + + return GeoPose._packed_fingerprint .. self:_encode_one() +end + +function GeoPose:_encode_one() + + local buf_table = {} + + table.insert(buf_table, self.position:_encode_one()) + table.insert(buf_table, self.orientation:_encode_one()) + + return table.concat(buf_table) +end + +function GeoPose.decode(data) + + if data:sub(1, 8) ~= GeoPose._packed_fingerprint then + error('bad fingerprint') + end + + return GeoPose._decode_one(data:sub(9)) +end + +function GeoPose._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = GeoPose:new() + + obj.position = geographic_msgs_GeoPoint._decode_one(data) + obj.orientation = geometry_msgs_Quaternion._decode_one(data) + + return obj +end + +return GeoPose + diff --git a/generated/lua_lcm_msgs/geographic_msgs/GeoPoseStamped.lua b/generated/lua_lcm_msgs/geographic_msgs/GeoPoseStamped.lua new file mode 100644 index 0000000..184a1ed --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/GeoPoseStamped.lua @@ -0,0 +1,121 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local geographic_msgs_GeoPose = require('geographic_msgs.GeoPose') +local std_msgs_Header = require('std_msgs.Header') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local GeoPoseStamped = {} +GeoPoseStamped.__index = GeoPoseStamped + +GeoPoseStamped.name = 'geographic_msgs.GeoPoseStamped' +GeoPoseStamped.packagename = 'geographic_msgs' +GeoPoseStamped.shortname = 'GeoPoseStamped' + +function GeoPoseStamped:new() + + local obj = {} + + obj.header = nil + obj.pose = nil + + setmetatable(obj, self) + + return obj +end + +function GeoPoseStamped._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == GeoPoseStamped then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, GeoPoseStamped) + + local hash = lcm._hash.new('0xe10feebec5c97663') + + std_msgs_Header._get_hash_recursive(newparents) + + geographic_msgs_GeoPose._get_hash_recursive(newparents) + hash:rotate(1) + + return hash +end + +GeoPoseStamped._packed_fingerprint = lcm._pack.pack('>X', GeoPoseStamped._get_hash_recursive({})) + +function GeoPoseStamped:encode() + + return GeoPoseStamped._packed_fingerprint .. self:_encode_one() +end + +function GeoPoseStamped:_encode_one() + + local buf_table = {} + + table.insert(buf_table, self.header:_encode_one()) + table.insert(buf_table, self.pose:_encode_one()) + + return table.concat(buf_table) +end + +function GeoPoseStamped.decode(data) + + if data:sub(1, 8) ~= GeoPoseStamped._packed_fingerprint then + error('bad fingerprint') + end + + return GeoPoseStamped._decode_one(data:sub(9)) +end + +function GeoPoseStamped._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = GeoPoseStamped:new() + + obj.header = std_msgs_Header._decode_one(data) + obj.pose = geographic_msgs_GeoPose._decode_one(data) + + return obj +end + +return GeoPoseStamped + diff --git a/generated/lua_lcm_msgs/geographic_msgs/GeoPoseWithCovariance.lua b/generated/lua_lcm_msgs/geographic_msgs/GeoPoseWithCovariance.lua new file mode 100644 index 0000000..08bb0d6 --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/GeoPoseWithCovariance.lua @@ -0,0 +1,122 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local geographic_msgs_GeoPose = require('geographic_msgs.GeoPose') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local GeoPoseWithCovariance = {} +GeoPoseWithCovariance.__index = GeoPoseWithCovariance + +GeoPoseWithCovariance.name = 'geographic_msgs.GeoPoseWithCovariance' +GeoPoseWithCovariance.packagename = 'geographic_msgs' +GeoPoseWithCovariance.shortname = 'GeoPoseWithCovariance' + +function GeoPoseWithCovariance:new() + + local obj = {} + + obj.pose = nil + obj.covariance = {} + for d0 = 1, 36 do + obj.covariance[d0] = 0.0 + end + + setmetatable(obj, self) + + return obj +end + +function GeoPoseWithCovariance._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == GeoPoseWithCovariance then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, GeoPoseWithCovariance) + + local hash = lcm._hash.new('0x42dbdfaa69371237') + + geographic_msgs_GeoPose._get_hash_recursive(newparents) + hash:rotate(1) + + return hash +end + +GeoPoseWithCovariance._packed_fingerprint = lcm._pack.pack('>X', GeoPoseWithCovariance._get_hash_recursive({})) + +function GeoPoseWithCovariance:encode() + + return GeoPoseWithCovariance._packed_fingerprint .. self:_encode_one() +end + +function GeoPoseWithCovariance:_encode_one() + + local buf_table = {} + + table.insert(buf_table, self.pose:_encode_one()) + table.insert(buf_table, lcm._pack.pack('>36d', unpack(self.covariance))) + + return table.concat(buf_table) +end + +function GeoPoseWithCovariance.decode(data) + + if data:sub(1, 8) ~= GeoPoseWithCovariance._packed_fingerprint then + error('bad fingerprint') + end + + return GeoPoseWithCovariance._decode_one(data:sub(9)) +end + +function GeoPoseWithCovariance._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = GeoPoseWithCovariance:new() + + obj.pose = geographic_msgs_GeoPose._decode_one(data) + obj.covariance = {lcm._pack.unpack('>36d', data:read(288))} + + return obj +end + +return GeoPoseWithCovariance + diff --git a/generated/lua_lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.lua b/generated/lua_lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.lua new file mode 100644 index 0000000..194ef29 --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.lua @@ -0,0 +1,121 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local geographic_msgs_GeoPoseWithCovariance = require('geographic_msgs.GeoPoseWithCovariance') +local std_msgs_Header = require('std_msgs.Header') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local GeoPoseWithCovarianceStamped = {} +GeoPoseWithCovarianceStamped.__index = GeoPoseWithCovarianceStamped + +GeoPoseWithCovarianceStamped.name = 'geographic_msgs.GeoPoseWithCovarianceStamped' +GeoPoseWithCovarianceStamped.packagename = 'geographic_msgs' +GeoPoseWithCovarianceStamped.shortname = 'GeoPoseWithCovarianceStamped' + +function GeoPoseWithCovarianceStamped:new() + + local obj = {} + + obj.header = nil + obj.pose = nil + + setmetatable(obj, self) + + return obj +end + +function GeoPoseWithCovarianceStamped._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == GeoPoseWithCovarianceStamped then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, GeoPoseWithCovarianceStamped) + + local hash = lcm._hash.new('0xe10feebec5c97663') + + std_msgs_Header._get_hash_recursive(newparents) + + geographic_msgs_GeoPoseWithCovariance._get_hash_recursive(newparents) + hash:rotate(1) + + return hash +end + +GeoPoseWithCovarianceStamped._packed_fingerprint = lcm._pack.pack('>X', GeoPoseWithCovarianceStamped._get_hash_recursive({})) + +function GeoPoseWithCovarianceStamped:encode() + + return GeoPoseWithCovarianceStamped._packed_fingerprint .. self:_encode_one() +end + +function GeoPoseWithCovarianceStamped:_encode_one() + + local buf_table = {} + + table.insert(buf_table, self.header:_encode_one()) + table.insert(buf_table, self.pose:_encode_one()) + + return table.concat(buf_table) +end + +function GeoPoseWithCovarianceStamped.decode(data) + + if data:sub(1, 8) ~= GeoPoseWithCovarianceStamped._packed_fingerprint then + error('bad fingerprint') + end + + return GeoPoseWithCovarianceStamped._decode_one(data:sub(9)) +end + +function GeoPoseWithCovarianceStamped._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = GeoPoseWithCovarianceStamped:new() + + obj.header = std_msgs_Header._decode_one(data) + obj.pose = geographic_msgs_GeoPoseWithCovariance._decode_one(data) + + return obj +end + +return GeoPoseWithCovarianceStamped + diff --git a/generated/lua_lcm_msgs/geographic_msgs/GeographicMap.lua b/generated/lua_lcm_msgs/geographic_msgs/GeographicMap.lua new file mode 100644 index 0000000..4fea600 --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/GeographicMap.lua @@ -0,0 +1,161 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local geographic_msgs_BoundingBox = require('geographic_msgs.BoundingBox') +local geographic_msgs_KeyValue = require('geographic_msgs.KeyValue') +local uuid_msgs_UniqueID = require('uuid_msgs.UniqueID') +local geographic_msgs_MapFeature = require('geographic_msgs.MapFeature') +local std_msgs_Header = require('std_msgs.Header') +local geographic_msgs_WayPoint = require('geographic_msgs.WayPoint') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local GeographicMap = {} +GeographicMap.__index = GeographicMap + +GeographicMap.name = 'geographic_msgs.GeographicMap' +GeographicMap.packagename = 'geographic_msgs' +GeographicMap.shortname = 'GeographicMap' + +function GeographicMap:new() + + local obj = {} + + obj.points_length = 0 + obj.features_length = 0 + obj.props_length = 0 + obj.header = nil + obj.id = nil + obj.bounds = nil + obj.points = {} + obj.features = {} + obj.props = {} + + setmetatable(obj, self) + + return obj +end + +function GeographicMap._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == GeographicMap then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, GeographicMap) + + local hash = lcm._hash.new('0xb24465d7d9841c65') + + std_msgs_Header._get_hash_recursive(newparents) + + uuid_msgs_UniqueID._get_hash_recursive(newparents) + + geographic_msgs_BoundingBox._get_hash_recursive(newparents) + + geographic_msgs_WayPoint._get_hash_recursive(newparents) + + geographic_msgs_MapFeature._get_hash_recursive(newparents) + + geographic_msgs_KeyValue._get_hash_recursive(newparents) + hash:rotate(1) + + return hash +end + +GeographicMap._packed_fingerprint = lcm._pack.pack('>X', GeographicMap._get_hash_recursive({})) + +function GeographicMap:encode() + + return GeographicMap._packed_fingerprint .. self:_encode_one() +end + +function GeographicMap:_encode_one() + + local buf_table = {} + + table.insert(buf_table, lcm._pack.pack('>iii', self.points_length, self.features_length, self.props_length)) + table.insert(buf_table, self.header:_encode_one()) + table.insert(buf_table, self.id:_encode_one()) + table.insert(buf_table, self.bounds:_encode_one()) + for i0 = 1, self.points_length do + table.insert(buf_table, self.points[i0]:_encode_one()) + end + for i0 = 1, self.features_length do + table.insert(buf_table, self.features[i0]:_encode_one()) + end + for i0 = 1, self.props_length do + table.insert(buf_table, self.props[i0]:_encode_one()) + end + + return table.concat(buf_table) +end + +function GeographicMap.decode(data) + + if data:sub(1, 8) ~= GeographicMap._packed_fingerprint then + error('bad fingerprint') + end + + return GeographicMap._decode_one(data:sub(9)) +end + +function GeographicMap._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = GeographicMap:new() + + obj.points_length, obj.features_length, obj.props_length = lcm._pack.unpack('>iii', data:read(12)) + obj.header = std_msgs_Header._decode_one(data) + obj.id = uuid_msgs_UniqueID._decode_one(data) + obj.bounds = geographic_msgs_BoundingBox._decode_one(data) + obj.points = {} + for i0 = 1, obj.points_length do + obj.points[i0] = geographic_msgs_WayPoint._decode_one(data) + end + obj.features = {} + for i0 = 1, obj.features_length do + obj.features[i0] = geographic_msgs_MapFeature._decode_one(data) + end + obj.props = {} + for i0 = 1, obj.props_length do + obj.props[i0] = geographic_msgs_KeyValue._decode_one(data) + end + + return obj +end + +return GeographicMap + diff --git a/generated/lua_lcm_msgs/geographic_msgs/GeographicMapChanges.lua b/generated/lua_lcm_msgs/geographic_msgs/GeographicMapChanges.lua new file mode 100644 index 0000000..d8a2c10 --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/GeographicMapChanges.lua @@ -0,0 +1,134 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local geographic_msgs_GeographicMap = require('geographic_msgs.GeographicMap') +local uuid_msgs_UniqueID = require('uuid_msgs.UniqueID') +local std_msgs_Header = require('std_msgs.Header') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local GeographicMapChanges = {} +GeographicMapChanges.__index = GeographicMapChanges + +GeographicMapChanges.name = 'geographic_msgs.GeographicMapChanges' +GeographicMapChanges.packagename = 'geographic_msgs' +GeographicMapChanges.shortname = 'GeographicMapChanges' + +function GeographicMapChanges:new() + + local obj = {} + + obj.deletes_length = 0 + obj.header = nil + obj.diffs = nil + obj.deletes = {} + + setmetatable(obj, self) + + return obj +end + +function GeographicMapChanges._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == GeographicMapChanges then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, GeographicMapChanges) + + local hash = lcm._hash.new('0x5d92adbb4d9db2cb') + + std_msgs_Header._get_hash_recursive(newparents) + + geographic_msgs_GeographicMap._get_hash_recursive(newparents) + + uuid_msgs_UniqueID._get_hash_recursive(newparents) + hash:rotate(1) + + return hash +end + +GeographicMapChanges._packed_fingerprint = lcm._pack.pack('>X', GeographicMapChanges._get_hash_recursive({})) + +function GeographicMapChanges:encode() + + return GeographicMapChanges._packed_fingerprint .. self:_encode_one() +end + +function GeographicMapChanges:_encode_one() + + local buf_table = {} + + table.insert(buf_table, lcm._pack.pack('>i', self.deletes_length)) + table.insert(buf_table, self.header:_encode_one()) + table.insert(buf_table, self.diffs:_encode_one()) + for i0 = 1, self.deletes_length do + table.insert(buf_table, self.deletes[i0]:_encode_one()) + end + + return table.concat(buf_table) +end + +function GeographicMapChanges.decode(data) + + if data:sub(1, 8) ~= GeographicMapChanges._packed_fingerprint then + error('bad fingerprint') + end + + return GeographicMapChanges._decode_one(data:sub(9)) +end + +function GeographicMapChanges._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = GeographicMapChanges:new() + + obj.deletes_length = lcm._pack.unpack('>i', data:read(4)) + obj.header = std_msgs_Header._decode_one(data) + obj.diffs = geographic_msgs_GeographicMap._decode_one(data) + obj.deletes = {} + for i0 = 1, obj.deletes_length do + obj.deletes[i0] = uuid_msgs_UniqueID._decode_one(data) + end + + return obj +end + +return GeographicMapChanges + diff --git a/generated/lua_lcm_msgs/geographic_msgs/KeyValue.lua b/generated/lua_lcm_msgs/geographic_msgs/KeyValue.lua new file mode 100644 index 0000000..08f3cff --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/KeyValue.lua @@ -0,0 +1,122 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local KeyValue = {} +KeyValue.__index = KeyValue + +KeyValue.name = 'geographic_msgs.KeyValue' +KeyValue.packagename = 'geographic_msgs' +KeyValue.shortname = 'KeyValue' + +function KeyValue:new() + + local obj = {} + + obj.key = '' + obj.value = '' + + setmetatable(obj, self) + + return obj +end + +function KeyValue._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == KeyValue then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, KeyValue) + + local hash = lcm._hash.new('0x97574015d52eedde') + hash:rotate(1) + + return hash +end + +KeyValue._packed_fingerprint = lcm._pack.pack('>X', KeyValue._get_hash_recursive({})) + +function KeyValue:encode() + + return KeyValue._packed_fingerprint .. self:_encode_one() +end + +function KeyValue:_encode_one() + + local buf_table = {} + + local __key_tmpstr = lcm._pack.prepare_string(self.key) + table.insert(buf_table, lcm._pack.pack('>I', #__key_tmpstr + 1)) + table.insert(buf_table, __key_tmpstr .. '\0') + local __value_tmpstr = lcm._pack.prepare_string(self.value) + table.insert(buf_table, lcm._pack.pack('>I', #__value_tmpstr + 1)) + table.insert(buf_table, __value_tmpstr .. '\0') + + return table.concat(buf_table) +end + +function KeyValue.decode(data) + + if data:sub(1, 8) ~= KeyValue._packed_fingerprint then + error('bad fingerprint') + end + + return KeyValue._decode_one(data:sub(9)) +end + +function KeyValue._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = KeyValue:new() + + local __key_tmpstrlen = lcm._pack.unpack('>I', data:read(4)) + obj.key = lcm._pack.prepare_string(data:read(__key_tmpstrlen)) + local __value_tmpstrlen = lcm._pack.unpack('>I', data:read(4)) + obj.value = lcm._pack.prepare_string(data:read(__value_tmpstrlen)) + + return obj +end + +return KeyValue + diff --git a/generated/lua_lcm_msgs/geographic_msgs/MapFeature.lua b/generated/lua_lcm_msgs/geographic_msgs/MapFeature.lua new file mode 100644 index 0000000..fdbb7e9 --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/MapFeature.lua @@ -0,0 +1,139 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local geographic_msgs_KeyValue = require('geographic_msgs.KeyValue') +local uuid_msgs_UniqueID = require('uuid_msgs.UniqueID') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local MapFeature = {} +MapFeature.__index = MapFeature + +MapFeature.name = 'geographic_msgs.MapFeature' +MapFeature.packagename = 'geographic_msgs' +MapFeature.shortname = 'MapFeature' + +function MapFeature:new() + + local obj = {} + + obj.components_length = 0 + obj.props_length = 0 + obj.id = nil + obj.components = {} + obj.props = {} + + setmetatable(obj, self) + + return obj +end + +function MapFeature._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == MapFeature then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, MapFeature) + + local hash = lcm._hash.new('0x75975993f8dd2d22') + + uuid_msgs_UniqueID._get_hash_recursive(newparents) + + uuid_msgs_UniqueID._get_hash_recursive(newparents) + + geographic_msgs_KeyValue._get_hash_recursive(newparents) + hash:rotate(1) + + return hash +end + +MapFeature._packed_fingerprint = lcm._pack.pack('>X', MapFeature._get_hash_recursive({})) + +function MapFeature:encode() + + return MapFeature._packed_fingerprint .. self:_encode_one() +end + +function MapFeature:_encode_one() + + local buf_table = {} + + table.insert(buf_table, lcm._pack.pack('>ii', self.components_length, self.props_length)) + table.insert(buf_table, self.id:_encode_one()) + for i0 = 1, self.components_length do + table.insert(buf_table, self.components[i0]:_encode_one()) + end + for i0 = 1, self.props_length do + table.insert(buf_table, self.props[i0]:_encode_one()) + end + + return table.concat(buf_table) +end + +function MapFeature.decode(data) + + if data:sub(1, 8) ~= MapFeature._packed_fingerprint then + error('bad fingerprint') + end + + return MapFeature._decode_one(data:sub(9)) +end + +function MapFeature._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = MapFeature:new() + + obj.components_length, obj.props_length = lcm._pack.unpack('>ii', data:read(8)) + obj.id = uuid_msgs_UniqueID._decode_one(data) + obj.components = {} + for i0 = 1, obj.components_length do + obj.components[i0] = uuid_msgs_UniqueID._decode_one(data) + end + obj.props = {} + for i0 = 1, obj.props_length do + obj.props[i0] = geographic_msgs_KeyValue._decode_one(data) + end + + return obj +end + +return MapFeature + diff --git a/generated/lua_lcm_msgs/geographic_msgs/RouteNetwork.lua b/generated/lua_lcm_msgs/geographic_msgs/RouteNetwork.lua new file mode 100644 index 0000000..3da0e43 --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/RouteNetwork.lua @@ -0,0 +1,161 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local geographic_msgs_BoundingBox = require('geographic_msgs.BoundingBox') +local geographic_msgs_KeyValue = require('geographic_msgs.KeyValue') +local uuid_msgs_UniqueID = require('uuid_msgs.UniqueID') +local std_msgs_Header = require('std_msgs.Header') +local geographic_msgs_WayPoint = require('geographic_msgs.WayPoint') +local geographic_msgs_RouteSegment = require('geographic_msgs.RouteSegment') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local RouteNetwork = {} +RouteNetwork.__index = RouteNetwork + +RouteNetwork.name = 'geographic_msgs.RouteNetwork' +RouteNetwork.packagename = 'geographic_msgs' +RouteNetwork.shortname = 'RouteNetwork' + +function RouteNetwork:new() + + local obj = {} + + obj.points_length = 0 + obj.segments_length = 0 + obj.props_length = 0 + obj.header = nil + obj.id = nil + obj.bounds = nil + obj.points = {} + obj.segments = {} + obj.props = {} + + setmetatable(obj, self) + + return obj +end + +function RouteNetwork._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == RouteNetwork then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, RouteNetwork) + + local hash = lcm._hash.new('0xf50b14f90fc9a672') + + std_msgs_Header._get_hash_recursive(newparents) + + uuid_msgs_UniqueID._get_hash_recursive(newparents) + + geographic_msgs_BoundingBox._get_hash_recursive(newparents) + + geographic_msgs_WayPoint._get_hash_recursive(newparents) + + geographic_msgs_RouteSegment._get_hash_recursive(newparents) + + geographic_msgs_KeyValue._get_hash_recursive(newparents) + hash:rotate(1) + + return hash +end + +RouteNetwork._packed_fingerprint = lcm._pack.pack('>X', RouteNetwork._get_hash_recursive({})) + +function RouteNetwork:encode() + + return RouteNetwork._packed_fingerprint .. self:_encode_one() +end + +function RouteNetwork:_encode_one() + + local buf_table = {} + + table.insert(buf_table, lcm._pack.pack('>iii', self.points_length, self.segments_length, self.props_length)) + table.insert(buf_table, self.header:_encode_one()) + table.insert(buf_table, self.id:_encode_one()) + table.insert(buf_table, self.bounds:_encode_one()) + for i0 = 1, self.points_length do + table.insert(buf_table, self.points[i0]:_encode_one()) + end + for i0 = 1, self.segments_length do + table.insert(buf_table, self.segments[i0]:_encode_one()) + end + for i0 = 1, self.props_length do + table.insert(buf_table, self.props[i0]:_encode_one()) + end + + return table.concat(buf_table) +end + +function RouteNetwork.decode(data) + + if data:sub(1, 8) ~= RouteNetwork._packed_fingerprint then + error('bad fingerprint') + end + + return RouteNetwork._decode_one(data:sub(9)) +end + +function RouteNetwork._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = RouteNetwork:new() + + obj.points_length, obj.segments_length, obj.props_length = lcm._pack.unpack('>iii', data:read(12)) + obj.header = std_msgs_Header._decode_one(data) + obj.id = uuid_msgs_UniqueID._decode_one(data) + obj.bounds = geographic_msgs_BoundingBox._decode_one(data) + obj.points = {} + for i0 = 1, obj.points_length do + obj.points[i0] = geographic_msgs_WayPoint._decode_one(data) + end + obj.segments = {} + for i0 = 1, obj.segments_length do + obj.segments[i0] = geographic_msgs_RouteSegment._decode_one(data) + end + obj.props = {} + for i0 = 1, obj.props_length do + obj.props[i0] = geographic_msgs_KeyValue._decode_one(data) + end + + return obj +end + +return RouteNetwork + diff --git a/generated/lua_lcm_msgs/geographic_msgs/RoutePath.lua b/generated/lua_lcm_msgs/geographic_msgs/RoutePath.lua new file mode 100644 index 0000000..01a38de --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/RoutePath.lua @@ -0,0 +1,144 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local geographic_msgs_KeyValue = require('geographic_msgs.KeyValue') +local uuid_msgs_UniqueID = require('uuid_msgs.UniqueID') +local std_msgs_Header = require('std_msgs.Header') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local RoutePath = {} +RoutePath.__index = RoutePath + +RoutePath.name = 'geographic_msgs.RoutePath' +RoutePath.packagename = 'geographic_msgs' +RoutePath.shortname = 'RoutePath' + +function RoutePath:new() + + local obj = {} + + obj.segments_length = 0 + obj.props_length = 0 + obj.header = nil + obj.network = nil + obj.segments = {} + obj.props = {} + + setmetatable(obj, self) + + return obj +end + +function RoutePath._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == RoutePath then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, RoutePath) + + local hash = lcm._hash.new('0x2f0bab3ed05e12c3') + + std_msgs_Header._get_hash_recursive(newparents) + + uuid_msgs_UniqueID._get_hash_recursive(newparents) + + uuid_msgs_UniqueID._get_hash_recursive(newparents) + + geographic_msgs_KeyValue._get_hash_recursive(newparents) + hash:rotate(1) + + return hash +end + +RoutePath._packed_fingerprint = lcm._pack.pack('>X', RoutePath._get_hash_recursive({})) + +function RoutePath:encode() + + return RoutePath._packed_fingerprint .. self:_encode_one() +end + +function RoutePath:_encode_one() + + local buf_table = {} + + table.insert(buf_table, lcm._pack.pack('>ii', self.segments_length, self.props_length)) + table.insert(buf_table, self.header:_encode_one()) + table.insert(buf_table, self.network:_encode_one()) + for i0 = 1, self.segments_length do + table.insert(buf_table, self.segments[i0]:_encode_one()) + end + for i0 = 1, self.props_length do + table.insert(buf_table, self.props[i0]:_encode_one()) + end + + return table.concat(buf_table) +end + +function RoutePath.decode(data) + + if data:sub(1, 8) ~= RoutePath._packed_fingerprint then + error('bad fingerprint') + end + + return RoutePath._decode_one(data:sub(9)) +end + +function RoutePath._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = RoutePath:new() + + obj.segments_length, obj.props_length = lcm._pack.unpack('>ii', data:read(8)) + obj.header = std_msgs_Header._decode_one(data) + obj.network = uuid_msgs_UniqueID._decode_one(data) + obj.segments = {} + for i0 = 1, obj.segments_length do + obj.segments[i0] = uuid_msgs_UniqueID._decode_one(data) + end + obj.props = {} + for i0 = 1, obj.props_length do + obj.props[i0] = geographic_msgs_KeyValue._decode_one(data) + end + + return obj +end + +return RoutePath + diff --git a/generated/lua_lcm_msgs/geographic_msgs/RouteSegment.lua b/generated/lua_lcm_msgs/geographic_msgs/RouteSegment.lua new file mode 100644 index 0000000..12ebedc --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/RouteSegment.lua @@ -0,0 +1,137 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local geographic_msgs_KeyValue = require('geographic_msgs.KeyValue') +local uuid_msgs_UniqueID = require('uuid_msgs.UniqueID') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local RouteSegment = {} +RouteSegment.__index = RouteSegment + +RouteSegment.name = 'geographic_msgs.RouteSegment' +RouteSegment.packagename = 'geographic_msgs' +RouteSegment.shortname = 'RouteSegment' + +function RouteSegment:new() + + local obj = {} + + obj.props_length = 0 + obj.id = nil + obj.start = nil + obj["end"] = nil + obj.props = {} + + setmetatable(obj, self) + + return obj +end + +function RouteSegment._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == RouteSegment then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, RouteSegment) + + local hash = lcm._hash.new('0x2757afe165f2b650') + + uuid_msgs_UniqueID._get_hash_recursive(newparents) + + uuid_msgs_UniqueID._get_hash_recursive(newparents) + + uuid_msgs_UniqueID._get_hash_recursive(newparents) + + geographic_msgs_KeyValue._get_hash_recursive(newparents) + hash:rotate(1) + + return hash +end + +RouteSegment._packed_fingerprint = lcm._pack.pack('>X', RouteSegment._get_hash_recursive({})) + +function RouteSegment:encode() + + return RouteSegment._packed_fingerprint .. self:_encode_one() +end + +function RouteSegment:_encode_one() + + local buf_table = {} + + table.insert(buf_table, lcm._pack.pack('>i', self.props_length)) + table.insert(buf_table, self.id:_encode_one()) + table.insert(buf_table, self.start:_encode_one()) + table.insert(buf_table, self["end"]:_encode_one()) + for i0 = 1, self.props_length do + table.insert(buf_table, self.props[i0]:_encode_one()) + end + + return table.concat(buf_table) +end + +function RouteSegment.decode(data) + + if data:sub(1, 8) ~= RouteSegment._packed_fingerprint then + error('bad fingerprint') + end + + return RouteSegment._decode_one(data:sub(9)) +end + +function RouteSegment._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = RouteSegment:new() + + obj.props_length = lcm._pack.unpack('>i', data:read(4)) + obj.id = uuid_msgs_UniqueID._decode_one(data) + obj.start = uuid_msgs_UniqueID._decode_one(data) + obj["end"] = uuid_msgs_UniqueID._decode_one(data) + obj.props = {} + for i0 = 1, obj.props_length do + obj.props[i0] = geographic_msgs_KeyValue._decode_one(data) + end + + return obj +end + +return RouteSegment + diff --git a/generated/lua_lcm_msgs/geographic_msgs/WayPoint.lua b/generated/lua_lcm_msgs/geographic_msgs/WayPoint.lua new file mode 100644 index 0000000..3f16bb5 --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/WayPoint.lua @@ -0,0 +1,134 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local geographic_msgs_GeoPoint = require('geographic_msgs.GeoPoint') +local geographic_msgs_KeyValue = require('geographic_msgs.KeyValue') +local uuid_msgs_UniqueID = require('uuid_msgs.UniqueID') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local WayPoint = {} +WayPoint.__index = WayPoint + +WayPoint.name = 'geographic_msgs.WayPoint' +WayPoint.packagename = 'geographic_msgs' +WayPoint.shortname = 'WayPoint' + +function WayPoint:new() + + local obj = {} + + obj.props_length = 0 + obj.id = nil + obj.position = nil + obj.props = {} + + setmetatable(obj, self) + + return obj +end + +function WayPoint._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == WayPoint then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, WayPoint) + + local hash = lcm._hash.new('0xd32d71d9c391bc8f') + + uuid_msgs_UniqueID._get_hash_recursive(newparents) + + geographic_msgs_GeoPoint._get_hash_recursive(newparents) + + geographic_msgs_KeyValue._get_hash_recursive(newparents) + hash:rotate(1) + + return hash +end + +WayPoint._packed_fingerprint = lcm._pack.pack('>X', WayPoint._get_hash_recursive({})) + +function WayPoint:encode() + + return WayPoint._packed_fingerprint .. self:_encode_one() +end + +function WayPoint:_encode_one() + + local buf_table = {} + + table.insert(buf_table, lcm._pack.pack('>i', self.props_length)) + table.insert(buf_table, self.id:_encode_one()) + table.insert(buf_table, self.position:_encode_one()) + for i0 = 1, self.props_length do + table.insert(buf_table, self.props[i0]:_encode_one()) + end + + return table.concat(buf_table) +end + +function WayPoint.decode(data) + + if data:sub(1, 8) ~= WayPoint._packed_fingerprint then + error('bad fingerprint') + end + + return WayPoint._decode_one(data:sub(9)) +end + +function WayPoint._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = WayPoint:new() + + obj.props_length = lcm._pack.unpack('>i', data:read(4)) + obj.id = uuid_msgs_UniqueID._decode_one(data) + obj.position = geographic_msgs_GeoPoint._decode_one(data) + obj.props = {} + for i0 = 1, obj.props_length do + obj.props[i0] = geographic_msgs_KeyValue._decode_one(data) + end + + return obj +end + +return WayPoint + diff --git a/generated/lua_lcm_msgs/geographic_msgs/init.lua b/generated/lua_lcm_msgs/geographic_msgs/init.lua new file mode 100644 index 0000000..2f177e9 --- /dev/null +++ b/generated/lua_lcm_msgs/geographic_msgs/init.lua @@ -0,0 +1,28 @@ +--[[ +LCM package init.lua file +This file automatically generated by lcm-gen. +DO NOT MODIFY BY HAND!!!! +lcm-gen 1.5.2 +--]] + +local M = {} + +M.RoutePath = require('geographic_msgs.RoutePath') +M.MapFeature = require('geographic_msgs.MapFeature') +M.WayPoint = require('geographic_msgs.WayPoint') +M.GeoPoseWithCovarianceStamped = require('geographic_msgs.GeoPoseWithCovarianceStamped') +M.RouteSegment = require('geographic_msgs.RouteSegment') +M.GeoPoint = require('geographic_msgs.GeoPoint') +M.GeographicMapChanges = require('geographic_msgs.GeographicMapChanges') +M.BoundingBox = require('geographic_msgs.BoundingBox') +M.GeoPose = require('geographic_msgs.GeoPose') +M.GeographicMap = require('geographic_msgs.GeographicMap') +M.GeoPoseWithCovariance = require('geographic_msgs.GeoPoseWithCovariance') +M.GeoPointStamped = require('geographic_msgs.GeoPointStamped') +M.GeoPoseStamped = require('geographic_msgs.GeoPoseStamped') +M.RouteNetwork = require('geographic_msgs.RouteNetwork') +M.GeoPath = require('geographic_msgs.GeoPath') +M.KeyValue = require('geographic_msgs.KeyValue') + +return M + diff --git a/generated/lua_lcm_msgs/uuid_msgs/UniqueID.lua b/generated/lua_lcm_msgs/uuid_msgs/UniqueID.lua new file mode 100644 index 0000000..58e3892 --- /dev/null +++ b/generated/lua_lcm_msgs/uuid_msgs/UniqueID.lua @@ -0,0 +1,116 @@ +--[[ +LCM type definitions +This file automatically generated by lcm 1.5.2. +DO NOT MODIFY BY HAND!!!! +--]] + +local lcm = require('lcm') + +local setmetatable = setmetatable +local ipairs = ipairs +local table = table +local string = string +local unpack = unpack or table.unpack + +-- buffer helper for decoding +local _buffer_helper = {} +_buffer_helper.__index = _buffer_helper + +function _buffer_helper:new(data_str) + + local obj = {buffer = data_str, index = 1} + setmetatable(obj, self) + + return obj +end + +function _buffer_helper:read(n_bytes) + + local partial = self.buffer:sub(self.index, self.index + n_bytes - 1) + self.index = self.index + n_bytes + + if self.index > #self.buffer + 1 then + error('buffer ran out of bytes') + end + + return partial +end + +local UniqueID = {} +UniqueID.__index = UniqueID + +UniqueID.name = 'uuid_msgs.UniqueID' +UniqueID.packagename = 'uuid_msgs' +UniqueID.shortname = 'UniqueID' + +function UniqueID:new() + + local obj = {} + + obj.uuid = {} + for d0 = 1, 16 do + obj.uuid[d0] = 0 + end + + setmetatable(obj, self) + + return obj +end + +function UniqueID._get_hash_recursive(parents) + + local newparents = {} + + for _, v in ipairs(parents) do + if v == UniqueID then return lcm._hash.new('0x0') end + table.insert(newparents, v) + end + + table.insert(newparents, UniqueID) + + local hash = lcm._hash.new('0x697d4febd3ed5654') + hash:rotate(1) + + return hash +end + +UniqueID._packed_fingerprint = lcm._pack.pack('>X', UniqueID._get_hash_recursive({})) + +function UniqueID:encode() + + return UniqueID._packed_fingerprint .. self:_encode_one() +end + +function UniqueID:_encode_one() + + local buf_table = {} + + table.insert(buf_table, lcm._pack.pack('>16B', unpack(self.uuid))) + + return table.concat(buf_table) +end + +function UniqueID.decode(data) + + if data:sub(1, 8) ~= UniqueID._packed_fingerprint then + error('bad fingerprint') + end + + return UniqueID._decode_one(data:sub(9)) +end + +function UniqueID._decode_one(data) + + if not data.read then + data = _buffer_helper:new(data) + end + + local obj = UniqueID:new() + + obj.uuid = {lcm._pack.unpack('>16B', data:read(16))} + + return obj +end + +return UniqueID + diff --git a/generated/lua_lcm_msgs/uuid_msgs/init.lua b/generated/lua_lcm_msgs/uuid_msgs/init.lua new file mode 100644 index 0000000..36df85b --- /dev/null +++ b/generated/lua_lcm_msgs/uuid_msgs/init.lua @@ -0,0 +1,13 @@ +--[[ +LCM package init.lua file +This file automatically generated by lcm-gen. +DO NOT MODIFY BY HAND!!!! +lcm-gen 1.5.2 +--]] + +local M = {} + +M.UniqueID = require('uuid_msgs.UniqueID') + +return M + diff --git a/generated/python_lcm_msgs/fix_imports.py b/generated/python_lcm_msgs/fix_imports.py index 107fc71..bd4ee8f 100644 --- a/generated/python_lcm_msgs/fix_imports.py +++ b/generated/python_lcm_msgs/fix_imports.py @@ -19,11 +19,13 @@ "builtin_interfaces", "diagnostic_msgs", "foxglove_msgs", + "geographic_msgs", "nav_msgs", "shape_msgs", "stereo_msgs", "tf2_msgs", "trajectory_msgs", + "uuid_msgs", "vision_msgs", "visualization_msgs", ] diff --git a/generated/python_lcm_msgs/lcm_msgs/__init__.py b/generated/python_lcm_msgs/lcm_msgs/__init__.py index f3db419..2a538f0 100644 --- a/generated/python_lcm_msgs/lcm_msgs/__init__.py +++ b/generated/python_lcm_msgs/lcm_msgs/__init__.py @@ -1,3 +1,4 @@ """LCM generated Python bindings for ROS based types.""" -__version__ = "0.1.1" +# Keep in sync with [project].version in ../pyproject.toml +__version__ = "0.1.4" diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/BoundingBox.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/BoundingBox.py new file mode 100644 index 0000000..2ac8617 --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/BoundingBox.py @@ -0,0 +1,103 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + +from . import * +from .GeoPoint import GeoPoint + + +class BoundingBox(object): + msg_name = "geographic_msgs.BoundingBox" + + __slots__ = ["min_pt", "max_pt"] + + __typenames__ = ["GeoPoint", "GeoPoint"] + + __dimensions__ = [None, None] + + min_pt: GeoPoint + max_pt: GeoPoint + + def __init__(self, min_pt=GeoPoint(), max_pt=GeoPoint()): + # LCM Type: GeoPoint + self.min_pt = min_pt + # LCM Type: GeoPoint + self.max_pt = max_pt + + def lcm_encode(self): + buf = BytesIO() + buf.write(BoundingBox._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + assert ( + self.min_pt._get_packed_fingerprint() == GeoPoint._get_packed_fingerprint() + ) + self.min_pt._encode_one(buf) + assert ( + self.max_pt._get_packed_fingerprint() == GeoPoint._get_packed_fingerprint() + ) + self.max_pt._encode_one(buf) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.min_pt = cls._get_field_type("min_pt")._decode_one(buf) + self.max_pt = cls._get_field_type("max_pt")._decode_one(buf) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + newparents = parents + [cls] + tmphash = ( + 0xECB7CBAA66BCCDE0 + + GeoPoint._get_hash_recursive(newparents) + + GeoPoint._get_hash_recursive(newparents) + ) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPath.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPath.py new file mode 100644 index 0000000..2e922f1 --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPath.py @@ -0,0 +1,114 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + +from lcm_msgs import std_msgs +from . import * +from .GeoPoseStamped import GeoPoseStamped + + +class GeoPath(object): + msg_name = "geographic_msgs.GeoPath" + + __slots__ = ["poses_length", "header", "poses"] + + __typenames__ = ["int32_t", "std_msgs.Header", "GeoPoseStamped"] + + __dimensions__ = [None, None, ["poses_length"]] + + poses_length: "int32_t" + header: std_msgs.Header + poses: GeoPoseStamped + + def __init__(self, poses_length=0, header=std_msgs.Header(), poses=[]): + # LCM Type: int32_t + self.poses_length = poses_length + # LCM Type: std_msgs.Header + self.header = header + # LCM Type: GeoPoseStamped[poses_length] + self.poses = poses + + def lcm_encode(self): + buf = BytesIO() + buf.write(GeoPath._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + buf.write(struct.pack(">i", self.poses_length)) + assert ( + self.header._get_packed_fingerprint() + == std_msgs.Header._get_packed_fingerprint() + ) + self.header._encode_one(buf) + for i0 in range(self.poses_length): + assert ( + self.poses[i0]._get_packed_fingerprint() + == GeoPoseStamped._get_packed_fingerprint() + ) + self.poses[i0]._encode_one(buf) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.poses_length = struct.unpack(">i", buf.read(4))[0] + self.header = cls._get_field_type("header")._decode_one(buf) + self.poses = [] + for i0 in range(self.poses_length): + self.poses.append(cls._get_field_type("poses")._decode_one(buf)) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + newparents = parents + [cls] + tmphash = ( + 0xC779B6ACC503055A + + std_msgs.Header._get_hash_recursive(newparents) + + GeoPoseStamped._get_hash_recursive(newparents) + ) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPoint.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPoint.py new file mode 100644 index 0000000..308a0ae --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPoint.py @@ -0,0 +1,92 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + + +class GeoPoint(object): + msg_name = "geographic_msgs.GeoPoint" + + __slots__ = ["latitude", "longitude", "altitude"] + + __typenames__ = ["double", "double", "double"] + + __dimensions__ = [None, None, None] + + latitude: "double" + longitude: "double" + altitude: "double" + + def __init__(self, latitude=0.0, longitude=0.0, altitude=0.0): + # LCM Type: double + self.latitude = latitude + # LCM Type: double + self.longitude = longitude + # LCM Type: double + self.altitude = altitude + + def lcm_encode(self): + buf = BytesIO() + buf.write(GeoPoint._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + buf.write(struct.pack(">ddd", self.latitude, self.longitude, self.altitude)) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.latitude, self.longitude, self.altitude = struct.unpack( + ">ddd", buf.read(24) + ) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + tmphash = (0xB84EE2B89179C84E) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPointStamped.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPointStamped.py new file mode 100644 index 0000000..08bedc2 --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPointStamped.py @@ -0,0 +1,106 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + +from lcm_msgs import std_msgs +from . import * +from .GeoPoint import GeoPoint + + +class GeoPointStamped(object): + msg_name = "GeoPointStamped" + + __slots__ = ["header", "position"] + + __typenames__ = ["std_msgs.Header", "GeoPoint"] + + __dimensions__ = [None, None] + + header: std_msgs.Header + position: GeoPoint + + def __init__(self, header=std_msgs.Header(), position=GeoPoint()): + # LCM Type: std_msgs.Header + self.header = header + # LCM Type: GeoPoint + self.position = position + + def lcm_encode(self): + buf = BytesIO() + buf.write(GeoPointStamped._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + assert ( + self.header._get_packed_fingerprint() + == std_msgs.Header._get_packed_fingerprint() + ) + self.header._encode_one(buf) + assert ( + self.position._get_packed_fingerprint() + == GeoPoint._get_packed_fingerprint() + ) + self.position._encode_one(buf) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.header = cls._get_field_type("header")._decode_one(buf) + self.position = cls._get_field_type("position")._decode_one(buf) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + newparents = parents + [cls] + tmphash = ( + 0x3A3685292AB14382 + + std_msgs.Header._get_hash_recursive(newparents) + + GeoPoint._get_hash_recursive(newparents) + ) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPose.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPose.py new file mode 100644 index 0000000..04828d3 --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPose.py @@ -0,0 +1,106 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + +from lcm_msgs import geometry_msgs +from . import * +from .GeoPoint import GeoPoint + + +class GeoPose(object): + msg_name = "geographic_msgs.GeoPose" + + __slots__ = ["position", "orientation"] + + __typenames__ = ["GeoPoint", "geometry_msgs.Quaternion"] + + __dimensions__ = [None, None] + + position: GeoPoint + orientation: geometry_msgs.Quaternion + + def __init__(self, position=GeoPoint(), orientation=geometry_msgs.Quaternion()): + # LCM Type: GeoPoint + self.position = position + # LCM Type: geometry_msgs.Quaternion + self.orientation = orientation + + def lcm_encode(self): + buf = BytesIO() + buf.write(GeoPose._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + assert ( + self.position._get_packed_fingerprint() + == GeoPoint._get_packed_fingerprint() + ) + self.position._encode_one(buf) + assert ( + self.orientation._get_packed_fingerprint() + == geometry_msgs.Quaternion._get_packed_fingerprint() + ) + self.orientation._encode_one(buf) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.position = cls._get_field_type("position")._decode_one(buf) + self.orientation = cls._get_field_type("orientation")._decode_one(buf) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + newparents = parents + [cls] + tmphash = ( + 0x2D70DD60BD541272 + + GeoPoint._get_hash_recursive(newparents) + + geometry_msgs.Quaternion._get_hash_recursive(newparents) + ) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPoseStamped.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPoseStamped.py new file mode 100644 index 0000000..a36216b --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPoseStamped.py @@ -0,0 +1,103 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + +from lcm_msgs import std_msgs +from . import * +from .GeoPose import GeoPose + + +class GeoPoseStamped(object): + msg_name = "GeoPoseStamped" + + __slots__ = ["header", "pose"] + + __typenames__ = ["std_msgs.Header", "GeoPose"] + + __dimensions__ = [None, None] + + header: std_msgs.Header + pose: GeoPose + + def __init__(self, header=std_msgs.Header(), pose=GeoPose()): + # LCM Type: std_msgs.Header + self.header = header + # LCM Type: GeoPose + self.pose = pose + + def lcm_encode(self): + buf = BytesIO() + buf.write(GeoPoseStamped._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + assert ( + self.header._get_packed_fingerprint() + == std_msgs.Header._get_packed_fingerprint() + ) + self.header._encode_one(buf) + assert self.pose._get_packed_fingerprint() == GeoPose._get_packed_fingerprint() + self.pose._encode_one(buf) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.header = cls._get_field_type("header")._decode_one(buf) + self.pose = cls._get_field_type("pose")._decode_one(buf) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + newparents = parents + [cls] + tmphash = ( + 0xE10FEEBEC5C97663 + + std_msgs.Header._get_hash_recursive(newparents) + + GeoPose._get_hash_recursive(newparents) + ) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPoseWithCovariance.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPoseWithCovariance.py new file mode 100644 index 0000000..6c49e6a --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPoseWithCovariance.py @@ -0,0 +1,96 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + +from . import * +from .GeoPose import GeoPose + + +class GeoPoseWithCovariance(object): + msg_name = "GeoPoseWithCovariance" + + __slots__ = ["pose", "covariance"] + + __typenames__ = ["GeoPose", "double"] + + __dimensions__ = [None, [36]] + + pose: GeoPose + covariance: "double" + + def __init__(self, pose=GeoPose(), covariance=[0.0 for dim0 in range(36)]): + # LCM Type: GeoPose + self.pose = pose + # LCM Type: double[36] + self.covariance = covariance + + def lcm_encode(self): + buf = BytesIO() + buf.write(GeoPoseWithCovariance._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + assert self.pose._get_packed_fingerprint() == GeoPose._get_packed_fingerprint() + self.pose._encode_one(buf) + buf.write(struct.pack(">36d", *self.covariance[:36])) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.pose = cls._get_field_type("pose")._decode_one(buf) + self.covariance = struct.unpack(">36d", buf.read(288)) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + newparents = parents + [cls] + tmphash = ( + 0x42DBDFAA69371237 + GeoPose._get_hash_recursive(newparents) + ) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.py new file mode 100644 index 0000000..c536a41 --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.py @@ -0,0 +1,106 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + +from lcm_msgs import std_msgs +from . import * +from .GeoPoseWithCovariance import GeoPoseWithCovariance + + +class GeoPoseWithCovarianceStamped(object): + msg_name = "GeoPoseWithCovarianceStamped" + + __slots__ = ["header", "pose"] + + __typenames__ = ["std_msgs.Header", "GeoPoseWithCovariance"] + + __dimensions__ = [None, None] + + header: std_msgs.Header + pose: GeoPoseWithCovariance + + def __init__(self, header=std_msgs.Header(), pose=GeoPoseWithCovariance()): + # LCM Type: std_msgs.Header + self.header = header + # LCM Type: GeoPoseWithCovariance + self.pose = pose + + def lcm_encode(self): + buf = BytesIO() + buf.write(GeoPoseWithCovarianceStamped._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + assert ( + self.header._get_packed_fingerprint() + == std_msgs.Header._get_packed_fingerprint() + ) + self.header._encode_one(buf) + assert ( + self.pose._get_packed_fingerprint() + == GeoPoseWithCovariance._get_packed_fingerprint() + ) + self.pose._encode_one(buf) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.header = cls._get_field_type("header")._decode_one(buf) + self.pose = cls._get_field_type("pose")._decode_one(buf) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + newparents = parents + [cls] + tmphash = ( + 0xE10FEEBEC5C97663 + + std_msgs.Header._get_hash_recursive(newparents) + + GeoPoseWithCovariance._get_hash_recursive(newparents) + ) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeographicMap.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeographicMap.py new file mode 100644 index 0000000..fa1805a --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeographicMap.py @@ -0,0 +1,217 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + +from . import * +from lcm_msgs import std_msgs +from lcm_msgs import uuid_msgs +from .BoundingBox import BoundingBox +from .KeyValue import KeyValue +from .WayPoint import WayPoint +from .MapFeature import MapFeature + + +class GeographicMap(object): + msg_name = "geographic_msgs.GeographicMap" + + __slots__ = [ + "points_length", + "features_length", + "props_length", + "header", + "id", + "bounds", + "points", + "features", + "props", + ] + + __typenames__ = [ + "int32_t", + "int32_t", + "int32_t", + "std_msgs.Header", + "uuid_msgs.UniqueID", + "BoundingBox", + "WayPoint", + "MapFeature", + "KeyValue", + ] + + __dimensions__ = [ + None, + None, + None, + None, + None, + None, + ["points_length"], + ["features_length"], + ["props_length"], + ] + + points_length: "int32_t" + features_length: "int32_t" + props_length: "int32_t" + header: std_msgs.Header + id: uuid_msgs.UniqueID + bounds: BoundingBox + points: WayPoint + features: MapFeature + props: KeyValue + + def __init__( + self, + points_length=0, + features_length=0, + props_length=0, + header=std_msgs.Header(), + id=uuid_msgs.UniqueID(), + bounds=BoundingBox(), + points=[], + features=[], + props=[], + ): + # LCM Type: int32_t + self.points_length = points_length + # LCM Type: int32_t + self.features_length = features_length + # LCM Type: int32_t + self.props_length = props_length + # LCM Type: std_msgs.Header + self.header = header + # LCM Type: uuid_msgs.UniqueID + self.id = id + # LCM Type: BoundingBox + self.bounds = bounds + # LCM Type: WayPoint[points_length] + self.points = points + # LCM Type: MapFeature[features_length] + self.features = features + # LCM Type: KeyValue[props_length] + self.props = props + + def lcm_encode(self): + buf = BytesIO() + buf.write(GeographicMap._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + buf.write( + struct.pack( + ">iii", self.points_length, self.features_length, self.props_length + ) + ) + assert ( + self.header._get_packed_fingerprint() + == std_msgs.Header._get_packed_fingerprint() + ) + self.header._encode_one(buf) + assert ( + self.id._get_packed_fingerprint() + == uuid_msgs.UniqueID._get_packed_fingerprint() + ) + self.id._encode_one(buf) + assert ( + self.bounds._get_packed_fingerprint() + == BoundingBox._get_packed_fingerprint() + ) + self.bounds._encode_one(buf) + for i0 in range(self.points_length): + assert ( + self.points[i0]._get_packed_fingerprint() + == WayPoint._get_packed_fingerprint() + ) + self.points[i0]._encode_one(buf) + for i0 in range(self.features_length): + assert ( + self.features[i0]._get_packed_fingerprint() + == MapFeature._get_packed_fingerprint() + ) + self.features[i0]._encode_one(buf) + for i0 in range(self.props_length): + assert ( + self.props[i0]._get_packed_fingerprint() + == KeyValue._get_packed_fingerprint() + ) + self.props[i0]._encode_one(buf) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.points_length, self.features_length, self.props_length = struct.unpack( + ">iii", buf.read(12) + ) + self.header = cls._get_field_type("header")._decode_one(buf) + self.id = cls._get_field_type("id")._decode_one(buf) + self.bounds = cls._get_field_type("bounds")._decode_one(buf) + self.points = [] + for i0 in range(self.points_length): + self.points.append(cls._get_field_type("points")._decode_one(buf)) + self.features = [] + for i0 in range(self.features_length): + self.features.append(cls._get_field_type("features")._decode_one(buf)) + self.props = [] + for i0 in range(self.props_length): + self.props.append(cls._get_field_type("props")._decode_one(buf)) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + newparents = parents + [cls] + tmphash = ( + 0xB24465D7D9841C65 + + std_msgs.Header._get_hash_recursive(newparents) + + uuid_msgs.UniqueID._get_hash_recursive(newparents) + + BoundingBox._get_hash_recursive(newparents) + + WayPoint._get_hash_recursive(newparents) + + MapFeature._get_hash_recursive(newparents) + + KeyValue._get_hash_recursive(newparents) + ) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeographicMapChanges.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeographicMapChanges.py new file mode 100644 index 0000000..141150c --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/GeographicMapChanges.py @@ -0,0 +1,136 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + +from lcm_msgs import std_msgs +from . import * +from lcm_msgs import uuid_msgs +from .GeographicMap import GeographicMap + + +class GeographicMapChanges(object): + msg_name = "GeographicMapChanges" + + __slots__ = ["deletes_length", "header", "diffs", "deletes"] + + __typenames__ = [ + "int32_t", + "std_msgs.Header", + "GeographicMap", + "uuid_msgs.UniqueID", + ] + + __dimensions__ = [None, None, None, ["deletes_length"]] + + deletes_length: "int32_t" + header: std_msgs.Header + diffs: GeographicMap + deletes: uuid_msgs.UniqueID + + def __init__( + self, + deletes_length=0, + header=std_msgs.Header(), + diffs=GeographicMap(), + deletes=[], + ): + # LCM Type: int32_t + self.deletes_length = deletes_length + # LCM Type: std_msgs.Header + self.header = header + # LCM Type: GeographicMap + self.diffs = diffs + # LCM Type: uuid_msgs.UniqueID[deletes_length] + self.deletes = deletes + + def lcm_encode(self): + buf = BytesIO() + buf.write(GeographicMapChanges._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + buf.write(struct.pack(">i", self.deletes_length)) + assert ( + self.header._get_packed_fingerprint() + == std_msgs.Header._get_packed_fingerprint() + ) + self.header._encode_one(buf) + assert ( + self.diffs._get_packed_fingerprint() + == GeographicMap._get_packed_fingerprint() + ) + self.diffs._encode_one(buf) + for i0 in range(self.deletes_length): + assert ( + self.deletes[i0]._get_packed_fingerprint() + == uuid_msgs.UniqueID._get_packed_fingerprint() + ) + self.deletes[i0]._encode_one(buf) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.deletes_length = struct.unpack(">i", buf.read(4))[0] + self.header = cls._get_field_type("header")._decode_one(buf) + self.diffs = cls._get_field_type("diffs")._decode_one(buf) + self.deletes = [] + for i0 in range(self.deletes_length): + self.deletes.append(cls._get_field_type("deletes")._decode_one(buf)) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + newparents = parents + [cls] + tmphash = ( + 0x5D92ADBB4D9DB2CB + + std_msgs.Header._get_hash_recursive(newparents) + + GeographicMap._get_hash_recursive(newparents) + + uuid_msgs.UniqueID._get_hash_recursive(newparents) + ) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/KeyValue.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/KeyValue.py new file mode 100644 index 0000000..b52040a --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/KeyValue.py @@ -0,0 +1,97 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + + +class KeyValue(object): + msg_name = "geographic_msgs.KeyValue" + + __slots__ = ["key", "value"] + + __typenames__ = ["string", "string"] + + __dimensions__ = [None, None] + + key: "string" + value: "string" + + def __init__(self, key="", value=""): + # LCM Type: string + self.key = key + # LCM Type: string + self.value = value + + def lcm_encode(self): + buf = BytesIO() + buf.write(KeyValue._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + __key_encoded = self.key.encode("utf-8") + buf.write(struct.pack(">I", len(__key_encoded) + 1)) + buf.write(__key_encoded) + buf.write(b"\0") + __value_encoded = self.value.encode("utf-8") + buf.write(struct.pack(">I", len(__value_encoded) + 1)) + buf.write(__value_encoded) + buf.write(b"\0") + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + __key_len = struct.unpack(">I", buf.read(4))[0] + self.key = buf.read(__key_len)[:-1].decode("utf-8", "replace") + __value_len = struct.unpack(">I", buf.read(4))[0] + self.value = buf.read(__value_len)[:-1].decode("utf-8", "replace") + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + tmphash = (0x97574015D52EEDDE) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/MapFeature.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/MapFeature.py new file mode 100644 index 0000000..91a6e28 --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/MapFeature.py @@ -0,0 +1,143 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + +from . import * +from lcm_msgs import uuid_msgs +from .KeyValue import KeyValue + + +class MapFeature(object): + msg_name = "geographic_msgs.MapFeature" + + __slots__ = ["components_length", "props_length", "id", "components", "props"] + + __typenames__ = [ + "int32_t", + "int32_t", + "uuid_msgs.UniqueID", + "uuid_msgs.UniqueID", + "KeyValue", + ] + + __dimensions__ = [None, None, None, ["components_length"], ["props_length"]] + + components_length: "int32_t" + props_length: "int32_t" + id: uuid_msgs.UniqueID + components: uuid_msgs.UniqueID + props: KeyValue + + def __init__( + self, + components_length=0, + props_length=0, + id=uuid_msgs.UniqueID(), + components=[], + props=[], + ): + # LCM Type: int32_t + self.components_length = components_length + # LCM Type: int32_t + self.props_length = props_length + # LCM Type: uuid_msgs.UniqueID + self.id = id + # LCM Type: uuid_msgs.UniqueID[components_length] + self.components = components + # LCM Type: KeyValue[props_length] + self.props = props + + def lcm_encode(self): + buf = BytesIO() + buf.write(MapFeature._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + buf.write(struct.pack(">ii", self.components_length, self.props_length)) + assert ( + self.id._get_packed_fingerprint() + == uuid_msgs.UniqueID._get_packed_fingerprint() + ) + self.id._encode_one(buf) + for i0 in range(self.components_length): + assert ( + self.components[i0]._get_packed_fingerprint() + == uuid_msgs.UniqueID._get_packed_fingerprint() + ) + self.components[i0]._encode_one(buf) + for i0 in range(self.props_length): + assert ( + self.props[i0]._get_packed_fingerprint() + == KeyValue._get_packed_fingerprint() + ) + self.props[i0]._encode_one(buf) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.components_length, self.props_length = struct.unpack(">ii", buf.read(8)) + self.id = cls._get_field_type("id")._decode_one(buf) + self.components = [] + for i0 in range(self.components_length): + self.components.append(cls._get_field_type("components")._decode_one(buf)) + self.props = [] + for i0 in range(self.props_length): + self.props.append(cls._get_field_type("props")._decode_one(buf)) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + newparents = parents + [cls] + tmphash = ( + 0x75975993F8DD2D22 + + uuid_msgs.UniqueID._get_hash_recursive(newparents) + + uuid_msgs.UniqueID._get_hash_recursive(newparents) + + KeyValue._get_hash_recursive(newparents) + ) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/RouteNetwork.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/RouteNetwork.py new file mode 100644 index 0000000..799b5a3 --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/RouteNetwork.py @@ -0,0 +1,217 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + +from . import * +from lcm_msgs import std_msgs +from lcm_msgs import uuid_msgs +from .BoundingBox import BoundingBox +from .KeyValue import KeyValue +from .WayPoint import WayPoint +from .RouteSegment import RouteSegment + + +class RouteNetwork(object): + msg_name = "geographic_msgs.RouteNetwork" + + __slots__ = [ + "points_length", + "segments_length", + "props_length", + "header", + "id", + "bounds", + "points", + "segments", + "props", + ] + + __typenames__ = [ + "int32_t", + "int32_t", + "int32_t", + "std_msgs.Header", + "uuid_msgs.UniqueID", + "BoundingBox", + "WayPoint", + "RouteSegment", + "KeyValue", + ] + + __dimensions__ = [ + None, + None, + None, + None, + None, + None, + ["points_length"], + ["segments_length"], + ["props_length"], + ] + + points_length: "int32_t" + segments_length: "int32_t" + props_length: "int32_t" + header: std_msgs.Header + id: uuid_msgs.UniqueID + bounds: BoundingBox + points: WayPoint + segments: RouteSegment + props: KeyValue + + def __init__( + self, + points_length=0, + segments_length=0, + props_length=0, + header=std_msgs.Header(), + id=uuid_msgs.UniqueID(), + bounds=BoundingBox(), + points=[], + segments=[], + props=[], + ): + # LCM Type: int32_t + self.points_length = points_length + # LCM Type: int32_t + self.segments_length = segments_length + # LCM Type: int32_t + self.props_length = props_length + # LCM Type: std_msgs.Header + self.header = header + # LCM Type: uuid_msgs.UniqueID + self.id = id + # LCM Type: BoundingBox + self.bounds = bounds + # LCM Type: WayPoint[points_length] + self.points = points + # LCM Type: RouteSegment[segments_length] + self.segments = segments + # LCM Type: KeyValue[props_length] + self.props = props + + def lcm_encode(self): + buf = BytesIO() + buf.write(RouteNetwork._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + buf.write( + struct.pack( + ">iii", self.points_length, self.segments_length, self.props_length + ) + ) + assert ( + self.header._get_packed_fingerprint() + == std_msgs.Header._get_packed_fingerprint() + ) + self.header._encode_one(buf) + assert ( + self.id._get_packed_fingerprint() + == uuid_msgs.UniqueID._get_packed_fingerprint() + ) + self.id._encode_one(buf) + assert ( + self.bounds._get_packed_fingerprint() + == BoundingBox._get_packed_fingerprint() + ) + self.bounds._encode_one(buf) + for i0 in range(self.points_length): + assert ( + self.points[i0]._get_packed_fingerprint() + == WayPoint._get_packed_fingerprint() + ) + self.points[i0]._encode_one(buf) + for i0 in range(self.segments_length): + assert ( + self.segments[i0]._get_packed_fingerprint() + == RouteSegment._get_packed_fingerprint() + ) + self.segments[i0]._encode_one(buf) + for i0 in range(self.props_length): + assert ( + self.props[i0]._get_packed_fingerprint() + == KeyValue._get_packed_fingerprint() + ) + self.props[i0]._encode_one(buf) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.points_length, self.segments_length, self.props_length = struct.unpack( + ">iii", buf.read(12) + ) + self.header = cls._get_field_type("header")._decode_one(buf) + self.id = cls._get_field_type("id")._decode_one(buf) + self.bounds = cls._get_field_type("bounds")._decode_one(buf) + self.points = [] + for i0 in range(self.points_length): + self.points.append(cls._get_field_type("points")._decode_one(buf)) + self.segments = [] + for i0 in range(self.segments_length): + self.segments.append(cls._get_field_type("segments")._decode_one(buf)) + self.props = [] + for i0 in range(self.props_length): + self.props.append(cls._get_field_type("props")._decode_one(buf)) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + newparents = parents + [cls] + tmphash = ( + 0xF50B14F90FC9A672 + + std_msgs.Header._get_hash_recursive(newparents) + + uuid_msgs.UniqueID._get_hash_recursive(newparents) + + BoundingBox._get_hash_recursive(newparents) + + WayPoint._get_hash_recursive(newparents) + + RouteSegment._get_hash_recursive(newparents) + + KeyValue._get_hash_recursive(newparents) + ) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/RoutePath.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/RoutePath.py new file mode 100644 index 0000000..83cc657 --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/RoutePath.py @@ -0,0 +1,163 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + +from . import * +from lcm_msgs import std_msgs +from lcm_msgs import uuid_msgs +from .KeyValue import KeyValue + + +class RoutePath(object): + msg_name = "geographic_msgs.RoutePath" + + __slots__ = [ + "segments_length", + "props_length", + "header", + "network", + "segments", + "props", + ] + + __typenames__ = [ + "int32_t", + "int32_t", + "std_msgs.Header", + "uuid_msgs.UniqueID", + "uuid_msgs.UniqueID", + "KeyValue", + ] + + __dimensions__ = [None, None, None, None, ["segments_length"], ["props_length"]] + + segments_length: "int32_t" + props_length: "int32_t" + header: std_msgs.Header + network: uuid_msgs.UniqueID + segments: uuid_msgs.UniqueID + props: KeyValue + + def __init__( + self, + segments_length=0, + props_length=0, + header=std_msgs.Header(), + network=uuid_msgs.UniqueID(), + segments=[], + props=[], + ): + # LCM Type: int32_t + self.segments_length = segments_length + # LCM Type: int32_t + self.props_length = props_length + # LCM Type: std_msgs.Header + self.header = header + # LCM Type: uuid_msgs.UniqueID + self.network = network + # LCM Type: uuid_msgs.UniqueID[segments_length] + self.segments = segments + # LCM Type: KeyValue[props_length] + self.props = props + + def lcm_encode(self): + buf = BytesIO() + buf.write(RoutePath._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + buf.write(struct.pack(">ii", self.segments_length, self.props_length)) + assert ( + self.header._get_packed_fingerprint() + == std_msgs.Header._get_packed_fingerprint() + ) + self.header._encode_one(buf) + assert ( + self.network._get_packed_fingerprint() + == uuid_msgs.UniqueID._get_packed_fingerprint() + ) + self.network._encode_one(buf) + for i0 in range(self.segments_length): + assert ( + self.segments[i0]._get_packed_fingerprint() + == uuid_msgs.UniqueID._get_packed_fingerprint() + ) + self.segments[i0]._encode_one(buf) + for i0 in range(self.props_length): + assert ( + self.props[i0]._get_packed_fingerprint() + == KeyValue._get_packed_fingerprint() + ) + self.props[i0]._encode_one(buf) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.segments_length, self.props_length = struct.unpack(">ii", buf.read(8)) + self.header = cls._get_field_type("header")._decode_one(buf) + self.network = cls._get_field_type("network")._decode_one(buf) + self.segments = [] + for i0 in range(self.segments_length): + self.segments.append(cls._get_field_type("segments")._decode_one(buf)) + self.props = [] + for i0 in range(self.props_length): + self.props.append(cls._get_field_type("props")._decode_one(buf)) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + newparents = parents + [cls] + tmphash = ( + 0x2F0BAB3ED05E12C3 + + std_msgs.Header._get_hash_recursive(newparents) + + uuid_msgs.UniqueID._get_hash_recursive(newparents) + + uuid_msgs.UniqueID._get_hash_recursive(newparents) + + KeyValue._get_hash_recursive(newparents) + ) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/RouteSegment.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/RouteSegment.py new file mode 100644 index 0000000..84f92b8 --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/RouteSegment.py @@ -0,0 +1,147 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + +from . import * +from lcm_msgs import uuid_msgs +from .KeyValue import KeyValue + + +class RouteSegment(object): + msg_name = "geographic_msgs.RouteSegment" + + __slots__ = ["props_length", "id", "start", "end", "props"] + + __typenames__ = [ + "int32_t", + "uuid_msgs.UniqueID", + "uuid_msgs.UniqueID", + "uuid_msgs.UniqueID", + "KeyValue", + ] + + __dimensions__ = [None, None, None, None, ["props_length"]] + + props_length: "int32_t" + id: uuid_msgs.UniqueID + start: uuid_msgs.UniqueID + end: uuid_msgs.UniqueID + props: KeyValue + + def __init__( + self, + props_length=0, + id=uuid_msgs.UniqueID(), + start=uuid_msgs.UniqueID(), + end=uuid_msgs.UniqueID(), + props=[], + ): + # LCM Type: int32_t + self.props_length = props_length + # LCM Type: uuid_msgs.UniqueID + self.id = id + # LCM Type: uuid_msgs.UniqueID + self.start = start + # LCM Type: uuid_msgs.UniqueID + self.end = end + # LCM Type: KeyValue[props_length] + self.props = props + + def lcm_encode(self): + buf = BytesIO() + buf.write(RouteSegment._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + buf.write(struct.pack(">i", self.props_length)) + assert ( + self.id._get_packed_fingerprint() + == uuid_msgs.UniqueID._get_packed_fingerprint() + ) + self.id._encode_one(buf) + assert ( + self.start._get_packed_fingerprint() + == uuid_msgs.UniqueID._get_packed_fingerprint() + ) + self.start._encode_one(buf) + assert ( + self.end._get_packed_fingerprint() + == uuid_msgs.UniqueID._get_packed_fingerprint() + ) + self.end._encode_one(buf) + for i0 in range(self.props_length): + assert ( + self.props[i0]._get_packed_fingerprint() + == KeyValue._get_packed_fingerprint() + ) + self.props[i0]._encode_one(buf) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.props_length = struct.unpack(">i", buf.read(4))[0] + self.id = cls._get_field_type("id")._decode_one(buf) + self.start = cls._get_field_type("start")._decode_one(buf) + self.end = cls._get_field_type("end")._decode_one(buf) + self.props = [] + for i0 in range(self.props_length): + self.props.append(cls._get_field_type("props")._decode_one(buf)) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + newparents = parents + [cls] + tmphash = ( + 0x2757AFE165F2B650 + + uuid_msgs.UniqueID._get_hash_recursive(newparents) + + uuid_msgs.UniqueID._get_hash_recursive(newparents) + + uuid_msgs.UniqueID._get_hash_recursive(newparents) + + KeyValue._get_hash_recursive(newparents) + ) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/WayPoint.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/WayPoint.py new file mode 100644 index 0000000..bc5697a --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/WayPoint.py @@ -0,0 +1,127 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + +from . import * +from lcm_msgs import uuid_msgs +from .GeoPoint import GeoPoint +from .KeyValue import KeyValue + + +class WayPoint(object): + msg_name = "geographic_msgs.WayPoint" + + __slots__ = ["props_length", "id", "position", "props"] + + __typenames__ = ["int32_t", "uuid_msgs.UniqueID", "GeoPoint", "KeyValue"] + + __dimensions__ = [None, None, None, ["props_length"]] + + props_length: "int32_t" + id: uuid_msgs.UniqueID + position: GeoPoint + props: KeyValue + + def __init__( + self, props_length=0, id=uuid_msgs.UniqueID(), position=GeoPoint(), props=[] + ): + # LCM Type: int32_t + self.props_length = props_length + # LCM Type: uuid_msgs.UniqueID + self.id = id + # LCM Type: GeoPoint + self.position = position + # LCM Type: KeyValue[props_length] + self.props = props + + def lcm_encode(self): + buf = BytesIO() + buf.write(WayPoint._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + buf.write(struct.pack(">i", self.props_length)) + assert ( + self.id._get_packed_fingerprint() + == uuid_msgs.UniqueID._get_packed_fingerprint() + ) + self.id._encode_one(buf) + assert ( + self.position._get_packed_fingerprint() + == GeoPoint._get_packed_fingerprint() + ) + self.position._encode_one(buf) + for i0 in range(self.props_length): + assert ( + self.props[i0]._get_packed_fingerprint() + == KeyValue._get_packed_fingerprint() + ) + self.props[i0]._encode_one(buf) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.props_length = struct.unpack(">i", buf.read(4))[0] + self.id = cls._get_field_type("id")._decode_one(buf) + self.position = cls._get_field_type("position")._decode_one(buf) + self.props = [] + for i0 in range(self.props_length): + self.props.append(cls._get_field_type("props")._decode_one(buf)) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + newparents = parents + [cls] + tmphash = ( + 0xD32D71D9C391BC8F + + uuid_msgs.UniqueID._get_hash_recursive(newparents) + + GeoPoint._get_hash_recursive(newparents) + + KeyValue._get_hash_recursive(newparents) + ) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/__init__.py b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/__init__.py new file mode 100644 index 0000000..69b10a6 --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/geographic_msgs/__init__.py @@ -0,0 +1,24 @@ +"""LCM package __init__.py file +This file automatically generated by lcm-gen. +DO NOT MODIFY BY HAND!!!! +lcm-gen 1.5.2 +""" + +from .GeoPoseWithCovarianceStamped import ( + GeoPoseWithCovarianceStamped as GeoPoseWithCovarianceStamped, +) +from .GeographicMap import GeographicMap as GeographicMap +from .GeographicMapChanges import GeographicMapChanges as GeographicMapChanges +from .MapFeature import MapFeature as MapFeature +from .RouteNetwork import RouteNetwork as RouteNetwork +from .GeoPoseWithCovariance import GeoPoseWithCovariance as GeoPoseWithCovariance +from .GeoPointStamped import GeoPointStamped as GeoPointStamped +from .RouteSegment import RouteSegment as RouteSegment +from .GeoPoint import GeoPoint as GeoPoint +from .GeoPose import GeoPose as GeoPose +from .WayPoint import WayPoint as WayPoint +from .GeoPoseStamped import GeoPoseStamped as GeoPoseStamped +from .BoundingBox import BoundingBox as BoundingBox +from .GeoPath import GeoPath as GeoPath +from .RoutePath import RoutePath as RoutePath +from .KeyValue import KeyValue as KeyValue diff --git a/generated/python_lcm_msgs/lcm_msgs/uuid_msgs/UniqueID.py b/generated/python_lcm_msgs/lcm_msgs/uuid_msgs/UniqueID.py new file mode 100644 index 0000000..643e9da --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/uuid_msgs/UniqueID.py @@ -0,0 +1,84 @@ +"""LCM type definitions +This file automatically generated by lcm. +DO NOT MODIFY BY HAND!!!! +""" + +from io import BytesIO +import struct +import sys + + +class UniqueID(object): + msg_name = "uuid_msgs.UniqueID" + + __slots__ = ["uuid"] + + __typenames__ = ["byte"] + + __dimensions__ = [[16]] + + uuid: "byte" + + def __init__(self, uuid=b""): + # LCM Type: byte[16] + self.uuid = uuid + + def lcm_encode(self): + buf = BytesIO() + buf.write(UniqueID._get_packed_fingerprint()) + self._encode_one(buf) + return buf.getvalue() + + def _encode_one(self, buf): + buf.write(bytearray(self.uuid[:16])) + + @classmethod + def lcm_decode(cls, data: bytes): + if hasattr(data, "read"): + buf = data + else: + buf = BytesIO(data) + if buf.read(8) != cls._get_packed_fingerprint(): + raise ValueError("Decode error") + return cls._decode_one(buf) + + @classmethod + def _decode_one(cls, buf): + self = cls() + self.uuid = buf.read(16) + return self + + @classmethod + def _get_field_type(cls, field_name): + """Get the type for a field from annotations.""" + annotation = cls.__annotations__.get(field_name) + if annotation is None: + return None + if isinstance(annotation, str): + module = sys.modules[cls.__module__] + if hasattr(module, annotation): + return getattr(module, annotation) + return None + return annotation + + @classmethod + def _get_hash_recursive(cls, parents): + if cls in parents: + return 0 + tmphash = (0x697D4FEBD3ED5654) & 0xFFFFFFFFFFFFFFFF + tmphash = ( + ((tmphash << 1) & 0xFFFFFFFFFFFFFFFF) + (tmphash >> 63) + ) & 0xFFFFFFFFFFFFFFFF + return tmphash + + _packed_fingerprint = None + + @classmethod + def _get_packed_fingerprint(cls): + if cls._packed_fingerprint is None: + cls._packed_fingerprint = struct.pack(">Q", cls._get_hash_recursive([])) + return cls._packed_fingerprint + + def get_hash(self): + """Get the LCM hash of the struct""" + return struct.unpack(">Q", cls._get_packed_fingerprint())[0] diff --git a/generated/python_lcm_msgs/lcm_msgs/uuid_msgs/__init__.py b/generated/python_lcm_msgs/lcm_msgs/uuid_msgs/__init__.py new file mode 100644 index 0000000..66b60e7 --- /dev/null +++ b/generated/python_lcm_msgs/lcm_msgs/uuid_msgs/__init__.py @@ -0,0 +1,7 @@ +"""LCM package __init__.py file +This file automatically generated by lcm-gen. +DO NOT MODIFY BY HAND!!!! +lcm-gen 1.5.2 +""" + +from .UniqueID import UniqueID as UniqueID diff --git a/generated/python_lcm_msgs/pyproject.toml b/generated/python_lcm_msgs/pyproject.toml index 07b9ddc..24b42aa 100644 --- a/generated/python_lcm_msgs/pyproject.toml +++ b/generated/python_lcm_msgs/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "lcm_msgs" -version = "0.1.2" +version = "0.1.4" description = "LCM generated Python bindings for ROS based types" authors = [ {name = "Dimensional"} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/bounding_box.rs b/generated/rust_lcm_msgs/src/geographic_msgs/bounding_box.rs new file mode 100644 index 0000000..75420cb --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/bounding_box.rs @@ -0,0 +1,76 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct BoundingBox { + pub min_pt: crate::geographic_msgs::GeoPoint, + pub max_pt: crate::geographic_msgs::GeoPoint, +} + +impl BoundingBox { + pub const HASH: i64 = 0xECB7CBAA66BCCDE0u64 as i64; + pub const NAME: &str = "geographic_msgs.BoundingBox"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let mut tmphash = self_hash as u64; + tmphash = tmphash.wrapping_add(crate::geographic_msgs::GeoPoint::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::GeoPoint::hash_recursive(parents)); + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + self.min_pt.encode_one(buf)?; + self.max_pt.encode_one(buf)?; + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let min_pt = crate::geographic_msgs::GeoPoint::decode_one(buf)?; + let max_pt = crate::geographic_msgs::GeoPoint::decode_one(buf)?; + Ok(Self { + min_pt, + max_pt, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += self.min_pt.encoded_size(); + size += self.max_pt.encoded_size(); + size + } + +} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/geo_path.rs b/generated/rust_lcm_msgs/src/geographic_msgs/geo_path.rs new file mode 100644 index 0000000..906abc1 --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/geo_path.rs @@ -0,0 +1,90 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct GeoPath { + pub header: crate::std_msgs::Header, + pub poses: Vec, +} + +impl GeoPath { + pub const HASH: i64 = 0xC779B6ACC503055Au64 as i64; + pub const NAME: &str = "geographic_msgs.GeoPath"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let mut tmphash = self_hash as u64; + tmphash = tmphash.wrapping_add(crate::std_msgs::Header::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::GeoPoseStamped::hash_recursive(parents)); + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + buf.write_i32::(self.poses.len() as i32)?; + self.header.encode_one(buf)?; + for v0 in self.poses.iter() { + v0.encode_one(buf)?; + } + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let poses_length = buf.read_i32::()? as usize; + let header = crate::std_msgs::Header::decode_one(buf)?; + let poses = { + let mut v = Vec::with_capacity(poses_length); + for _ in 0..poses_length { + let _elem_0 = crate::geographic_msgs::GeoPoseStamped::decode_one(buf)?; + v.push(_elem_0); + } + v + }; + Ok(Self { + header, + poses, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += 4; + size += self.header.encoded_size(); + for v0 in self.poses.iter() { + size += v0.encoded_size(); + } + size + } + +} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/geo_point.rs b/generated/rust_lcm_msgs/src/geographic_msgs/geo_point.rs new file mode 100644 index 0000000..53cf2f3 --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/geo_point.rs @@ -0,0 +1,79 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct GeoPoint { + pub latitude: f64, + pub longitude: f64, + pub altitude: f64, +} + +impl GeoPoint { + pub const HASH: i64 = 0xB84EE2B89179C84Eu64 as i64; + pub const NAME: &str = "geographic_msgs.GeoPoint"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let tmphash = self_hash as u64; + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + buf.write_f64::(self.latitude)?; + buf.write_f64::(self.longitude)?; + buf.write_f64::(self.altitude)?; + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let latitude = buf.read_f64::()?; + let longitude = buf.read_f64::()?; + let altitude = buf.read_f64::()?; + Ok(Self { + latitude, + longitude, + altitude, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += 8; + size += 8; + size += 8; + size + } + +} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/geo_point_stamped.rs b/generated/rust_lcm_msgs/src/geographic_msgs/geo_point_stamped.rs new file mode 100644 index 0000000..d4de8b0 --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/geo_point_stamped.rs @@ -0,0 +1,76 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct GeoPointStamped { + pub header: crate::std_msgs::Header, + pub position: crate::geographic_msgs::GeoPoint, +} + +impl GeoPointStamped { + pub const HASH: i64 = 0x3A3685292AB14382u64 as i64; + pub const NAME: &str = "geographic_msgs.GeoPointStamped"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let mut tmphash = self_hash as u64; + tmphash = tmphash.wrapping_add(crate::std_msgs::Header::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::GeoPoint::hash_recursive(parents)); + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + self.header.encode_one(buf)?; + self.position.encode_one(buf)?; + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let header = crate::std_msgs::Header::decode_one(buf)?; + let position = crate::geographic_msgs::GeoPoint::decode_one(buf)?; + Ok(Self { + header, + position, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += self.header.encoded_size(); + size += self.position.encoded_size(); + size + } + +} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/geo_pose.rs b/generated/rust_lcm_msgs/src/geographic_msgs/geo_pose.rs new file mode 100644 index 0000000..c0538a1 --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/geo_pose.rs @@ -0,0 +1,76 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct GeoPose { + pub position: crate::geographic_msgs::GeoPoint, + pub orientation: crate::geometry_msgs::Quaternion, +} + +impl GeoPose { + pub const HASH: i64 = 0x2D70DD60BD541272u64 as i64; + pub const NAME: &str = "geographic_msgs.GeoPose"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let mut tmphash = self_hash as u64; + tmphash = tmphash.wrapping_add(crate::geographic_msgs::GeoPoint::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geometry_msgs::Quaternion::hash_recursive(parents)); + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + self.position.encode_one(buf)?; + self.orientation.encode_one(buf)?; + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let position = crate::geographic_msgs::GeoPoint::decode_one(buf)?; + let orientation = crate::geometry_msgs::Quaternion::decode_one(buf)?; + Ok(Self { + position, + orientation, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += self.position.encoded_size(); + size += self.orientation.encoded_size(); + size + } + +} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/geo_pose_stamped.rs b/generated/rust_lcm_msgs/src/geographic_msgs/geo_pose_stamped.rs new file mode 100644 index 0000000..7953fe8 --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/geo_pose_stamped.rs @@ -0,0 +1,76 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct GeoPoseStamped { + pub header: crate::std_msgs::Header, + pub pose: crate::geographic_msgs::GeoPose, +} + +impl GeoPoseStamped { + pub const HASH: i64 = 0xE10FEEBEC5C97663u64 as i64; + pub const NAME: &str = "geographic_msgs.GeoPoseStamped"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let mut tmphash = self_hash as u64; + tmphash = tmphash.wrapping_add(crate::std_msgs::Header::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::GeoPose::hash_recursive(parents)); + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + self.header.encode_one(buf)?; + self.pose.encode_one(buf)?; + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let header = crate::std_msgs::Header::decode_one(buf)?; + let pose = crate::geographic_msgs::GeoPose::decode_one(buf)?; + Ok(Self { + header, + pose, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += self.header.encoded_size(); + size += self.pose.encoded_size(); + size + } + +} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/geo_pose_with_covariance.rs b/generated/rust_lcm_msgs/src/geographic_msgs/geo_pose_with_covariance.rs new file mode 100644 index 0000000..227134a --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/geo_pose_with_covariance.rs @@ -0,0 +1,92 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, PartialEq)] +pub struct GeoPoseWithCovariance { + pub pose: crate::geographic_msgs::GeoPose, + pub covariance: [f64; 36], +} + +impl Default for GeoPoseWithCovariance { + fn default() -> Self { + Self { + pose: crate::geographic_msgs::GeoPose::default(), + covariance: [0f64; 36], + } + } +} + +impl GeoPoseWithCovariance { + pub const HASH: i64 = 0x42DBDFAA69371237u64 as i64; + pub const NAME: &str = "geographic_msgs.GeoPoseWithCovariance"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let mut tmphash = self_hash as u64; + tmphash = tmphash.wrapping_add(crate::geographic_msgs::GeoPose::hash_recursive(parents)); + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + self.pose.encode_one(buf)?; + for v0 in self.covariance.iter() { + buf.write_f64::(*v0)?; + } + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let pose = crate::geographic_msgs::GeoPose::decode_one(buf)?; + let covariance = { + let mut _arr_0 = [0.0f64; 36]; + for elem in _arr_0.iter_mut() { + *elem = buf.read_f64::()?; + } + _arr_0 + }; + Ok(Self { + pose, + covariance, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += self.pose.encoded_size(); + size += self.covariance.len() * 8; + size + } + +} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/geo_pose_with_covariance_stamped.rs b/generated/rust_lcm_msgs/src/geographic_msgs/geo_pose_with_covariance_stamped.rs new file mode 100644 index 0000000..a9e1de3 --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/geo_pose_with_covariance_stamped.rs @@ -0,0 +1,76 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct GeoPoseWithCovarianceStamped { + pub header: crate::std_msgs::Header, + pub pose: crate::geographic_msgs::GeoPoseWithCovariance, +} + +impl GeoPoseWithCovarianceStamped { + pub const HASH: i64 = 0xE10FEEBEC5C97663u64 as i64; + pub const NAME: &str = "geographic_msgs.GeoPoseWithCovarianceStamped"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let mut tmphash = self_hash as u64; + tmphash = tmphash.wrapping_add(crate::std_msgs::Header::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::GeoPoseWithCovariance::hash_recursive(parents)); + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + self.header.encode_one(buf)?; + self.pose.encode_one(buf)?; + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let header = crate::std_msgs::Header::decode_one(buf)?; + let pose = crate::geographic_msgs::GeoPoseWithCovariance::decode_one(buf)?; + Ok(Self { + header, + pose, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += self.header.encoded_size(); + size += self.pose.encoded_size(); + size + } + +} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/geographic_map.rs b/generated/rust_lcm_msgs/src/geographic_msgs/geographic_map.rs new file mode 100644 index 0000000..57ea2a3 --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/geographic_map.rs @@ -0,0 +1,142 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct GeographicMap { + pub header: crate::std_msgs::Header, + pub id: crate::uuid_msgs::UniqueID, + pub bounds: crate::geographic_msgs::BoundingBox, + pub points: Vec, + pub features: Vec, + pub props: Vec, +} + +impl GeographicMap { + pub const HASH: i64 = 0xB24465D7D9841C65u64 as i64; + pub const NAME: &str = "geographic_msgs.GeographicMap"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let mut tmphash = self_hash as u64; + tmphash = tmphash.wrapping_add(crate::std_msgs::Header::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::uuid_msgs::UniqueID::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::BoundingBox::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::WayPoint::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::MapFeature::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::KeyValue::hash_recursive(parents)); + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + buf.write_i32::(self.points.len() as i32)?; + buf.write_i32::(self.features.len() as i32)?; + buf.write_i32::(self.props.len() as i32)?; + self.header.encode_one(buf)?; + self.id.encode_one(buf)?; + self.bounds.encode_one(buf)?; + for v0 in self.points.iter() { + v0.encode_one(buf)?; + } + for v0 in self.features.iter() { + v0.encode_one(buf)?; + } + for v0 in self.props.iter() { + v0.encode_one(buf)?; + } + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let points_length = buf.read_i32::()? as usize; + let features_length = buf.read_i32::()? as usize; + let props_length = buf.read_i32::()? as usize; + let header = crate::std_msgs::Header::decode_one(buf)?; + let id = crate::uuid_msgs::UniqueID::decode_one(buf)?; + let bounds = crate::geographic_msgs::BoundingBox::decode_one(buf)?; + let points = { + let mut v = Vec::with_capacity(points_length); + for _ in 0..points_length { + let _elem_0 = crate::geographic_msgs::WayPoint::decode_one(buf)?; + v.push(_elem_0); + } + v + }; + let features = { + let mut v = Vec::with_capacity(features_length); + for _ in 0..features_length { + let _elem_0 = crate::geographic_msgs::MapFeature::decode_one(buf)?; + v.push(_elem_0); + } + v + }; + let props = { + let mut v = Vec::with_capacity(props_length); + for _ in 0..props_length { + let _elem_0 = crate::geographic_msgs::KeyValue::decode_one(buf)?; + v.push(_elem_0); + } + v + }; + Ok(Self { + header, + id, + bounds, + points, + features, + props, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += 4; + size += 4; + size += 4; + size += self.header.encoded_size(); + size += self.id.encoded_size(); + size += self.bounds.encoded_size(); + for v0 in self.points.iter() { + size += v0.encoded_size(); + } + for v0 in self.features.iter() { + size += v0.encoded_size(); + } + for v0 in self.props.iter() { + size += v0.encoded_size(); + } + size + } + +} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/geographic_map_changes.rs b/generated/rust_lcm_msgs/src/geographic_msgs/geographic_map_changes.rs new file mode 100644 index 0000000..d992020 --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/geographic_map_changes.rs @@ -0,0 +1,96 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct GeographicMapChanges { + pub header: crate::std_msgs::Header, + pub diffs: crate::geographic_msgs::GeographicMap, + pub deletes: Vec, +} + +impl GeographicMapChanges { + pub const HASH: i64 = 0x5D92ADBB4D9DB2CBu64 as i64; + pub const NAME: &str = "geographic_msgs.GeographicMapChanges"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let mut tmphash = self_hash as u64; + tmphash = tmphash.wrapping_add(crate::std_msgs::Header::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::GeographicMap::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::uuid_msgs::UniqueID::hash_recursive(parents)); + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + buf.write_i32::(self.deletes.len() as i32)?; + self.header.encode_one(buf)?; + self.diffs.encode_one(buf)?; + for v0 in self.deletes.iter() { + v0.encode_one(buf)?; + } + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let deletes_length = buf.read_i32::()? as usize; + let header = crate::std_msgs::Header::decode_one(buf)?; + let diffs = crate::geographic_msgs::GeographicMap::decode_one(buf)?; + let deletes = { + let mut v = Vec::with_capacity(deletes_length); + for _ in 0..deletes_length { + let _elem_0 = crate::uuid_msgs::UniqueID::decode_one(buf)?; + v.push(_elem_0); + } + v + }; + Ok(Self { + header, + diffs, + deletes, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += 4; + size += self.header.encoded_size(); + size += self.diffs.encoded_size(); + for v0 in self.deletes.iter() { + size += v0.encoded_size(); + } + size + } + +} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/key_value.rs b/generated/rust_lcm_msgs/src/geographic_msgs/key_value.rs new file mode 100644 index 0000000..88af1fb --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/key_value.rs @@ -0,0 +1,96 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct KeyValue { + pub key: std::string::String, + pub value: std::string::String, +} + +impl KeyValue { + pub const HASH: i64 = 0x97574015D52EEDDEu64 as i64; + pub const NAME: &str = "geographic_msgs.KeyValue"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let tmphash = self_hash as u64; + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + { + let bytes = self.key.as_bytes(); + buf.write_u32::((bytes.len() + 1) as u32)?; + buf.write_all(bytes)?; + buf.write_u8(0)?; + } + { + let bytes = self.value.as_bytes(); + buf.write_u32::((bytes.len() + 1) as u32)?; + buf.write_all(bytes)?; + buf.write_u8(0)?; + } + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let key = { + let len = buf.read_u32::()? as usize; + let mut bytes = vec![0u8; len]; + buf.read_exact(&mut bytes)?; + std::string::String::from_utf8(bytes[..len - 1].to_vec()) + .map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))? + }; + let value = { + let len = buf.read_u32::()? as usize; + let mut bytes = vec![0u8; len]; + buf.read_exact(&mut bytes)?; + std::string::String::from_utf8(bytes[..len - 1].to_vec()) + .map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))? + }; + Ok(Self { + key, + value, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += 4 + self.key.len() + 1; + size += 4 + self.value.len() + 1; + size + } + +} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/map_feature.rs b/generated/rust_lcm_msgs/src/geographic_msgs/map_feature.rs new file mode 100644 index 0000000..882099d --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/map_feature.rs @@ -0,0 +1,110 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct MapFeature { + pub id: crate::uuid_msgs::UniqueID, + pub components: Vec, + pub props: Vec, +} + +impl MapFeature { + pub const HASH: i64 = 0x75975993F8DD2D22u64 as i64; + pub const NAME: &str = "geographic_msgs.MapFeature"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let mut tmphash = self_hash as u64; + tmphash = tmphash.wrapping_add(crate::uuid_msgs::UniqueID::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::uuid_msgs::UniqueID::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::KeyValue::hash_recursive(parents)); + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + buf.write_i32::(self.components.len() as i32)?; + buf.write_i32::(self.props.len() as i32)?; + self.id.encode_one(buf)?; + for v0 in self.components.iter() { + v0.encode_one(buf)?; + } + for v0 in self.props.iter() { + v0.encode_one(buf)?; + } + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let components_length = buf.read_i32::()? as usize; + let props_length = buf.read_i32::()? as usize; + let id = crate::uuid_msgs::UniqueID::decode_one(buf)?; + let components = { + let mut v = Vec::with_capacity(components_length); + for _ in 0..components_length { + let _elem_0 = crate::uuid_msgs::UniqueID::decode_one(buf)?; + v.push(_elem_0); + } + v + }; + let props = { + let mut v = Vec::with_capacity(props_length); + for _ in 0..props_length { + let _elem_0 = crate::geographic_msgs::KeyValue::decode_one(buf)?; + v.push(_elem_0); + } + v + }; + Ok(Self { + id, + components, + props, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += 4; + size += 4; + size += self.id.encoded_size(); + for v0 in self.components.iter() { + size += v0.encoded_size(); + } + for v0 in self.props.iter() { + size += v0.encoded_size(); + } + size + } + +} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/mod.rs b/generated/rust_lcm_msgs/src/geographic_msgs/mod.rs new file mode 100644 index 0000000..6fec944 --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/mod.rs @@ -0,0 +1,49 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +mod bounding_box; +pub use bounding_box::BoundingBox; + +mod geo_path; +pub use geo_path::GeoPath; + +mod geo_point; +pub use geo_point::GeoPoint; + +mod geo_point_stamped; +pub use geo_point_stamped::GeoPointStamped; + +mod geo_pose; +pub use geo_pose::GeoPose; + +mod geo_pose_stamped; +pub use geo_pose_stamped::GeoPoseStamped; + +mod geo_pose_with_covariance; +pub use geo_pose_with_covariance::GeoPoseWithCovariance; + +mod geo_pose_with_covariance_stamped; +pub use geo_pose_with_covariance_stamped::GeoPoseWithCovarianceStamped; + +mod geographic_map; +pub use geographic_map::GeographicMap; + +mod geographic_map_changes; +pub use geographic_map_changes::GeographicMapChanges; + +mod key_value; +pub use key_value::KeyValue; + +mod map_feature; +pub use map_feature::MapFeature; + +mod route_network; +pub use route_network::RouteNetwork; + +mod route_path; +pub use route_path::RoutePath; + +mod route_segment; +pub use route_segment::RouteSegment; + +mod way_point; +pub use way_point::WayPoint; diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/route_network.rs b/generated/rust_lcm_msgs/src/geographic_msgs/route_network.rs new file mode 100644 index 0000000..d9ab593 --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/route_network.rs @@ -0,0 +1,142 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct RouteNetwork { + pub header: crate::std_msgs::Header, + pub id: crate::uuid_msgs::UniqueID, + pub bounds: crate::geographic_msgs::BoundingBox, + pub points: Vec, + pub segments: Vec, + pub props: Vec, +} + +impl RouteNetwork { + pub const HASH: i64 = 0xF50B14F90FC9A672u64 as i64; + pub const NAME: &str = "geographic_msgs.RouteNetwork"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let mut tmphash = self_hash as u64; + tmphash = tmphash.wrapping_add(crate::std_msgs::Header::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::uuid_msgs::UniqueID::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::BoundingBox::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::WayPoint::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::RouteSegment::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::KeyValue::hash_recursive(parents)); + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + buf.write_i32::(self.points.len() as i32)?; + buf.write_i32::(self.segments.len() as i32)?; + buf.write_i32::(self.props.len() as i32)?; + self.header.encode_one(buf)?; + self.id.encode_one(buf)?; + self.bounds.encode_one(buf)?; + for v0 in self.points.iter() { + v0.encode_one(buf)?; + } + for v0 in self.segments.iter() { + v0.encode_one(buf)?; + } + for v0 in self.props.iter() { + v0.encode_one(buf)?; + } + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let points_length = buf.read_i32::()? as usize; + let segments_length = buf.read_i32::()? as usize; + let props_length = buf.read_i32::()? as usize; + let header = crate::std_msgs::Header::decode_one(buf)?; + let id = crate::uuid_msgs::UniqueID::decode_one(buf)?; + let bounds = crate::geographic_msgs::BoundingBox::decode_one(buf)?; + let points = { + let mut v = Vec::with_capacity(points_length); + for _ in 0..points_length { + let _elem_0 = crate::geographic_msgs::WayPoint::decode_one(buf)?; + v.push(_elem_0); + } + v + }; + let segments = { + let mut v = Vec::with_capacity(segments_length); + for _ in 0..segments_length { + let _elem_0 = crate::geographic_msgs::RouteSegment::decode_one(buf)?; + v.push(_elem_0); + } + v + }; + let props = { + let mut v = Vec::with_capacity(props_length); + for _ in 0..props_length { + let _elem_0 = crate::geographic_msgs::KeyValue::decode_one(buf)?; + v.push(_elem_0); + } + v + }; + Ok(Self { + header, + id, + bounds, + points, + segments, + props, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += 4; + size += 4; + size += 4; + size += self.header.encoded_size(); + size += self.id.encoded_size(); + size += self.bounds.encoded_size(); + for v0 in self.points.iter() { + size += v0.encoded_size(); + } + for v0 in self.segments.iter() { + size += v0.encoded_size(); + } + for v0 in self.props.iter() { + size += v0.encoded_size(); + } + size + } + +} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/route_path.rs b/generated/rust_lcm_msgs/src/geographic_msgs/route_path.rs new file mode 100644 index 0000000..120b88a --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/route_path.rs @@ -0,0 +1,116 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct RoutePath { + pub header: crate::std_msgs::Header, + pub network: crate::uuid_msgs::UniqueID, + pub segments: Vec, + pub props: Vec, +} + +impl RoutePath { + pub const HASH: i64 = 0x2F0BAB3ED05E12C3u64 as i64; + pub const NAME: &str = "geographic_msgs.RoutePath"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let mut tmphash = self_hash as u64; + tmphash = tmphash.wrapping_add(crate::std_msgs::Header::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::uuid_msgs::UniqueID::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::uuid_msgs::UniqueID::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::KeyValue::hash_recursive(parents)); + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + buf.write_i32::(self.segments.len() as i32)?; + buf.write_i32::(self.props.len() as i32)?; + self.header.encode_one(buf)?; + self.network.encode_one(buf)?; + for v0 in self.segments.iter() { + v0.encode_one(buf)?; + } + for v0 in self.props.iter() { + v0.encode_one(buf)?; + } + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let segments_length = buf.read_i32::()? as usize; + let props_length = buf.read_i32::()? as usize; + let header = crate::std_msgs::Header::decode_one(buf)?; + let network = crate::uuid_msgs::UniqueID::decode_one(buf)?; + let segments = { + let mut v = Vec::with_capacity(segments_length); + for _ in 0..segments_length { + let _elem_0 = crate::uuid_msgs::UniqueID::decode_one(buf)?; + v.push(_elem_0); + } + v + }; + let props = { + let mut v = Vec::with_capacity(props_length); + for _ in 0..props_length { + let _elem_0 = crate::geographic_msgs::KeyValue::decode_one(buf)?; + v.push(_elem_0); + } + v + }; + Ok(Self { + header, + network, + segments, + props, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += 4; + size += 4; + size += self.header.encoded_size(); + size += self.network.encoded_size(); + for v0 in self.segments.iter() { + size += v0.encoded_size(); + } + for v0 in self.props.iter() { + size += v0.encoded_size(); + } + size + } + +} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/route_segment.rs b/generated/rust_lcm_msgs/src/geographic_msgs/route_segment.rs new file mode 100644 index 0000000..f691b06 --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/route_segment.rs @@ -0,0 +1,102 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct RouteSegment { + pub id: crate::uuid_msgs::UniqueID, + pub start: crate::uuid_msgs::UniqueID, + pub end: crate::uuid_msgs::UniqueID, + pub props: Vec, +} + +impl RouteSegment { + pub const HASH: i64 = 0x2757AFE165F2B650u64 as i64; + pub const NAME: &str = "geographic_msgs.RouteSegment"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let mut tmphash = self_hash as u64; + tmphash = tmphash.wrapping_add(crate::uuid_msgs::UniqueID::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::uuid_msgs::UniqueID::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::uuid_msgs::UniqueID::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::KeyValue::hash_recursive(parents)); + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + buf.write_i32::(self.props.len() as i32)?; + self.id.encode_one(buf)?; + self.start.encode_one(buf)?; + self.end.encode_one(buf)?; + for v0 in self.props.iter() { + v0.encode_one(buf)?; + } + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let props_length = buf.read_i32::()? as usize; + let id = crate::uuid_msgs::UniqueID::decode_one(buf)?; + let start = crate::uuid_msgs::UniqueID::decode_one(buf)?; + let end = crate::uuid_msgs::UniqueID::decode_one(buf)?; + let props = { + let mut v = Vec::with_capacity(props_length); + for _ in 0..props_length { + let _elem_0 = crate::geographic_msgs::KeyValue::decode_one(buf)?; + v.push(_elem_0); + } + v + }; + Ok(Self { + id, + start, + end, + props, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += 4; + size += self.id.encoded_size(); + size += self.start.encoded_size(); + size += self.end.encoded_size(); + for v0 in self.props.iter() { + size += v0.encoded_size(); + } + size + } + +} diff --git a/generated/rust_lcm_msgs/src/geographic_msgs/way_point.rs b/generated/rust_lcm_msgs/src/geographic_msgs/way_point.rs new file mode 100644 index 0000000..b63b1a9 --- /dev/null +++ b/generated/rust_lcm_msgs/src/geographic_msgs/way_point.rs @@ -0,0 +1,96 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct WayPoint { + pub id: crate::uuid_msgs::UniqueID, + pub position: crate::geographic_msgs::GeoPoint, + pub props: Vec, +} + +impl WayPoint { + pub const HASH: i64 = 0xD32D71D9C391BC8Fu64 as i64; + pub const NAME: &str = "geographic_msgs.WayPoint"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let mut tmphash = self_hash as u64; + tmphash = tmphash.wrapping_add(crate::uuid_msgs::UniqueID::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::GeoPoint::hash_recursive(parents)); + tmphash = tmphash.wrapping_add(crate::geographic_msgs::KeyValue::hash_recursive(parents)); + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + buf.write_i32::(self.props.len() as i32)?; + self.id.encode_one(buf)?; + self.position.encode_one(buf)?; + for v0 in self.props.iter() { + v0.encode_one(buf)?; + } + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let props_length = buf.read_i32::()? as usize; + let id = crate::uuid_msgs::UniqueID::decode_one(buf)?; + let position = crate::geographic_msgs::GeoPoint::decode_one(buf)?; + let props = { + let mut v = Vec::with_capacity(props_length); + for _ in 0..props_length { + let _elem_0 = crate::geographic_msgs::KeyValue::decode_one(buf)?; + v.push(_elem_0); + } + v + }; + Ok(Self { + id, + position, + props, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += 4; + size += self.id.encoded_size(); + size += self.position.encoded_size(); + for v0 in self.props.iter() { + size += v0.encoded_size(); + } + size + } + +} diff --git a/generated/rust_lcm_msgs/src/lib.rs b/generated/rust_lcm_msgs/src/lib.rs index 4ab6ab2..6e09513 100644 --- a/generated/rust_lcm_msgs/src/lib.rs +++ b/generated/rust_lcm_msgs/src/lib.rs @@ -5,6 +5,7 @@ pub mod actionlib_msgs; pub mod builtin_interfaces; pub mod diagnostic_msgs; pub mod foxglove_msgs; +pub mod geographic_msgs; pub mod geometry_msgs; pub mod nav_msgs; pub mod sensor_msgs; @@ -13,5 +14,6 @@ pub mod std_msgs; pub mod stereo_msgs; pub mod tf2_msgs; pub mod trajectory_msgs; +pub mod uuid_msgs; pub mod vision_msgs; pub mod visualization_msgs; diff --git a/generated/rust_lcm_msgs/src/uuid_msgs/mod.rs b/generated/rust_lcm_msgs/src/uuid_msgs/mod.rs new file mode 100644 index 0000000..19db75d --- /dev/null +++ b/generated/rust_lcm_msgs/src/uuid_msgs/mod.rs @@ -0,0 +1,4 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +mod unique_id; +pub use unique_id::UniqueID; diff --git a/generated/rust_lcm_msgs/src/uuid_msgs/unique_id.rs b/generated/rust_lcm_msgs/src/uuid_msgs/unique_id.rs new file mode 100644 index 0000000..89c58c3 --- /dev/null +++ b/generated/rust_lcm_msgs/src/uuid_msgs/unique_id.rs @@ -0,0 +1,73 @@ +// Auto-generated by lcm-rust-gen. DO NOT EDIT. + +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use std::io::{self, Read, Write, Cursor}; +use std::sync::OnceLock; + +#[derive(Debug, Clone, Default, PartialEq)] +pub struct UniqueID { + pub uuid: [u8; 16], +} + +impl UniqueID { + pub const HASH: i64 = 0x697D4FEBD3ED5654u64 as i64; + pub const NAME: &str = "uuid_msgs.UniqueID"; + + fn packed_fingerprint() -> u64 { + static CACHE: OnceLock = OnceLock::new(); + *CACHE.get_or_init(|| Self::hash_recursive(&mut Vec::new())) + } + + pub(crate) fn hash_recursive(parents: &mut Vec) -> u64 { + let self_hash = Self::HASH as u64; + if parents.contains(&self_hash) { + return 0; + } + parents.push(self_hash); + let tmphash = self_hash as u64; + parents.pop(); + // rotate left by 1 + tmphash << 1 | tmphash >> 63 + } + + pub fn encode(&self) -> Vec { + let mut buf = Vec::with_capacity(8 + self.encoded_size()); + buf.write_u64::(Self::packed_fingerprint()).unwrap(); + self.encode_one(&mut buf).unwrap(); + buf + } + + pub fn decode(data: &[u8]) -> io::Result { + let mut cursor = Cursor::new(data); + let hash = cursor.read_u64::()?; + let expected = Self::packed_fingerprint(); + if hash != expected { + return Err(io::Error::new(io::ErrorKind::InvalidData, + format!("Hash mismatch: expected {:016x}, got {:016x}", expected, hash))); + } + Self::decode_one(&mut cursor) + } + + pub fn encode_one(&self, buf: &mut W) -> io::Result<()> { + buf.write_all(&self.uuid)?; + Ok(()) + } + + pub fn decode_one(buf: &mut R) -> io::Result { + let uuid = { + let mut arr = [0u8; 16]; + buf.read_exact(&mut arr)?; + arr + }; + Ok(Self { + uuid, + }) + } + + pub fn encoded_size(&self) -> usize { + let mut size = 0usize; + size += self.uuid.len(); + size + } + +} diff --git a/generated/ts_lcm_msgs/deno.json b/generated/ts_lcm_msgs/deno.json index 0e382b8..f88d6e5 100644 --- a/generated/ts_lcm_msgs/deno.json +++ b/generated/ts_lcm_msgs/deno.json @@ -1,6 +1,6 @@ { "name": "@dimos/msgs", - "version": "0.1.2", + "version": "0.1.5", "license": "Apache-2.0", "exports": { ".": "./mod.ts", @@ -8,6 +8,7 @@ "./builtin_interfaces": "./builtin_interfaces/mod.ts", "./diagnostic_msgs": "./diagnostic_msgs/mod.ts", "./foxglove_msgs": "./foxglove_msgs/mod.ts", + "./geographic_msgs": "./geographic_msgs/mod.ts", "./geometry_msgs": "./geometry_msgs/mod.ts", "./nav_msgs": "./nav_msgs/mod.ts", "./sensor_msgs": "./sensor_msgs/mod.ts", @@ -16,6 +17,7 @@ "./stereo_msgs": "./stereo_msgs/mod.ts", "./tf2_msgs": "./tf2_msgs/mod.ts", "./trajectory_msgs": "./trajectory_msgs/mod.ts", + "./uuid_msgs": "./uuid_msgs/mod.ts", "./vision_msgs": "./vision_msgs/mod.ts", "./visualization_msgs": "./visualization_msgs/mod.ts" }, diff --git a/generated/ts_lcm_msgs/geographic_msgs/BoundingBox.ts b/generated/ts_lcm_msgs/geographic_msgs/BoundingBox.ts new file mode 100644 index 0000000..f715d42 --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/BoundingBox.ts @@ -0,0 +1,87 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +import { GeoPoint } from "./GeoPoint.ts"; + +export class BoundingBox { + static readonly _HASH = 0xecb7cbaa66bccde0n; + static readonly _NAME = "geographic_msgs.BoundingBox"; + private static _packedFingerprint: bigint | null = null; + + min_pt: GeoPoint; + max_pt: GeoPoint; + + constructor(init?: Partial) { + this.min_pt = init?.min_pt ?? new GeoPoint(); + this.max_pt = init?.max_pt ?? new GeoPoint(); + } + + static decode(data: Uint8Array): BoundingBox { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = BoundingBox._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new BoundingBox(); + ({ offset } = BoundingBox._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: BoundingBox): { offset: number } { + target.min_pt = new GeoPoint(); + ({ offset } = GeoPoint._decodeOne(view, offset, target.min_pt)); + target.max_pt = new GeoPoint(); + ({ offset } = GeoPoint._decodeOne(view, offset, target.max_pt)); + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, BoundingBox._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + offset = this.min_pt._encodeOne(view, offset); + offset = this.max_pt._encodeOne(view, offset); + return offset; + } + + _encodedSize(): number { + let size = 0; + size += this.min_pt._encodedSize(); + size += this.max_pt._encodedSize(); + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(BoundingBox)) return 0n; + const newparents = [...parents, BoundingBox]; + let tmphash = BoundingBox._HASH; + tmphash = (tmphash + GeoPoint._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + GeoPoint._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (BoundingBox._packedFingerprint === null) { + BoundingBox._packedFingerprint = BoundingBox._getHashRecursive([]); + } + return BoundingBox._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/GeoPath.ts b/generated/ts_lcm_msgs/geographic_msgs/GeoPath.ts new file mode 100644 index 0000000..6a80e5d --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/GeoPath.ts @@ -0,0 +1,102 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +import { Header } from "../std_msgs/Header.ts"; +import { GeoPoseStamped } from "./GeoPoseStamped.ts"; + +export class GeoPath { + static readonly _HASH = 0xc779b6acc503055an; + static readonly _NAME = "geographic_msgs.GeoPath"; + private static _packedFingerprint: bigint | null = null; + + poses_length: number; + header: Header; + poses: GeoPoseStamped[]; + + constructor(init?: Partial) { + this.poses_length = init?.poses_length ?? 0; + this.header = init?.header ?? new Header(); + this.poses = init?.poses ?? []; + } + + static decode(data: Uint8Array): GeoPath { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = GeoPath._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new GeoPath(); + ({ offset } = GeoPath._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: GeoPath): { offset: number } { + target.poses_length = view.getInt32(offset, false); + offset += 4; + target.header = new Header(); + ({ offset } = Header._decodeOne(view, offset, target.header)); + target.poses = new Array(target.poses_length); + for (let i0 = 0; i0 < target.poses_length; i0++) { + target.poses[i0] = new GeoPoseStamped(); + ({ offset } = GeoPoseStamped._decodeOne(view, offset, target.poses[i0])); + } + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, GeoPath._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + view.setInt32(offset, this.poses_length, false); + offset += 4; + offset = this.header._encodeOne(view, offset); + for (let i0 = 0; i0 < this.poses_length; i0++) { + offset = this.poses[i0]._encodeOne(view, offset); + } + return offset; + } + + _encodedSize(): number { + let size = 0; + size += 4; + size += this.header._encodedSize(); + for (let i0 = 0; i0 < this.poses_length; i0++) { + size += this.poses[i0]._encodedSize(); + } + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(GeoPath)) return 0n; + const newparents = [...parents, GeoPath]; + let tmphash = GeoPath._HASH; + tmphash = (tmphash + Header._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + GeoPoseStamped._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (GeoPath._packedFingerprint === null) { + GeoPath._packedFingerprint = GeoPath._getHashRecursive([]); + } + return GeoPath._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/GeoPoint.ts b/generated/ts_lcm_msgs/geographic_msgs/GeoPoint.ts new file mode 100644 index 0000000..d60851a --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/GeoPoint.ts @@ -0,0 +1,92 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +export class GeoPoint { + static readonly _HASH = 0xb84ee2b89179c84en; + static readonly _NAME = "geographic_msgs.GeoPoint"; + private static _packedFingerprint: bigint | null = null; + + latitude: number; + longitude: number; + altitude: number; + + constructor(init?: Partial) { + this.latitude = init?.latitude ?? 0; + this.longitude = init?.longitude ?? 0; + this.altitude = init?.altitude ?? 0; + } + + static decode(data: Uint8Array): GeoPoint { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = GeoPoint._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new GeoPoint(); + ({ offset } = GeoPoint._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: GeoPoint): { offset: number } { + target.latitude = view.getFloat64(offset, false); + offset += 8; + target.longitude = view.getFloat64(offset, false); + offset += 8; + target.altitude = view.getFloat64(offset, false); + offset += 8; + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, GeoPoint._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + view.setFloat64(offset, this.latitude, false); + offset += 8; + view.setFloat64(offset, this.longitude, false); + offset += 8; + view.setFloat64(offset, this.altitude, false); + offset += 8; + return offset; + } + + _encodedSize(): number { + let size = 0; + size += 8; + size += 8; + size += 8; + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(GeoPoint)) return 0n; + const newparents = [...parents, GeoPoint]; + let tmphash = GeoPoint._HASH; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (GeoPoint._packedFingerprint === null) { + GeoPoint._packedFingerprint = GeoPoint._getHashRecursive([]); + } + return GeoPoint._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/GeoPointStamped.ts b/generated/ts_lcm_msgs/geographic_msgs/GeoPointStamped.ts new file mode 100644 index 0000000..4084fe3 --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/GeoPointStamped.ts @@ -0,0 +1,88 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +import { Header } from "../std_msgs/Header.ts"; +import { GeoPoint } from "./GeoPoint.ts"; + +export class GeoPointStamped { + static readonly _HASH = 0x3a3685292ab14382n; + static readonly _NAME = "geographic_msgs.GeoPointStamped"; + private static _packedFingerprint: bigint | null = null; + + header: Header; + position: GeoPoint; + + constructor(init?: Partial) { + this.header = init?.header ?? new Header(); + this.position = init?.position ?? new GeoPoint(); + } + + static decode(data: Uint8Array): GeoPointStamped { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = GeoPointStamped._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new GeoPointStamped(); + ({ offset } = GeoPointStamped._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: GeoPointStamped): { offset: number } { + target.header = new Header(); + ({ offset } = Header._decodeOne(view, offset, target.header)); + target.position = new GeoPoint(); + ({ offset } = GeoPoint._decodeOne(view, offset, target.position)); + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, GeoPointStamped._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + offset = this.header._encodeOne(view, offset); + offset = this.position._encodeOne(view, offset); + return offset; + } + + _encodedSize(): number { + let size = 0; + size += this.header._encodedSize(); + size += this.position._encodedSize(); + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(GeoPointStamped)) return 0n; + const newparents = [...parents, GeoPointStamped]; + let tmphash = GeoPointStamped._HASH; + tmphash = (tmphash + Header._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + GeoPoint._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (GeoPointStamped._packedFingerprint === null) { + GeoPointStamped._packedFingerprint = GeoPointStamped._getHashRecursive([]); + } + return GeoPointStamped._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/GeoPose.ts b/generated/ts_lcm_msgs/geographic_msgs/GeoPose.ts new file mode 100644 index 0000000..d60fd2f --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/GeoPose.ts @@ -0,0 +1,88 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +import { GeoPoint } from "./GeoPoint.ts"; +import { Quaternion } from "../geometry_msgs/Quaternion.ts"; + +export class GeoPose { + static readonly _HASH = 0x2d70dd60bd541272n; + static readonly _NAME = "geographic_msgs.GeoPose"; + private static _packedFingerprint: bigint | null = null; + + position: GeoPoint; + orientation: Quaternion; + + constructor(init?: Partial) { + this.position = init?.position ?? new GeoPoint(); + this.orientation = init?.orientation ?? new Quaternion(); + } + + static decode(data: Uint8Array): GeoPose { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = GeoPose._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new GeoPose(); + ({ offset } = GeoPose._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: GeoPose): { offset: number } { + target.position = new GeoPoint(); + ({ offset } = GeoPoint._decodeOne(view, offset, target.position)); + target.orientation = new Quaternion(); + ({ offset } = Quaternion._decodeOne(view, offset, target.orientation)); + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, GeoPose._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + offset = this.position._encodeOne(view, offset); + offset = this.orientation._encodeOne(view, offset); + return offset; + } + + _encodedSize(): number { + let size = 0; + size += this.position._encodedSize(); + size += this.orientation._encodedSize(); + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(GeoPose)) return 0n; + const newparents = [...parents, GeoPose]; + let tmphash = GeoPose._HASH; + tmphash = (tmphash + GeoPoint._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + Quaternion._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (GeoPose._packedFingerprint === null) { + GeoPose._packedFingerprint = GeoPose._getHashRecursive([]); + } + return GeoPose._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/GeoPoseStamped.ts b/generated/ts_lcm_msgs/geographic_msgs/GeoPoseStamped.ts new file mode 100644 index 0000000..44d4c85 --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/GeoPoseStamped.ts @@ -0,0 +1,88 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +import { Header } from "../std_msgs/Header.ts"; +import { GeoPose } from "./GeoPose.ts"; + +export class GeoPoseStamped { + static readonly _HASH = 0xe10feebec5c97663n; + static readonly _NAME = "geographic_msgs.GeoPoseStamped"; + private static _packedFingerprint: bigint | null = null; + + header: Header; + pose: GeoPose; + + constructor(init?: Partial) { + this.header = init?.header ?? new Header(); + this.pose = init?.pose ?? new GeoPose(); + } + + static decode(data: Uint8Array): GeoPoseStamped { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = GeoPoseStamped._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new GeoPoseStamped(); + ({ offset } = GeoPoseStamped._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: GeoPoseStamped): { offset: number } { + target.header = new Header(); + ({ offset } = Header._decodeOne(view, offset, target.header)); + target.pose = new GeoPose(); + ({ offset } = GeoPose._decodeOne(view, offset, target.pose)); + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, GeoPoseStamped._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + offset = this.header._encodeOne(view, offset); + offset = this.pose._encodeOne(view, offset); + return offset; + } + + _encodedSize(): number { + let size = 0; + size += this.header._encodedSize(); + size += this.pose._encodedSize(); + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(GeoPoseStamped)) return 0n; + const newparents = [...parents, GeoPoseStamped]; + let tmphash = GeoPoseStamped._HASH; + tmphash = (tmphash + Header._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + GeoPose._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (GeoPoseStamped._packedFingerprint === null) { + GeoPoseStamped._packedFingerprint = GeoPoseStamped._getHashRecursive([]); + } + return GeoPoseStamped._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/GeoPoseWithCovariance.ts b/generated/ts_lcm_msgs/geographic_msgs/GeoPoseWithCovariance.ts new file mode 100644 index 0000000..c8f0a50 --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/GeoPoseWithCovariance.ts @@ -0,0 +1,92 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +import { GeoPose } from "./GeoPose.ts"; + +export class GeoPoseWithCovariance { + static readonly _HASH = 0x42dbdfaa69371237n; + static readonly _NAME = "geographic_msgs.GeoPoseWithCovariance"; + private static _packedFingerprint: bigint | null = null; + + pose: GeoPose; + covariance: number[]; + + constructor(init?: Partial) { + this.pose = init?.pose ?? new GeoPose(); + this.covariance = init?.covariance ?? Array.from({ length: 36 }, () => 0); + } + + static decode(data: Uint8Array): GeoPoseWithCovariance { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = GeoPoseWithCovariance._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new GeoPoseWithCovariance(); + ({ offset } = GeoPoseWithCovariance._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: GeoPoseWithCovariance): { offset: number } { + target.pose = new GeoPose(); + ({ offset } = GeoPose._decodeOne(view, offset, target.pose)); + target.covariance = new Array(36); + for (let i0 = 0; i0 < 36; i0++) { + target.covariance[i0] = view.getFloat64(offset, false); + offset += 8; + } + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, GeoPoseWithCovariance._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + offset = this.pose._encodeOne(view, offset); + for (let i0 = 0; i0 < 36; i0++) { + view.setFloat64(offset, this.covariance[i0], false); + offset += 8; + } + return offset; + } + + _encodedSize(): number { + let size = 0; + size += this.pose._encodedSize(); + size += 36 * 8; + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(GeoPoseWithCovariance)) return 0n; + const newparents = [...parents, GeoPoseWithCovariance]; + let tmphash = GeoPoseWithCovariance._HASH; + tmphash = (tmphash + GeoPose._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (GeoPoseWithCovariance._packedFingerprint === null) { + GeoPoseWithCovariance._packedFingerprint = GeoPoseWithCovariance._getHashRecursive([]); + } + return GeoPoseWithCovariance._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.ts b/generated/ts_lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.ts new file mode 100644 index 0000000..9aa1a1b --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/GeoPoseWithCovarianceStamped.ts @@ -0,0 +1,88 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +import { Header } from "../std_msgs/Header.ts"; +import { GeoPoseWithCovariance } from "./GeoPoseWithCovariance.ts"; + +export class GeoPoseWithCovarianceStamped { + static readonly _HASH = 0xe10feebec5c97663n; + static readonly _NAME = "geographic_msgs.GeoPoseWithCovarianceStamped"; + private static _packedFingerprint: bigint | null = null; + + header: Header; + pose: GeoPoseWithCovariance; + + constructor(init?: Partial) { + this.header = init?.header ?? new Header(); + this.pose = init?.pose ?? new GeoPoseWithCovariance(); + } + + static decode(data: Uint8Array): GeoPoseWithCovarianceStamped { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = GeoPoseWithCovarianceStamped._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new GeoPoseWithCovarianceStamped(); + ({ offset } = GeoPoseWithCovarianceStamped._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: GeoPoseWithCovarianceStamped): { offset: number } { + target.header = new Header(); + ({ offset } = Header._decodeOne(view, offset, target.header)); + target.pose = new GeoPoseWithCovariance(); + ({ offset } = GeoPoseWithCovariance._decodeOne(view, offset, target.pose)); + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, GeoPoseWithCovarianceStamped._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + offset = this.header._encodeOne(view, offset); + offset = this.pose._encodeOne(view, offset); + return offset; + } + + _encodedSize(): number { + let size = 0; + size += this.header._encodedSize(); + size += this.pose._encodedSize(); + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(GeoPoseWithCovarianceStamped)) return 0n; + const newparents = [...parents, GeoPoseWithCovarianceStamped]; + let tmphash = GeoPoseWithCovarianceStamped._HASH; + tmphash = (tmphash + Header._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + GeoPoseWithCovariance._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (GeoPoseWithCovarianceStamped._packedFingerprint === null) { + GeoPoseWithCovarianceStamped._packedFingerprint = GeoPoseWithCovarianceStamped._getHashRecursive([]); + } + return GeoPoseWithCovarianceStamped._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/GeographicMap.ts b/generated/ts_lcm_msgs/geographic_msgs/GeographicMap.ts new file mode 100644 index 0000000..5cb3f42 --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/GeographicMap.ts @@ -0,0 +1,162 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +import { Header } from "../std_msgs/Header.ts"; +import { UniqueID } from "../uuid_msgs/UniqueID.ts"; +import { BoundingBox } from "./BoundingBox.ts"; +import { WayPoint } from "./WayPoint.ts"; +import { MapFeature } from "./MapFeature.ts"; +import { KeyValue } from "./KeyValue.ts"; + +export class GeographicMap { + static readonly _HASH = 0xb24465d7d9841c65n; + static readonly _NAME = "geographic_msgs.GeographicMap"; + private static _packedFingerprint: bigint | null = null; + + points_length: number; + features_length: number; + props_length: number; + header: Header; + id: UniqueID; + bounds: BoundingBox; + points: WayPoint[]; + features: MapFeature[]; + props: KeyValue[]; + + constructor(init?: Partial) { + this.points_length = init?.points_length ?? 0; + this.features_length = init?.features_length ?? 0; + this.props_length = init?.props_length ?? 0; + this.header = init?.header ?? new Header(); + this.id = init?.id ?? new UniqueID(); + this.bounds = init?.bounds ?? new BoundingBox(); + this.points = init?.points ?? []; + this.features = init?.features ?? []; + this.props = init?.props ?? []; + } + + static decode(data: Uint8Array): GeographicMap { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = GeographicMap._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new GeographicMap(); + ({ offset } = GeographicMap._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: GeographicMap): { offset: number } { + target.points_length = view.getInt32(offset, false); + offset += 4; + target.features_length = view.getInt32(offset, false); + offset += 4; + target.props_length = view.getInt32(offset, false); + offset += 4; + target.header = new Header(); + ({ offset } = Header._decodeOne(view, offset, target.header)); + target.id = new UniqueID(); + ({ offset } = UniqueID._decodeOne(view, offset, target.id)); + target.bounds = new BoundingBox(); + ({ offset } = BoundingBox._decodeOne(view, offset, target.bounds)); + target.points = new Array(target.points_length); + for (let i0 = 0; i0 < target.points_length; i0++) { + target.points[i0] = new WayPoint(); + ({ offset } = WayPoint._decodeOne(view, offset, target.points[i0])); + } + target.features = new Array(target.features_length); + for (let i0 = 0; i0 < target.features_length; i0++) { + target.features[i0] = new MapFeature(); + ({ offset } = MapFeature._decodeOne(view, offset, target.features[i0])); + } + target.props = new Array(target.props_length); + for (let i0 = 0; i0 < target.props_length; i0++) { + target.props[i0] = new KeyValue(); + ({ offset } = KeyValue._decodeOne(view, offset, target.props[i0])); + } + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, GeographicMap._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + view.setInt32(offset, this.points_length, false); + offset += 4; + view.setInt32(offset, this.features_length, false); + offset += 4; + view.setInt32(offset, this.props_length, false); + offset += 4; + offset = this.header._encodeOne(view, offset); + offset = this.id._encodeOne(view, offset); + offset = this.bounds._encodeOne(view, offset); + for (let i0 = 0; i0 < this.points_length; i0++) { + offset = this.points[i0]._encodeOne(view, offset); + } + for (let i0 = 0; i0 < this.features_length; i0++) { + offset = this.features[i0]._encodeOne(view, offset); + } + for (let i0 = 0; i0 < this.props_length; i0++) { + offset = this.props[i0]._encodeOne(view, offset); + } + return offset; + } + + _encodedSize(): number { + let size = 0; + size += 4; + size += 4; + size += 4; + size += this.header._encodedSize(); + size += this.id._encodedSize(); + size += this.bounds._encodedSize(); + for (let i0 = 0; i0 < this.points_length; i0++) { + size += this.points[i0]._encodedSize(); + } + for (let i0 = 0; i0 < this.features_length; i0++) { + size += this.features[i0]._encodedSize(); + } + for (let i0 = 0; i0 < this.props_length; i0++) { + size += this.props[i0]._encodedSize(); + } + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(GeographicMap)) return 0n; + const newparents = [...parents, GeographicMap]; + let tmphash = GeographicMap._HASH; + tmphash = (tmphash + Header._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + UniqueID._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + BoundingBox._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + WayPoint._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + MapFeature._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + KeyValue._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (GeographicMap._packedFingerprint === null) { + GeographicMap._packedFingerprint = GeographicMap._getHashRecursive([]); + } + return GeographicMap._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/GeographicMapChanges.ts b/generated/ts_lcm_msgs/geographic_msgs/GeographicMapChanges.ts new file mode 100644 index 0000000..deefc9e --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/GeographicMapChanges.ts @@ -0,0 +1,110 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +import { Header } from "../std_msgs/Header.ts"; +import { GeographicMap } from "./GeographicMap.ts"; +import { UniqueID } from "../uuid_msgs/UniqueID.ts"; + +export class GeographicMapChanges { + static readonly _HASH = 0x5d92adbb4d9db2cbn; + static readonly _NAME = "geographic_msgs.GeographicMapChanges"; + private static _packedFingerprint: bigint | null = null; + + deletes_length: number; + header: Header; + diffs: GeographicMap; + deletes: UniqueID[]; + + constructor(init?: Partial) { + this.deletes_length = init?.deletes_length ?? 0; + this.header = init?.header ?? new Header(); + this.diffs = init?.diffs ?? new GeographicMap(); + this.deletes = init?.deletes ?? []; + } + + static decode(data: Uint8Array): GeographicMapChanges { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = GeographicMapChanges._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new GeographicMapChanges(); + ({ offset } = GeographicMapChanges._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: GeographicMapChanges): { offset: number } { + target.deletes_length = view.getInt32(offset, false); + offset += 4; + target.header = new Header(); + ({ offset } = Header._decodeOne(view, offset, target.header)); + target.diffs = new GeographicMap(); + ({ offset } = GeographicMap._decodeOne(view, offset, target.diffs)); + target.deletes = new Array(target.deletes_length); + for (let i0 = 0; i0 < target.deletes_length; i0++) { + target.deletes[i0] = new UniqueID(); + ({ offset } = UniqueID._decodeOne(view, offset, target.deletes[i0])); + } + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, GeographicMapChanges._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + view.setInt32(offset, this.deletes_length, false); + offset += 4; + offset = this.header._encodeOne(view, offset); + offset = this.diffs._encodeOne(view, offset); + for (let i0 = 0; i0 < this.deletes_length; i0++) { + offset = this.deletes[i0]._encodeOne(view, offset); + } + return offset; + } + + _encodedSize(): number { + let size = 0; + size += 4; + size += this.header._encodedSize(); + size += this.diffs._encodedSize(); + for (let i0 = 0; i0 < this.deletes_length; i0++) { + size += this.deletes[i0]._encodedSize(); + } + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(GeographicMapChanges)) return 0n; + const newparents = [...parents, GeographicMapChanges]; + let tmphash = GeographicMapChanges._HASH; + tmphash = (tmphash + Header._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + GeographicMap._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + UniqueID._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (GeographicMapChanges._packedFingerprint === null) { + GeographicMapChanges._packedFingerprint = GeographicMapChanges._getHashRecursive([]); + } + return GeographicMapChanges._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/KeyValue.ts b/generated/ts_lcm_msgs/geographic_msgs/KeyValue.ts new file mode 100644 index 0000000..ecf1e12 --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/KeyValue.ts @@ -0,0 +1,107 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +export class KeyValue { + static readonly _HASH = 0x97574015d52eedden; + static readonly _NAME = "geographic_msgs.KeyValue"; + private static _packedFingerprint: bigint | null = null; + + key: string; + value: string; + + constructor(init?: Partial) { + this.key = init?.key ?? ""; + this.value = init?.value ?? ""; + } + + static decode(data: Uint8Array): KeyValue { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = KeyValue._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new KeyValue(); + ({ offset } = KeyValue._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: KeyValue): { offset: number } { + { + const len = view.getUint32(offset, false); + offset += 4; + target.key = new TextDecoder().decode(new Uint8Array(view.buffer, view.byteOffset + offset, len - 1)); + offset += len; + } + { + const len = view.getUint32(offset, false); + offset += 4; + target.value = new TextDecoder().decode(new Uint8Array(view.buffer, view.byteOffset + offset, len - 1)); + offset += len; + } + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, KeyValue._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + { + const encoded = new TextEncoder().encode(this.key); + view.setUint32(offset, encoded.length + 1, false); + offset += 4; + new Uint8Array(view.buffer, view.byteOffset + offset).set(encoded); + offset += encoded.length; + view.setUint8(offset, 0); // null terminator + offset += 1; + } + { + const encoded = new TextEncoder().encode(this.value); + view.setUint32(offset, encoded.length + 1, false); + offset += 4; + new Uint8Array(view.buffer, view.byteOffset + offset).set(encoded); + offset += encoded.length; + view.setUint8(offset, 0); // null terminator + offset += 1; + } + return offset; + } + + _encodedSize(): number { + let size = 0; + size += 4 + new TextEncoder().encode(this.key).length + 1; + size += 4 + new TextEncoder().encode(this.value).length + 1; + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(KeyValue)) return 0n; + const newparents = [...parents, KeyValue]; + let tmphash = KeyValue._HASH; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (KeyValue._packedFingerprint === null) { + KeyValue._packedFingerprint = KeyValue._getHashRecursive([]); + } + return KeyValue._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/MapFeature.ts b/generated/ts_lcm_msgs/geographic_msgs/MapFeature.ts new file mode 100644 index 0000000..9f4b92a --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/MapFeature.ts @@ -0,0 +1,123 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +import { UniqueID } from "../uuid_msgs/UniqueID.ts"; +import { KeyValue } from "./KeyValue.ts"; + +export class MapFeature { + static readonly _HASH = 0x75975993f8dd2d22n; + static readonly _NAME = "geographic_msgs.MapFeature"; + private static _packedFingerprint: bigint | null = null; + + components_length: number; + props_length: number; + id: UniqueID; + components: UniqueID[]; + props: KeyValue[]; + + constructor(init?: Partial) { + this.components_length = init?.components_length ?? 0; + this.props_length = init?.props_length ?? 0; + this.id = init?.id ?? new UniqueID(); + this.components = init?.components ?? []; + this.props = init?.props ?? []; + } + + static decode(data: Uint8Array): MapFeature { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = MapFeature._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new MapFeature(); + ({ offset } = MapFeature._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: MapFeature): { offset: number } { + target.components_length = view.getInt32(offset, false); + offset += 4; + target.props_length = view.getInt32(offset, false); + offset += 4; + target.id = new UniqueID(); + ({ offset } = UniqueID._decodeOne(view, offset, target.id)); + target.components = new Array(target.components_length); + for (let i0 = 0; i0 < target.components_length; i0++) { + target.components[i0] = new UniqueID(); + ({ offset } = UniqueID._decodeOne(view, offset, target.components[i0])); + } + target.props = new Array(target.props_length); + for (let i0 = 0; i0 < target.props_length; i0++) { + target.props[i0] = new KeyValue(); + ({ offset } = KeyValue._decodeOne(view, offset, target.props[i0])); + } + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, MapFeature._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + view.setInt32(offset, this.components_length, false); + offset += 4; + view.setInt32(offset, this.props_length, false); + offset += 4; + offset = this.id._encodeOne(view, offset); + for (let i0 = 0; i0 < this.components_length; i0++) { + offset = this.components[i0]._encodeOne(view, offset); + } + for (let i0 = 0; i0 < this.props_length; i0++) { + offset = this.props[i0]._encodeOne(view, offset); + } + return offset; + } + + _encodedSize(): number { + let size = 0; + size += 4; + size += 4; + size += this.id._encodedSize(); + for (let i0 = 0; i0 < this.components_length; i0++) { + size += this.components[i0]._encodedSize(); + } + for (let i0 = 0; i0 < this.props_length; i0++) { + size += this.props[i0]._encodedSize(); + } + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(MapFeature)) return 0n; + const newparents = [...parents, MapFeature]; + let tmphash = MapFeature._HASH; + tmphash = (tmphash + UniqueID._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + UniqueID._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + KeyValue._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (MapFeature._packedFingerprint === null) { + MapFeature._packedFingerprint = MapFeature._getHashRecursive([]); + } + return MapFeature._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/RouteNetwork.ts b/generated/ts_lcm_msgs/geographic_msgs/RouteNetwork.ts new file mode 100644 index 0000000..a2a5dc9 --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/RouteNetwork.ts @@ -0,0 +1,162 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +import { Header } from "../std_msgs/Header.ts"; +import { UniqueID } from "../uuid_msgs/UniqueID.ts"; +import { BoundingBox } from "./BoundingBox.ts"; +import { WayPoint } from "./WayPoint.ts"; +import { RouteSegment } from "./RouteSegment.ts"; +import { KeyValue } from "./KeyValue.ts"; + +export class RouteNetwork { + static readonly _HASH = 0xf50b14f90fc9a672n; + static readonly _NAME = "geographic_msgs.RouteNetwork"; + private static _packedFingerprint: bigint | null = null; + + points_length: number; + segments_length: number; + props_length: number; + header: Header; + id: UniqueID; + bounds: BoundingBox; + points: WayPoint[]; + segments: RouteSegment[]; + props: KeyValue[]; + + constructor(init?: Partial) { + this.points_length = init?.points_length ?? 0; + this.segments_length = init?.segments_length ?? 0; + this.props_length = init?.props_length ?? 0; + this.header = init?.header ?? new Header(); + this.id = init?.id ?? new UniqueID(); + this.bounds = init?.bounds ?? new BoundingBox(); + this.points = init?.points ?? []; + this.segments = init?.segments ?? []; + this.props = init?.props ?? []; + } + + static decode(data: Uint8Array): RouteNetwork { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = RouteNetwork._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new RouteNetwork(); + ({ offset } = RouteNetwork._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: RouteNetwork): { offset: number } { + target.points_length = view.getInt32(offset, false); + offset += 4; + target.segments_length = view.getInt32(offset, false); + offset += 4; + target.props_length = view.getInt32(offset, false); + offset += 4; + target.header = new Header(); + ({ offset } = Header._decodeOne(view, offset, target.header)); + target.id = new UniqueID(); + ({ offset } = UniqueID._decodeOne(view, offset, target.id)); + target.bounds = new BoundingBox(); + ({ offset } = BoundingBox._decodeOne(view, offset, target.bounds)); + target.points = new Array(target.points_length); + for (let i0 = 0; i0 < target.points_length; i0++) { + target.points[i0] = new WayPoint(); + ({ offset } = WayPoint._decodeOne(view, offset, target.points[i0])); + } + target.segments = new Array(target.segments_length); + for (let i0 = 0; i0 < target.segments_length; i0++) { + target.segments[i0] = new RouteSegment(); + ({ offset } = RouteSegment._decodeOne(view, offset, target.segments[i0])); + } + target.props = new Array(target.props_length); + for (let i0 = 0; i0 < target.props_length; i0++) { + target.props[i0] = new KeyValue(); + ({ offset } = KeyValue._decodeOne(view, offset, target.props[i0])); + } + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, RouteNetwork._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + view.setInt32(offset, this.points_length, false); + offset += 4; + view.setInt32(offset, this.segments_length, false); + offset += 4; + view.setInt32(offset, this.props_length, false); + offset += 4; + offset = this.header._encodeOne(view, offset); + offset = this.id._encodeOne(view, offset); + offset = this.bounds._encodeOne(view, offset); + for (let i0 = 0; i0 < this.points_length; i0++) { + offset = this.points[i0]._encodeOne(view, offset); + } + for (let i0 = 0; i0 < this.segments_length; i0++) { + offset = this.segments[i0]._encodeOne(view, offset); + } + for (let i0 = 0; i0 < this.props_length; i0++) { + offset = this.props[i0]._encodeOne(view, offset); + } + return offset; + } + + _encodedSize(): number { + let size = 0; + size += 4; + size += 4; + size += 4; + size += this.header._encodedSize(); + size += this.id._encodedSize(); + size += this.bounds._encodedSize(); + for (let i0 = 0; i0 < this.points_length; i0++) { + size += this.points[i0]._encodedSize(); + } + for (let i0 = 0; i0 < this.segments_length; i0++) { + size += this.segments[i0]._encodedSize(); + } + for (let i0 = 0; i0 < this.props_length; i0++) { + size += this.props[i0]._encodedSize(); + } + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(RouteNetwork)) return 0n; + const newparents = [...parents, RouteNetwork]; + let tmphash = RouteNetwork._HASH; + tmphash = (tmphash + Header._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + UniqueID._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + BoundingBox._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + WayPoint._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + RouteSegment._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + KeyValue._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (RouteNetwork._packedFingerprint === null) { + RouteNetwork._packedFingerprint = RouteNetwork._getHashRecursive([]); + } + return RouteNetwork._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/RoutePath.ts b/generated/ts_lcm_msgs/geographic_msgs/RoutePath.ts new file mode 100644 index 0000000..c37efe8 --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/RoutePath.ts @@ -0,0 +1,131 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +import { Header } from "../std_msgs/Header.ts"; +import { UniqueID } from "../uuid_msgs/UniqueID.ts"; +import { KeyValue } from "./KeyValue.ts"; + +export class RoutePath { + static readonly _HASH = 0x2f0bab3ed05e12c3n; + static readonly _NAME = "geographic_msgs.RoutePath"; + private static _packedFingerprint: bigint | null = null; + + segments_length: number; + props_length: number; + header: Header; + network: UniqueID; + segments: UniqueID[]; + props: KeyValue[]; + + constructor(init?: Partial) { + this.segments_length = init?.segments_length ?? 0; + this.props_length = init?.props_length ?? 0; + this.header = init?.header ?? new Header(); + this.network = init?.network ?? new UniqueID(); + this.segments = init?.segments ?? []; + this.props = init?.props ?? []; + } + + static decode(data: Uint8Array): RoutePath { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = RoutePath._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new RoutePath(); + ({ offset } = RoutePath._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: RoutePath): { offset: number } { + target.segments_length = view.getInt32(offset, false); + offset += 4; + target.props_length = view.getInt32(offset, false); + offset += 4; + target.header = new Header(); + ({ offset } = Header._decodeOne(view, offset, target.header)); + target.network = new UniqueID(); + ({ offset } = UniqueID._decodeOne(view, offset, target.network)); + target.segments = new Array(target.segments_length); + for (let i0 = 0; i0 < target.segments_length; i0++) { + target.segments[i0] = new UniqueID(); + ({ offset } = UniqueID._decodeOne(view, offset, target.segments[i0])); + } + target.props = new Array(target.props_length); + for (let i0 = 0; i0 < target.props_length; i0++) { + target.props[i0] = new KeyValue(); + ({ offset } = KeyValue._decodeOne(view, offset, target.props[i0])); + } + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, RoutePath._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + view.setInt32(offset, this.segments_length, false); + offset += 4; + view.setInt32(offset, this.props_length, false); + offset += 4; + offset = this.header._encodeOne(view, offset); + offset = this.network._encodeOne(view, offset); + for (let i0 = 0; i0 < this.segments_length; i0++) { + offset = this.segments[i0]._encodeOne(view, offset); + } + for (let i0 = 0; i0 < this.props_length; i0++) { + offset = this.props[i0]._encodeOne(view, offset); + } + return offset; + } + + _encodedSize(): number { + let size = 0; + size += 4; + size += 4; + size += this.header._encodedSize(); + size += this.network._encodedSize(); + for (let i0 = 0; i0 < this.segments_length; i0++) { + size += this.segments[i0]._encodedSize(); + } + for (let i0 = 0; i0 < this.props_length; i0++) { + size += this.props[i0]._encodedSize(); + } + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(RoutePath)) return 0n; + const newparents = [...parents, RoutePath]; + let tmphash = RoutePath._HASH; + tmphash = (tmphash + Header._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + UniqueID._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + UniqueID._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + KeyValue._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (RoutePath._packedFingerprint === null) { + RoutePath._packedFingerprint = RoutePath._getHashRecursive([]); + } + return RoutePath._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/RouteSegment.ts b/generated/ts_lcm_msgs/geographic_msgs/RouteSegment.ts new file mode 100644 index 0000000..1320a19 --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/RouteSegment.ts @@ -0,0 +1,116 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +import { UniqueID } from "../uuid_msgs/UniqueID.ts"; +import { KeyValue } from "./KeyValue.ts"; + +export class RouteSegment { + static readonly _HASH = 0x2757afe165f2b650n; + static readonly _NAME = "geographic_msgs.RouteSegment"; + private static _packedFingerprint: bigint | null = null; + + props_length: number; + id: UniqueID; + start: UniqueID; + end: UniqueID; + props: KeyValue[]; + + constructor(init?: Partial) { + this.props_length = init?.props_length ?? 0; + this.id = init?.id ?? new UniqueID(); + this.start = init?.start ?? new UniqueID(); + this.end = init?.end ?? new UniqueID(); + this.props = init?.props ?? []; + } + + static decode(data: Uint8Array): RouteSegment { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = RouteSegment._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new RouteSegment(); + ({ offset } = RouteSegment._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: RouteSegment): { offset: number } { + target.props_length = view.getInt32(offset, false); + offset += 4; + target.id = new UniqueID(); + ({ offset } = UniqueID._decodeOne(view, offset, target.id)); + target.start = new UniqueID(); + ({ offset } = UniqueID._decodeOne(view, offset, target.start)); + target.end = new UniqueID(); + ({ offset } = UniqueID._decodeOne(view, offset, target.end)); + target.props = new Array(target.props_length); + for (let i0 = 0; i0 < target.props_length; i0++) { + target.props[i0] = new KeyValue(); + ({ offset } = KeyValue._decodeOne(view, offset, target.props[i0])); + } + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, RouteSegment._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + view.setInt32(offset, this.props_length, false); + offset += 4; + offset = this.id._encodeOne(view, offset); + offset = this.start._encodeOne(view, offset); + offset = this.end._encodeOne(view, offset); + for (let i0 = 0; i0 < this.props_length; i0++) { + offset = this.props[i0]._encodeOne(view, offset); + } + return offset; + } + + _encodedSize(): number { + let size = 0; + size += 4; + size += this.id._encodedSize(); + size += this.start._encodedSize(); + size += this.end._encodedSize(); + for (let i0 = 0; i0 < this.props_length; i0++) { + size += this.props[i0]._encodedSize(); + } + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(RouteSegment)) return 0n; + const newparents = [...parents, RouteSegment]; + let tmphash = RouteSegment._HASH; + tmphash = (tmphash + UniqueID._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + UniqueID._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + UniqueID._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + KeyValue._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (RouteSegment._packedFingerprint === null) { + RouteSegment._packedFingerprint = RouteSegment._getHashRecursive([]); + } + return RouteSegment._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/WayPoint.ts b/generated/ts_lcm_msgs/geographic_msgs/WayPoint.ts new file mode 100644 index 0000000..c57d9ab --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/WayPoint.ts @@ -0,0 +1,110 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +import { UniqueID } from "../uuid_msgs/UniqueID.ts"; +import { GeoPoint } from "./GeoPoint.ts"; +import { KeyValue } from "./KeyValue.ts"; + +export class WayPoint { + static readonly _HASH = 0xd32d71d9c391bc8fn; + static readonly _NAME = "geographic_msgs.WayPoint"; + private static _packedFingerprint: bigint | null = null; + + props_length: number; + id: UniqueID; + position: GeoPoint; + props: KeyValue[]; + + constructor(init?: Partial) { + this.props_length = init?.props_length ?? 0; + this.id = init?.id ?? new UniqueID(); + this.position = init?.position ?? new GeoPoint(); + this.props = init?.props ?? []; + } + + static decode(data: Uint8Array): WayPoint { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = WayPoint._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new WayPoint(); + ({ offset } = WayPoint._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: WayPoint): { offset: number } { + target.props_length = view.getInt32(offset, false); + offset += 4; + target.id = new UniqueID(); + ({ offset } = UniqueID._decodeOne(view, offset, target.id)); + target.position = new GeoPoint(); + ({ offset } = GeoPoint._decodeOne(view, offset, target.position)); + target.props = new Array(target.props_length); + for (let i0 = 0; i0 < target.props_length; i0++) { + target.props[i0] = new KeyValue(); + ({ offset } = KeyValue._decodeOne(view, offset, target.props[i0])); + } + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, WayPoint._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + view.setInt32(offset, this.props_length, false); + offset += 4; + offset = this.id._encodeOne(view, offset); + offset = this.position._encodeOne(view, offset); + for (let i0 = 0; i0 < this.props_length; i0++) { + offset = this.props[i0]._encodeOne(view, offset); + } + return offset; + } + + _encodedSize(): number { + let size = 0; + size += 4; + size += this.id._encodedSize(); + size += this.position._encodedSize(); + for (let i0 = 0; i0 < this.props_length; i0++) { + size += this.props[i0]._encodedSize(); + } + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(WayPoint)) return 0n; + const newparents = [...parents, WayPoint]; + let tmphash = WayPoint._HASH; + tmphash = (tmphash + UniqueID._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + GeoPoint._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (tmphash + KeyValue._getHashRecursive(newparents)) & 0xffffffffffffffffn; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (WayPoint._packedFingerprint === null) { + WayPoint._packedFingerprint = WayPoint._getHashRecursive([]); + } + return WayPoint._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/geographic_msgs/mod.ts b/generated/ts_lcm_msgs/geographic_msgs/mod.ts new file mode 100644 index 0000000..132f730 --- /dev/null +++ b/generated/ts_lcm_msgs/geographic_msgs/mod.ts @@ -0,0 +1,18 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +export * from "./BoundingBox.ts"; +export * from "./GeoPath.ts"; +export * from "./GeoPoint.ts"; +export * from "./GeoPointStamped.ts"; +export * from "./GeoPose.ts"; +export * from "./GeoPoseStamped.ts"; +export * from "./GeoPoseWithCovariance.ts"; +export * from "./GeoPoseWithCovarianceStamped.ts"; +export * from "./GeographicMap.ts"; +export * from "./GeographicMapChanges.ts"; +export * from "./KeyValue.ts"; +export * from "./MapFeature.ts"; +export * from "./RouteNetwork.ts"; +export * from "./RoutePath.ts"; +export * from "./RouteSegment.ts"; +export * from "./WayPoint.ts"; diff --git a/generated/ts_lcm_msgs/mod.ts b/generated/ts_lcm_msgs/mod.ts index 43eec0c..bc8fcae 100644 --- a/generated/ts_lcm_msgs/mod.ts +++ b/generated/ts_lcm_msgs/mod.ts @@ -4,6 +4,7 @@ import * as actionlib_msgs from "./actionlib_msgs/mod.ts"; import * as builtin_interfaces from "./builtin_interfaces/mod.ts"; import * as diagnostic_msgs from "./diagnostic_msgs/mod.ts"; import * as foxglove_msgs from "./foxglove_msgs/mod.ts"; +import * as geographic_msgs from "./geographic_msgs/mod.ts"; import * as geometry_msgs from "./geometry_msgs/mod.ts"; import * as nav_msgs from "./nav_msgs/mod.ts"; import * as sensor_msgs from "./sensor_msgs/mod.ts"; @@ -12,6 +13,7 @@ import * as std_msgs from "./std_msgs/mod.ts"; import * as stereo_msgs from "./stereo_msgs/mod.ts"; import * as tf2_msgs from "./tf2_msgs/mod.ts"; import * as trajectory_msgs from "./trajectory_msgs/mod.ts"; +import * as uuid_msgs from "./uuid_msgs/mod.ts"; import * as vision_msgs from "./vision_msgs/mod.ts"; import * as visualization_msgs from "./visualization_msgs/mod.ts"; @@ -20,6 +22,7 @@ export * as actionlib_msgs from "./actionlib_msgs/mod.ts"; export * as builtin_interfaces from "./builtin_interfaces/mod.ts"; export * as diagnostic_msgs from "./diagnostic_msgs/mod.ts"; export * as foxglove_msgs from "./foxglove_msgs/mod.ts"; +export * as geographic_msgs from "./geographic_msgs/mod.ts"; export * as geometry_msgs from "./geometry_msgs/mod.ts"; export * as nav_msgs from "./nav_msgs/mod.ts"; export * as sensor_msgs from "./sensor_msgs/mod.ts"; @@ -28,6 +31,7 @@ export * as std_msgs from "./std_msgs/mod.ts"; export * as stereo_msgs from "./stereo_msgs/mod.ts"; export * as tf2_msgs from "./tf2_msgs/mod.ts"; export * as trajectory_msgs from "./trajectory_msgs/mod.ts"; +export * as uuid_msgs from "./uuid_msgs/mod.ts"; export * as vision_msgs from "./vision_msgs/mod.ts"; export * as visualization_msgs from "./visualization_msgs/mod.ts"; @@ -56,6 +60,7 @@ const _registry = { registerPackage: _registerPackage }; _registry.registerPackage(builtin_interfaces); _registry.registerPackage(diagnostic_msgs); _registry.registerPackage(foxglove_msgs); + _registry.registerPackage(geographic_msgs); _registry.registerPackage(geometry_msgs); _registry.registerPackage(nav_msgs); _registry.registerPackage(sensor_msgs); @@ -64,6 +69,7 @@ const _registry = { registerPackage: _registerPackage }; _registry.registerPackage(stereo_msgs); _registry.registerPackage(tf2_msgs); _registry.registerPackage(trajectory_msgs); + _registry.registerPackage(uuid_msgs); _registry.registerPackage(vision_msgs); _registry.registerPackage(visualization_msgs); diff --git a/generated/ts_lcm_msgs/uuid_msgs/UniqueID.ts b/generated/ts_lcm_msgs/uuid_msgs/UniqueID.ts new file mode 100644 index 0000000..3158f6b --- /dev/null +++ b/generated/ts_lcm_msgs/uuid_msgs/UniqueID.ts @@ -0,0 +1,78 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +export class UniqueID { + static readonly _HASH = 0x697d4febd3ed5654n; + static readonly _NAME = "uuid_msgs.UniqueID"; + private static _packedFingerprint: bigint | null = null; + + uuid: Uint8Array; + + constructor(init?: Partial) { + this.uuid = init?.uuid ?? new Uint8Array(16); + } + + static decode(data: Uint8Array): UniqueID { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let offset = 0; + + // Verify fingerprint (recursive hash including nested types) + const hash = view.getBigUint64(offset, false); + offset += 8; + const expectedHash = UniqueID._getPackedFingerprint(); + if (hash !== expectedHash) { + throw new Error(`Hash mismatch: expected ${expectedHash.toString(16)}, got ${hash.toString(16)}`); + } + + const result = new UniqueID(); + ({ offset } = UniqueID._decodeOne(view, offset, result)); + return result; + } + + static _decodeOne(view: DataView, offset: number, target: UniqueID): { offset: number } { + target.uuid = new Uint8Array(view.buffer, view.byteOffset + offset, 16); + offset += 16; + return { offset }; + } + + encode(): Uint8Array { + const size = 8 + this._encodedSize(); + const data = new Uint8Array(size); + const view = new DataView(data.buffer); + let offset = 0; + + // Write fingerprint (recursive hash including nested types) + view.setBigUint64(offset, UniqueID._getPackedFingerprint(), false); + offset += 8; + + offset = this._encodeOne(view, offset); + return data; + } + + _encodeOne(view: DataView, offset: number): number { + new Uint8Array(view.buffer, view.byteOffset + offset).set(this.uuid.subarray(0, 16)); + offset += 16; + return offset; + } + + _encodedSize(): number { + let size = 0; + size += 16 * 1; + return size; + } + + // deno-lint-ignore no-explicit-any + static _getHashRecursive(parents: any[]): bigint { + if (parents.includes(UniqueID)) return 0n; + const newparents = [...parents, UniqueID]; + let tmphash = UniqueID._HASH; + tmphash = (((tmphash << 1n) & 0xffffffffffffffffn) + (tmphash >> 63n)) & 0xffffffffffffffffn; + return tmphash; + } + + static _getPackedFingerprint(): bigint { + if (UniqueID._packedFingerprint === null) { + UniqueID._packedFingerprint = UniqueID._getHashRecursive([]); + } + return UniqueID._packedFingerprint; + } +} diff --git a/generated/ts_lcm_msgs/uuid_msgs/mod.ts b/generated/ts_lcm_msgs/uuid_msgs/mod.ts new file mode 100644 index 0000000..ee17680 --- /dev/null +++ b/generated/ts_lcm_msgs/uuid_msgs/mod.ts @@ -0,0 +1,3 @@ +// Auto-generated by lcm-ts. DO NOT EDIT. + +export * from "./UniqueID.ts"; diff --git a/lcm_types/geographic_msgs_BoundingBox.lcm b/lcm_types/geographic_msgs_BoundingBox.lcm new file mode 100644 index 0000000..2214eff --- /dev/null +++ b/lcm_types/geographic_msgs_BoundingBox.lcm @@ -0,0 +1,6 @@ +package geographic_msgs; + +struct BoundingBox { + GeoPoint min_pt; + GeoPoint max_pt; +} \ No newline at end of file diff --git a/lcm_types/geographic_msgs_GeoPath.lcm b/lcm_types/geographic_msgs_GeoPath.lcm new file mode 100644 index 0000000..d962158 --- /dev/null +++ b/lcm_types/geographic_msgs_GeoPath.lcm @@ -0,0 +1,7 @@ +package geographic_msgs; + +struct GeoPath { + int32_t poses_length; + std_msgs.Header header; + geographic_msgs.GeoPoseStamped poses[poses_length]; +} \ No newline at end of file diff --git a/lcm_types/geographic_msgs_GeoPoint.lcm b/lcm_types/geographic_msgs_GeoPoint.lcm new file mode 100644 index 0000000..3a796ea --- /dev/null +++ b/lcm_types/geographic_msgs_GeoPoint.lcm @@ -0,0 +1,7 @@ +package geographic_msgs; + +struct GeoPoint { + double latitude; + double longitude; + double altitude; +} \ No newline at end of file diff --git a/lcm_types/geographic_msgs_GeoPointStamped.lcm b/lcm_types/geographic_msgs_GeoPointStamped.lcm new file mode 100644 index 0000000..22192f5 --- /dev/null +++ b/lcm_types/geographic_msgs_GeoPointStamped.lcm @@ -0,0 +1,6 @@ +package geographic_msgs; + +struct GeoPointStamped { + std_msgs.Header header; + geographic_msgs.GeoPoint position; +} \ No newline at end of file diff --git a/lcm_types/geographic_msgs_GeoPose.lcm b/lcm_types/geographic_msgs_GeoPose.lcm new file mode 100644 index 0000000..ff8741f --- /dev/null +++ b/lcm_types/geographic_msgs_GeoPose.lcm @@ -0,0 +1,6 @@ +package geographic_msgs; + +struct GeoPose { + GeoPoint position; + geometry_msgs.Quaternion orientation; +} \ No newline at end of file diff --git a/lcm_types/geographic_msgs_GeoPoseStamped.lcm b/lcm_types/geographic_msgs_GeoPoseStamped.lcm new file mode 100644 index 0000000..e9fd14d --- /dev/null +++ b/lcm_types/geographic_msgs_GeoPoseStamped.lcm @@ -0,0 +1,6 @@ +package geographic_msgs; + +struct GeoPoseStamped { + std_msgs.Header header; + geographic_msgs.GeoPose pose; +} \ No newline at end of file diff --git a/lcm_types/geographic_msgs_GeoPoseWithCovariance.lcm b/lcm_types/geographic_msgs_GeoPoseWithCovariance.lcm new file mode 100644 index 0000000..9d3f8b2 --- /dev/null +++ b/lcm_types/geographic_msgs_GeoPoseWithCovariance.lcm @@ -0,0 +1,6 @@ +package geographic_msgs; + +struct GeoPoseWithCovariance { + GeoPose pose; + double covariance[36]; +} \ No newline at end of file diff --git a/lcm_types/geographic_msgs_GeoPoseWithCovarianceStamped.lcm b/lcm_types/geographic_msgs_GeoPoseWithCovarianceStamped.lcm new file mode 100644 index 0000000..5678e8c --- /dev/null +++ b/lcm_types/geographic_msgs_GeoPoseWithCovarianceStamped.lcm @@ -0,0 +1,6 @@ +package geographic_msgs; + +struct GeoPoseWithCovarianceStamped { + std_msgs.Header header; + geographic_msgs.GeoPoseWithCovariance pose; +} \ No newline at end of file diff --git a/lcm_types/geographic_msgs_GeographicMap.lcm b/lcm_types/geographic_msgs_GeographicMap.lcm new file mode 100644 index 0000000..2a7be6f --- /dev/null +++ b/lcm_types/geographic_msgs_GeographicMap.lcm @@ -0,0 +1,13 @@ +package geographic_msgs; + +struct GeographicMap { + int32_t points_length; + int32_t features_length; + int32_t props_length; + std_msgs.Header header; + uuid_msgs.UniqueID id; + BoundingBox bounds; + WayPoint points[points_length]; + MapFeature features[features_length]; + KeyValue props[props_length]; +} \ No newline at end of file diff --git a/lcm_types/geographic_msgs_GeographicMapChanges.lcm b/lcm_types/geographic_msgs_GeographicMapChanges.lcm new file mode 100644 index 0000000..45ba369 --- /dev/null +++ b/lcm_types/geographic_msgs_GeographicMapChanges.lcm @@ -0,0 +1,8 @@ +package geographic_msgs; + +struct GeographicMapChanges { + int32_t deletes_length; + std_msgs.Header header; + GeographicMap diffs; + uuid_msgs.UniqueID deletes[deletes_length]; +} \ No newline at end of file diff --git a/lcm_types/geographic_msgs_KeyValue.lcm b/lcm_types/geographic_msgs_KeyValue.lcm new file mode 100644 index 0000000..9807afc --- /dev/null +++ b/lcm_types/geographic_msgs_KeyValue.lcm @@ -0,0 +1,6 @@ +package geographic_msgs; + +struct KeyValue { + string key; + string value; +} \ No newline at end of file diff --git a/lcm_types/geographic_msgs_MapFeature.lcm b/lcm_types/geographic_msgs_MapFeature.lcm new file mode 100644 index 0000000..4834c9d --- /dev/null +++ b/lcm_types/geographic_msgs_MapFeature.lcm @@ -0,0 +1,9 @@ +package geographic_msgs; + +struct MapFeature { + int32_t components_length; + int32_t props_length; + uuid_msgs.UniqueID id; + uuid_msgs.UniqueID components[components_length]; + KeyValue props[props_length]; +} \ No newline at end of file diff --git a/lcm_types/geographic_msgs_RouteNetwork.lcm b/lcm_types/geographic_msgs_RouteNetwork.lcm new file mode 100644 index 0000000..4292034 --- /dev/null +++ b/lcm_types/geographic_msgs_RouteNetwork.lcm @@ -0,0 +1,13 @@ +package geographic_msgs; + +struct RouteNetwork { + int32_t points_length; + int32_t segments_length; + int32_t props_length; + std_msgs.Header header; + uuid_msgs.UniqueID id; + BoundingBox bounds; + WayPoint points[points_length]; + RouteSegment segments[segments_length]; + KeyValue props[props_length]; +} \ No newline at end of file diff --git a/lcm_types/geographic_msgs_RoutePath.lcm b/lcm_types/geographic_msgs_RoutePath.lcm new file mode 100644 index 0000000..8cbcb54 --- /dev/null +++ b/lcm_types/geographic_msgs_RoutePath.lcm @@ -0,0 +1,10 @@ +package geographic_msgs; + +struct RoutePath { + int32_t segments_length; + int32_t props_length; + std_msgs.Header header; + uuid_msgs.UniqueID network; + uuid_msgs.UniqueID segments[segments_length]; + KeyValue props[props_length]; +} \ No newline at end of file diff --git a/lcm_types/geographic_msgs_RouteSegment.lcm b/lcm_types/geographic_msgs_RouteSegment.lcm new file mode 100644 index 0000000..c8472b6 --- /dev/null +++ b/lcm_types/geographic_msgs_RouteSegment.lcm @@ -0,0 +1,9 @@ +package geographic_msgs; + +struct RouteSegment { + int32_t props_length; + uuid_msgs.UniqueID id; + uuid_msgs.UniqueID start; + uuid_msgs.UniqueID end; + KeyValue props[props_length]; +} \ No newline at end of file diff --git a/lcm_types/geographic_msgs_WayPoint.lcm b/lcm_types/geographic_msgs_WayPoint.lcm new file mode 100644 index 0000000..f575169 --- /dev/null +++ b/lcm_types/geographic_msgs_WayPoint.lcm @@ -0,0 +1,8 @@ +package geographic_msgs; + +struct WayPoint { + int32_t props_length; + uuid_msgs.UniqueID id; + GeoPoint position; + KeyValue props[props_length]; +} \ No newline at end of file diff --git a/lcm_types/uuid_msgs_UniqueID.lcm b/lcm_types/uuid_msgs_UniqueID.lcm new file mode 100644 index 0000000..5769e5e --- /dev/null +++ b/lcm_types/uuid_msgs_UniqueID.lcm @@ -0,0 +1,5 @@ +package uuid_msgs; + +struct UniqueID { + byte uuid[16]; +} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a1e67eb..2c68a15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "dimos_lcm" -version = "0.1.3" +version = "0.1.4" description = "LCM-Foxglove bridge and message utilities for Dimensional Robotics" authors = [ {name = "Dimensional Team", email = "build@dimensionalOS.com"}, @@ -35,6 +35,8 @@ packages = [ "dimos_lcm.actionlib_msgs", "dimos_lcm.builtin_interfaces", "dimos_lcm.foxglove_msgs", + "dimos_lcm.geographic_msgs", + "dimos_lcm.uuid_msgs", "dimos_lcm.shape_msgs", "dimos_lcm.stereo_msgs", "dimos_lcm.tf2_msgs", @@ -54,6 +56,8 @@ packages = [ "dimos_lcm.actionlib_msgs" = "generated/python_lcm_msgs/lcm_msgs/actionlib_msgs" "dimos_lcm.builtin_interfaces" = "generated/python_lcm_msgs/lcm_msgs/builtin_interfaces" "dimos_lcm.foxglove_msgs" = "generated/python_lcm_msgs/lcm_msgs/foxglove_msgs" +"dimos_lcm.geographic_msgs" = "generated/python_lcm_msgs/lcm_msgs/geographic_msgs" +"dimos_lcm.uuid_msgs" = "generated/python_lcm_msgs/lcm_msgs/uuid_msgs" "dimos_lcm.shape_msgs" = "generated/python_lcm_msgs/lcm_msgs/shape_msgs" "dimos_lcm.stereo_msgs" = "generated/python_lcm_msgs/lcm_msgs/stereo_msgs" "dimos_lcm.tf2_msgs" = "generated/python_lcm_msgs/lcm_msgs/tf2_msgs" diff --git a/sources/ros_msgs/geographic_msgs/CHANGELOG.rst b/sources/ros_msgs/geographic_msgs/CHANGELOG.rst new file mode 100644 index 0000000..0b721f4 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/CHANGELOG.rst @@ -0,0 +1,62 @@ +Change history +============== + +0.5.3 (2018-03-27) +------------------ + +* Add additional information to ``GetGeoPath`` service response. + +0.5.2 (2017-04-15) +------------------ + +* Fix merge error in GeoPath message. + +0.5.1 (2017-04-15) +------------------ + +* Add GeoPath message with poses. +* Add GetGeoPath service (`#7`_). + +0.5.0 (2017-04-07) +------------------ + +* Add new ``GeoPointStamped`` and ``GeoPoseStamped`` messages. + +0.4.0 (2014-09-18) +------------------ + +0.3.2 (2014-08-30) +------------------ + + * Add missing ``geometry_msgs`` dependency to ``catkin_package()`` + components in CMakeLists.txt (`#13`_), thanks to Timo Roehling. + +0.3.1 (2013-10-03) +------------------ + +0.3.0 (2013-08-03) +------------------ + + * Released to Hydro. + * Convert to catkin build (`#3`_). + +0.2.1 (2012-08-13) +------------------ + + * Released to Fuerte. + * Released to Groovy: 2013-03-27. + +0.2.0 (2012-06-02) +------------------ + + * Released to Electric. + +0.1.0 (2012-04-10) +------------------ + + * Initial release to Electric. + +.. _`#3`: https://github.com/ros-geographic-info/geographic_info/issues/3 +.. _`#6`: https://github.com/ros-geographic-info/geographic_info/issues/6 +.. _`#7`: https://github.com/ros-geographic-info/geographic_info/issues/7 +.. _`#13`: https://github.com/ros-geographic-info/geographic_info/pull/13 diff --git a/sources/ros_msgs/geographic_msgs/CMakeLists.txt b/sources/ros_msgs/geographic_msgs/CMakeLists.txt new file mode 100644 index 0000000..d937147 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/CMakeLists.txt @@ -0,0 +1,51 @@ +cmake_minimum_required(VERSION 3.0.2) +project(geographic_msgs) + +find_package(catkin REQUIRED + COMPONENTS + message_generation + geometry_msgs + std_msgs + uuid_msgs +) + +add_message_files( + DIRECTORY msg + FILES + BoundingBox.msg + GeographicMapChanges.msg + GeographicMap.msg + GeoPath.msg + GeoPoint.msg + GeoPointStamped.msg + GeoPose.msg + GeoPoseWithCovariance.msg + GeoPoseStamped.msg + GeoPoseWithCovarianceStamped.msg + KeyValue.msg + MapFeature.msg + RouteNetwork.msg + RoutePath.msg + RouteSegment.msg + WayPoint.msg +) + +add_service_files( + DIRECTORY srv + FILES + GetGeographicMap.srv + GetGeoPath.srv + GetRoutePlan.srv + UpdateGeographicMap.srv +) + +generate_messages( + DEPENDENCIES + geometry_msgs + std_msgs + uuid_msgs +) + +catkin_package( + CATKIN_DEPENDS message_runtime geometry_msgs uuid_msgs std_msgs +) diff --git a/sources/ros_msgs/geographic_msgs/mainpage.dox b/sources/ros_msgs/geographic_msgs/mainpage.dox new file mode 100644 index 0000000..77a740c --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/mainpage.dox @@ -0,0 +1,9 @@ +/** +\mainpage +\htmlinclude manifest.html + +This package provides ROS messages for Geographic Information. + +It has no nodes, utilities, scripts or C++ API. + +*/ diff --git a/sources/ros_msgs/geographic_msgs/msg/BoundingBox.msg b/sources/ros_msgs/geographic_msgs/msg/BoundingBox.msg new file mode 100644 index 0000000..5e82e75 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/BoundingBox.msg @@ -0,0 +1,13 @@ +# Geographic map bounding box. +# +# The two GeoPoints denote diagonally opposite corners of the box. +# +# If min_pt.latitude is NaN, the bounding box is "global", matching +# any valid latitude, longitude and altitude. +# +# If min_pt.altitude is NaN, the bounding box is two-dimensional and +# matches any altitude within the specified latitude and longitude +# range. + +GeoPoint min_pt # lowest and most Southwestern corner +GeoPoint max_pt # highest and most Northeastern corner diff --git a/sources/ros_msgs/geographic_msgs/msg/GeoPath.msg b/sources/ros_msgs/geographic_msgs/msg/GeoPath.msg new file mode 100644 index 0000000..6663339 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/GeoPath.msg @@ -0,0 +1,2 @@ +std_msgs/Header header +geographic_msgs/GeoPoseStamped[] poses diff --git a/sources/ros_msgs/geographic_msgs/msg/GeoPoint.msg b/sources/ros_msgs/geographic_msgs/msg/GeoPoint.msg new file mode 100644 index 0000000..90d36f2 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/GeoPoint.msg @@ -0,0 +1,13 @@ +# Geographic point, using the WGS 84 reference ellipsoid. + +# Latitude [degrees]. Positive is north of equator; negative is south +# (-90 <= latitude <= +90). +float64 latitude + +# Longitude [degrees]. Positive is east of prime meridian; negative is +# west (-180 <= longitude <= +180). At the poles, latitude is -90 or +# +90, and longitude is irrelevant, but must be in range. +float64 longitude + +# Altitude [m]. Positive is above the WGS 84 ellipsoid (NaN if unspecified). +float64 altitude diff --git a/sources/ros_msgs/geographic_msgs/msg/GeoPointStamped.msg b/sources/ros_msgs/geographic_msgs/msg/GeoPointStamped.msg new file mode 100644 index 0000000..16e2b1f --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/GeoPointStamped.msg @@ -0,0 +1,2 @@ +Header header +geographic_msgs/GeoPoint position diff --git a/sources/ros_msgs/geographic_msgs/msg/GeoPose.msg b/sources/ros_msgs/geographic_msgs/msg/GeoPose.msg new file mode 100644 index 0000000..906fc50 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/GeoPose.msg @@ -0,0 +1,7 @@ +# Geographic pose, using the WGS 84 reference ellipsoid. +# +# Orientation uses the East-North-Up (ENU) frame of reference. +# (But, what about singularities at the poles?) + +GeoPoint position +geometry_msgs/Quaternion orientation diff --git a/sources/ros_msgs/geographic_msgs/msg/GeoPoseStamped.msg b/sources/ros_msgs/geographic_msgs/msg/GeoPoseStamped.msg new file mode 100644 index 0000000..e7b8d79 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/GeoPoseStamped.msg @@ -0,0 +1,2 @@ +Header header +geographic_msgs/GeoPose pose diff --git a/sources/ros_msgs/geographic_msgs/msg/GeoPoseWithCovariance.msg b/sources/ros_msgs/geographic_msgs/msg/GeoPoseWithCovariance.msg new file mode 100644 index 0000000..6a35630 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/GeoPoseWithCovariance.msg @@ -0,0 +1,12 @@ +# Geographic pose, using the WGS 84 reference ellipsoid. +# +# Orientation uses the East-North-Up (ENU) frame of reference. +# (But, what about singularities at the poles?) + +GeoPose pose + +# Row-major representation of the 6x6 covariance matrix +# The orientation parameters use a fixed-axis representation. +# In order, the parameters are: +# (Lat, Lon, Alt, rotation about E (East) axis, rotation about N (North) axis, rotation about U (Up) axis) +float64[36] covariance diff --git a/sources/ros_msgs/geographic_msgs/msg/GeoPoseWithCovarianceStamped.msg b/sources/ros_msgs/geographic_msgs/msg/GeoPoseWithCovarianceStamped.msg new file mode 100644 index 0000000..e0e2dc9 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/GeoPoseWithCovarianceStamped.msg @@ -0,0 +1,2 @@ +Header header +geographic_msgs/GeoPoseWithCovariance pose diff --git a/sources/ros_msgs/geographic_msgs/msg/GeographicMap.msg b/sources/ros_msgs/geographic_msgs/msg/GeographicMap.msg new file mode 100644 index 0000000..58e7f19 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/GeographicMap.msg @@ -0,0 +1,11 @@ +# Geographic map for a specified region. + +Header header # stamp specifies time + # frame_id (normally /map) + +uuid_msgs/UniqueID id # identifier for this map +BoundingBox bounds # 2D bounding box containing map + +WayPoint[] points # way-points +MapFeature[] features # map features +KeyValue[] props # map properties diff --git a/sources/ros_msgs/geographic_msgs/msg/GeographicMapChanges.msg b/sources/ros_msgs/geographic_msgs/msg/GeographicMapChanges.msg new file mode 100644 index 0000000..f1b572d --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/GeographicMapChanges.msg @@ -0,0 +1,7 @@ +# A list of geographic map changes. + +Header header # stamp specifies time of change + # frame_id (normally /map) + +GeographicMap diffs # new and changed points and features +uuid_msgs/UniqueID[] deletes # deleted map components diff --git a/sources/ros_msgs/geographic_msgs/msg/KeyValue.msg b/sources/ros_msgs/geographic_msgs/msg/KeyValue.msg new file mode 100644 index 0000000..cd6048b --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/KeyValue.msg @@ -0,0 +1,7 @@ +# Geographic map tag (key, value) pair +# +# This is equivalent to diagnostic_msgs/KeyValue, repeated here to +# avoid introducing a trivial stack dependency. + +string key # tag label +string value # corresponding value diff --git a/sources/ros_msgs/geographic_msgs/msg/MapFeature.msg b/sources/ros_msgs/geographic_msgs/msg/MapFeature.msg new file mode 100644 index 0000000..49e040b --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/MapFeature.msg @@ -0,0 +1,11 @@ +# Geographic map feature. +# +# A list of WayPoint IDs for features like streets, highways, hiking +# trails, the outlines of buildings and parking lots in sequential +# order. +# +# Feature lists may also contain other feature lists as members. + +uuid_msgs/UniqueID id # Unique feature identifier +uuid_msgs/UniqueID[] components # Sequence of feature components +KeyValue[] props # Key/value properties for this feature diff --git a/sources/ros_msgs/geographic_msgs/msg/RouteNetwork.msg b/sources/ros_msgs/geographic_msgs/msg/RouteNetwork.msg new file mode 100644 index 0000000..a4c1e35 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/RouteNetwork.msg @@ -0,0 +1,16 @@ +# Geographic map route network. +# +# A directed graph of WayPoint nodes and RouteSegment edges. This +# information is extracted from the more-detailed contents of a +# GeographicMap. A RouteNetwork contains only the way points and +# route segments of interest for path planning. + +Header header + +uuid_msgs/UniqueID id # This route network identifier +BoundingBox bounds # 2D bounding box for network + +WayPoint[] points # Way points in this network +RouteSegment[] segments # Directed edges of this network + +KeyValue[] props # Network key/value properties diff --git a/sources/ros_msgs/geographic_msgs/msg/RoutePath.msg b/sources/ros_msgs/geographic_msgs/msg/RoutePath.msg new file mode 100644 index 0000000..29d09be --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/RoutePath.msg @@ -0,0 +1,11 @@ +# Path through a route network. +# +# A path is a sequence of RouteSegment edges. This information is +# extracted from a RouteNetwork graph. A RoutePath lists the route +# segments needed to reach some chosen goal. + +Header header + +uuid_msgs/UniqueID network # Route network containing this path +uuid_msgs/UniqueID[] segments # Sequence of RouteSegment IDs +KeyValue[] props # Key/value properties diff --git a/sources/ros_msgs/geographic_msgs/msg/RouteSegment.msg b/sources/ros_msgs/geographic_msgs/msg/RouteSegment.msg new file mode 100644 index 0000000..9b802d1 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/RouteSegment.msg @@ -0,0 +1,12 @@ +# Route network segment. +# +# This is one directed edge of a RouteNetwork graph. It represents a +# known path from one way point to another. If the path is two-way, +# there will be another RouteSegment with "start" and "end" reversed. + +uuid_msgs/UniqueID id # Unique identifier for this segment + +uuid_msgs/UniqueID start # beginning way point of segment +uuid_msgs/UniqueID end # ending way point of segment + +KeyValue[] props # segment properties diff --git a/sources/ros_msgs/geographic_msgs/msg/WayPoint.msg b/sources/ros_msgs/geographic_msgs/msg/WayPoint.msg new file mode 100644 index 0000000..2f216d5 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/msg/WayPoint.msg @@ -0,0 +1,5 @@ +# Way-point element for a geographic map. + +uuid_msgs/UniqueID id # Unique way-point identifier +GeoPoint position # Position relative to WGS 84 ellipsoid +KeyValue[] props # Key/value properties for this point diff --git a/sources/ros_msgs/geographic_msgs/package.xml b/sources/ros_msgs/geographic_msgs/package.xml new file mode 100644 index 0000000..254e932 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/package.xml @@ -0,0 +1,28 @@ + + + geographic_msgs + 0.5.6 + + ROS messages for Geographic Information Systems. + + Jack O'Quin + Jack O'Quin + BSD + + http://wiki.ros.org/geographic_msgs + https://github.com/ros-geographic-info/geographic_info/issues + https://github.com/ros-geographic-info/geographic_info.git + + catkin + + message_generation + geometry_msgs + std_msgs + uuid_msgs + + message_runtime + geometry_msgs + std_msgs + uuid_msgs + + diff --git a/sources/ros_msgs/geographic_msgs/srv/GetGeoPath.srv b/sources/ros_msgs/geographic_msgs/srv/GetGeoPath.srv new file mode 100644 index 0000000..94c2a01 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/srv/GetGeoPath.srv @@ -0,0 +1,17 @@ +# Searches for given start and goal the nearest route segments +# and determine the path through the RouteNetwork + +geographic_msgs/GeoPoint start # starting point +geographic_msgs/GeoPoint goal # goal point + +--- + +bool success # true if the call succeeded +string status # more details + +geographic_msgs/GeoPath plan # path to follow + +uuid_msgs/UniqueID network # the uuid of the RouteNetwork +uuid_msgs/UniqueID start_seg # the uuid of the starting RouteSegment +uuid_msgs/UniqueID goal_seg # the uuid of the ending RouteSegment +float64 distance # the length of the plan diff --git a/sources/ros_msgs/geographic_msgs/srv/GetGeographicMap.srv b/sources/ros_msgs/geographic_msgs/srv/GetGeographicMap.srv new file mode 100644 index 0000000..ecaa592 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/srv/GetGeographicMap.srv @@ -0,0 +1,15 @@ +# This service requests a region of a geographic map. + +string url # where to read map data + +# Bounding box for the desired map. If all zeros, provide all data +# available from the specified URL. +BoundingBox bounds + +--- + +bool success # true if the call succeeded +string status # more details + +# The requested map, its bounds may differ from the requested bounds. +GeographicMap map diff --git a/sources/ros_msgs/geographic_msgs/srv/GetRoutePlan.srv b/sources/ros_msgs/geographic_msgs/srv/GetRoutePlan.srv new file mode 100644 index 0000000..f1bb88f --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/srv/GetRoutePlan.srv @@ -0,0 +1,14 @@ +# Get a plan to traverse a route network from start to goal. +# +# Similar to nav_msgs/GetPlan, but constrained to use the route network. + +uuid_msgs/UniqueID network # route network to use +uuid_msgs/UniqueID start # starting way point +uuid_msgs/UniqueID goal # goal way point + +--- + +bool success # true if the call succeeded +string status # more details + +RoutePath plan # path to follow diff --git a/sources/ros_msgs/geographic_msgs/srv/UpdateGeographicMap.srv b/sources/ros_msgs/geographic_msgs/srv/UpdateGeographicMap.srv new file mode 100644 index 0000000..f390cd3 --- /dev/null +++ b/sources/ros_msgs/geographic_msgs/srv/UpdateGeographicMap.srv @@ -0,0 +1,9 @@ +# This service updates a geographic map. + +# Changes to geographic map. +GeographicMapChanges updates + +--- + +bool success # true if the call succeeded +string status # more details diff --git a/sources/ros_msgs/uuid_msgs/CHANGELOG.rst b/sources/ros_msgs/uuid_msgs/CHANGELOG.rst new file mode 100644 index 0000000..5763ace --- /dev/null +++ b/sources/ros_msgs/uuid_msgs/CHANGELOG.rst @@ -0,0 +1,43 @@ +Change history +============== + +1.0.6 (2017-04-04) +------------------ + +1.0.5 (2015-04-17) +------------------ + +1.0.4 (2014-04-30) +------------------ + + * add architecture independent tag + +1.0.3 (2013-07-24) +------------------ + +1.0.2 (2013-07-18) +------------------- + +1.0.1 (2013-03-25) +------------------- + + * Hydro release update. + +1.0.0 (2013-03-18) +------------------- + + * Hydro release. + * Convert to catkin (`#1`_). + +0.9.0 (2013-01-03) +------------------ + + * Initial release to Groovy. + +0.8.0 (2012-07-19) +------------------ + + * Initial release to Fuerte. + * Provides uuid_msgs/UniqueID message. + +.. _`#1`: https://github.com/ros-geographic-info/unique_identifier/issues/1 diff --git a/sources/ros_msgs/uuid_msgs/CMakeLists.txt b/sources/ros_msgs/uuid_msgs/CMakeLists.txt new file mode 100644 index 0000000..6d3c5fe --- /dev/null +++ b/sources/ros_msgs/uuid_msgs/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 2.8.3) +project(uuid_msgs) + +find_package(catkin REQUIRED COMPONENTS message_generation std_msgs) +# We want boost/format.hpp, which isn't in its own component. +find_package(Boost REQUIRED) + +add_message_files(DIRECTORY msg FILES UniqueID.msg) +generate_messages(DEPENDENCIES std_msgs) + +catkin_package( + CATKIN_DEPENDS message_runtime std_msgs + DEPENDS Boost) diff --git a/sources/ros_msgs/uuid_msgs/mainpage.dox b/sources/ros_msgs/uuid_msgs/mainpage.dox new file mode 100644 index 0000000..3956384 --- /dev/null +++ b/sources/ros_msgs/uuid_msgs/mainpage.dox @@ -0,0 +1,9 @@ +/** +\mainpage +\htmlinclude manifest.html + +This package contains ROS messages for universally unique identifiers (UUIDs). + +It does not provide any nodes, libraries or scripts. + +*/ diff --git a/sources/ros_msgs/uuid_msgs/msg/UniqueID.msg b/sources/ros_msgs/uuid_msgs/msg/UniqueID.msg new file mode 100644 index 0000000..c77b6a7 --- /dev/null +++ b/sources/ros_msgs/uuid_msgs/msg/UniqueID.msg @@ -0,0 +1,6 @@ +# A universally unique identifier (UUID). +# +# http://en.wikipedia.org/wiki/Universally_unique_identifier +# http://tools.ietf.org/html/rfc4122.html + +uint8[16] uuid diff --git a/sources/ros_msgs/uuid_msgs/package.xml b/sources/ros_msgs/uuid_msgs/package.xml new file mode 100644 index 0000000..85138c0 --- /dev/null +++ b/sources/ros_msgs/uuid_msgs/package.xml @@ -0,0 +1,27 @@ + + + + + uuid_msgs + 1.0.6 + + ROS messages for universally unique identifiers. + + Jack O'Quin + Jack O'Quin + BSD + http://ros.org/wiki/uuid_msgs + + catkin + + message_generation + + std_msgs + + message_runtime + + + + + + diff --git a/tools/ts/msgs/deno.json b/tools/ts/msgs/deno.json index ff52313..d98d823 100644 --- a/tools/ts/msgs/deno.json +++ b/tools/ts/msgs/deno.json @@ -1,6 +1,6 @@ { "name": "@dimos/msgs", - "version": "0.1.4", + "version": "0.1.5", "license": "Apache-2.0", "exports": { ".": "./mod.ts", @@ -8,6 +8,7 @@ "./builtin_interfaces": "./generated/builtin_interfaces/mod.ts", "./diagnostic_msgs": "./generated/diagnostic_msgs/mod.ts", "./foxglove_msgs": "./generated/foxglove_msgs/mod.ts", + "./geographic_msgs": "./generated/geographic_msgs/mod.ts", "./geometry_msgs": "./generated/geometry_msgs/mod.ts", "./nav_msgs": "./generated/nav_msgs/mod.ts", "./sensor_msgs": "./generated/sensor_msgs/mod.ts", @@ -16,6 +17,7 @@ "./stereo_msgs": "./generated/stereo_msgs/mod.ts", "./tf2_msgs": "./generated/tf2_msgs/mod.ts", "./trajectory_msgs": "./generated/trajectory_msgs/mod.ts", + "./uuid_msgs": "./generated/uuid_msgs/mod.ts", "./vision_msgs": "./generated/vision_msgs/mod.ts", "./visualization_msgs": "./generated/visualization_msgs/mod.ts" }, diff --git a/tools/ts/msgs/mod.ts b/tools/ts/msgs/mod.ts index c55532c..9fdc09a 100644 --- a/tools/ts/msgs/mod.ts +++ b/tools/ts/msgs/mod.ts @@ -6,6 +6,7 @@ export * as actionlib_msgs from "./generated/actionlib_msgs/mod.ts"; export * as builtin_interfaces from "./generated/builtin_interfaces/mod.ts"; export * as diagnostic_msgs from "./generated/diagnostic_msgs/mod.ts"; export * as foxglove_msgs from "./generated/foxglove_msgs/mod.ts"; +export * as geographic_msgs from "./generated/geographic_msgs/mod.ts"; export * as geometry_msgs from "./generated/geometry_msgs/mod.ts"; export * as nav_msgs from "./generated/nav_msgs/mod.ts"; export * as sensor_msgs from "./generated/sensor_msgs/mod.ts"; @@ -14,6 +15,7 @@ export * as std_msgs from "./generated/std_msgs/mod.ts"; export * as stereo_msgs from "./generated/stereo_msgs/mod.ts"; export * as tf2_msgs from "./generated/tf2_msgs/mod.ts"; export * as trajectory_msgs from "./generated/trajectory_msgs/mod.ts"; +export * as uuid_msgs from "./generated/uuid_msgs/mod.ts"; export * as vision_msgs from "./generated/vision_msgs/mod.ts"; export * as visualization_msgs from "./generated/visualization_msgs/mod.ts"; @@ -22,6 +24,7 @@ import * as actionlib_msgs from "./generated/actionlib_msgs/mod.ts"; import * as builtin_interfaces from "./generated/builtin_interfaces/mod.ts"; import * as diagnostic_msgs from "./generated/diagnostic_msgs/mod.ts"; import * as foxglove_msgs from "./generated/foxglove_msgs/mod.ts"; +import * as geographic_msgs from "./generated/geographic_msgs/mod.ts"; import * as geometry_msgs from "./generated/geometry_msgs/mod.ts"; import * as nav_msgs from "./generated/nav_msgs/mod.ts"; import * as sensor_msgs from "./generated/sensor_msgs/mod.ts"; @@ -30,6 +33,7 @@ import * as std_msgs from "./generated/std_msgs/mod.ts"; import * as stereo_msgs from "./generated/stereo_msgs/mod.ts"; import * as tf2_msgs from "./generated/tf2_msgs/mod.ts"; import * as trajectory_msgs from "./generated/trajectory_msgs/mod.ts"; +import * as uuid_msgs from "./generated/uuid_msgs/mod.ts"; import * as vision_msgs from "./generated/vision_msgs/mod.ts"; import * as visualization_msgs from "./generated/visualization_msgs/mod.ts"; @@ -58,6 +62,7 @@ _registerPackage(actionlib_msgs); _registerPackage(builtin_interfaces); _registerPackage(diagnostic_msgs); _registerPackage(foxglove_msgs); +_registerPackage(geographic_msgs); _registerPackage(geometry_msgs); _registerPackage(nav_msgs); _registerPackage(sensor_msgs); @@ -66,6 +71,7 @@ _registerPackage(std_msgs); _registerPackage(stereo_msgs); _registerPackage(tf2_msgs); _registerPackage(trajectory_msgs); +_registerPackage(uuid_msgs); _registerPackage(vision_msgs); _registerPackage(visualization_msgs);