diff --git a/CMakeLists.txt b/CMakeLists.txt index e269f81..1fd3b19 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,8 @@ project(common_msgs) set(CMAKE_CXX_STANDARD 17) set(CMAKE_POSITION_INDEPENDENT_CODE ON) +add_subdirectory(utils) + if (NOT TARGET std_msgs) add_subdirectory(std_msgs) endif() diff --git a/geometry_msgs/CMakeLists.txt b/geometry_msgs/CMakeLists.txt index 8b16a01..537ea1e 100644 --- a/geometry_msgs/CMakeLists.txt +++ b/geometry_msgs/CMakeLists.txt @@ -15,7 +15,7 @@ target_include_directories(geometry_msgs ) # Liên kết với std_msgs nếu bạn có file Header.h trong include/std_msgs/ -target_link_libraries(geometry_msgs INTERFACE std_msgs) +target_link_libraries(geometry_msgs INTERFACE std_msgs utils) # --- Cài đặt thư viện vào hệ thống khi chạy make install --- install(TARGETS geometry_msgs diff --git a/geometry_msgs/include/geometry_msgs/Accel.h b/geometry_msgs/include/geometry_msgs/Accel.h index 14242ce..a2916d6 100644 --- a/geometry_msgs/include/geometry_msgs/Accel.h +++ b/geometry_msgs/include/geometry_msgs/Accel.h @@ -23,6 +23,19 @@ struct Accel : linear(linear_), angular(angular_) {} }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::Accel &lhs, const geometry_msgs::Accel &rhs) +{ +return lhs.linear == rhs.linear && + lhs.angular == rhs.angular; +} + +inline bool operator!=(const geometry_msgs::Accel &lhs, const geometry_msgs::Accel &rhs) +{ +return !(lhs == rhs); +} + + } // namespace geometry_msgs #endif // ACCEL_H diff --git a/geometry_msgs/include/geometry_msgs/AccelStamped.h b/geometry_msgs/include/geometry_msgs/AccelStamped.h index 9668177..4425ccb 100644 --- a/geometry_msgs/include/geometry_msgs/AccelStamped.h +++ b/geometry_msgs/include/geometry_msgs/AccelStamped.h @@ -19,6 +19,18 @@ struct AccelStamped AccelStamped() = default; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::AccelStamped &lhs, const geometry_msgs::AccelStamped &rhs) +{ +return lhs.header == rhs.header && + lhs.accel == rhs.accel; +} + +inline bool operator!=(const geometry_msgs::AccelStamped &lhs, const geometry_msgs::AccelStamped &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // ACCEL_STAMPED_H diff --git a/geometry_msgs/include/geometry_msgs/AccelWithCovariance.h b/geometry_msgs/include/geometry_msgs/AccelWithCovariance.h index 430a503..b6e1dfd 100644 --- a/geometry_msgs/include/geometry_msgs/AccelWithCovariance.h +++ b/geometry_msgs/include/geometry_msgs/AccelWithCovariance.h @@ -22,9 +22,27 @@ struct AccelWithCovariance Accel accel; std::array covariance; // Constructor mặc định - AccelWithCovariance() = default; + AccelWithCovariance() : accel(), covariance{{0.0}} {}; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::AccelWithCovariance &lhs, const geometry_msgs::AccelWithCovariance &rhs) +{ + for(size_t i = 0; i < 36; ++i) + { + if (isEqual(lhs.covariance[i], rhs.covariance[i]) == false) + { + return false; + } + } +return lhs.accel == rhs.accel; +} + +inline bool operator!=(const geometry_msgs::AccelWithCovariance &lhs, const geometry_msgs::AccelWithCovariance &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // ACCEL_WITH_COVARIANCE_H diff --git a/geometry_msgs/include/geometry_msgs/AccelWithCovarianceStamped.h b/geometry_msgs/include/geometry_msgs/AccelWithCovarianceStamped.h index f966234..7c11335 100644 --- a/geometry_msgs/include/geometry_msgs/AccelWithCovarianceStamped.h +++ b/geometry_msgs/include/geometry_msgs/AccelWithCovarianceStamped.h @@ -19,6 +19,18 @@ struct AccelWithCovarianceStamped AccelWithCovarianceStamped() = default; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::AccelWithCovarianceStamped &lhs, const geometry_msgs::AccelWithCovarianceStamped &rhs) +{ +return lhs.header == rhs.header && + lhs.accel == rhs.accel; +} + +inline bool operator!=(const geometry_msgs::AccelWithCovarianceStamped &lhs, const geometry_msgs::AccelWithCovarianceStamped &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // ACCEL_WITH_COVARIANCE_STAMPED_H diff --git a/geometry_msgs/include/geometry_msgs/Inertia.h b/geometry_msgs/include/geometry_msgs/Inertia.h index 942f595..1080834 100644 --- a/geometry_msgs/include/geometry_msgs/Inertia.h +++ b/geometry_msgs/include/geometry_msgs/Inertia.h @@ -1,20 +1,3 @@ -// # Mass [kg] -// float64 m - -// # Center of mass [m] -// geometry_msgs/Vector3 com - -// # Inertia Tensor [kg-m^2] -// # | ixx ixy ixz | -// # I = | ixy iyy iyz | -// # | ixz iyz izz | -// float64 ixx -// float64 ixy -// float64 ixz -// float64 iyy -// float64 iyz -// float64 izz - #ifndef INERTIA_H #define INERTIA_H @@ -33,8 +16,46 @@ struct Inertia double iyy; double iyz; double izz; + + Inertia() : + m(0.0), + com(), + ixx(0.0), + ixy(0.0), + ixz(0.0), + iyy(0.0), + iyz(0.0), + izz(0.0) {}; + Inertia(double m_, Vector3 com_, double ixx_, double ixy_, double ixz_, + double iyy_, double iyz_, double izz_) : + m(m_), + com(com_), + ixx(ixx_), + ixy(ixy_), + ixz(ixz_), + iyy(iyy_), + iyz(iyz_), + izz(izz_) {}; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::Inertia &lhs, const geometry_msgs::Inertia &rhs) +{ +return isEqual(lhs.m, rhs.m) && + lhs.com == rhs.com && + isEqual(lhs.ixx, rhs.ixx) && + isEqual(lhs.ixy, rhs.ixy) && + isEqual(lhs.ixz, rhs.ixz) && + isEqual(lhs.iyy, rhs.iyy) && + isEqual(lhs.iyz, rhs.iyz) && + isEqual(lhs.izz, rhs.izz); +} + +inline bool operator!=(const geometry_msgs::Inertia &lhs, const geometry_msgs::Inertia &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // INERTIA_H diff --git a/geometry_msgs/include/geometry_msgs/InertiaStamped.h b/geometry_msgs/include/geometry_msgs/InertiaStamped.h index bd92fe0..ccf55ab 100644 --- a/geometry_msgs/include/geometry_msgs/InertiaStamped.h +++ b/geometry_msgs/include/geometry_msgs/InertiaStamped.h @@ -18,6 +18,18 @@ struct InertiaStamped InertiaStamped() = default; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::InertiaStamped &lhs, const geometry_msgs::InertiaStamped &rhs) +{ +return lhs.header == rhs.header && + lhs.inertia == rhs.inertia; +} + +inline bool operator!=(const geometry_msgs::InertiaStamped &lhs, const geometry_msgs::InertiaStamped &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // INERTIA_STAMPED_H \ No newline at end of file diff --git a/geometry_msgs/include/geometry_msgs/Point.h b/geometry_msgs/include/geometry_msgs/Point.h index 3088843..926a609 100644 --- a/geometry_msgs/include/geometry_msgs/Point.h +++ b/geometry_msgs/include/geometry_msgs/Point.h @@ -3,6 +3,7 @@ #include #include +#include "utils.h" namespace geometry_msgs { @@ -21,6 +22,20 @@ struct Point : x(x_), y(y_), z(z_) {} }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::Point &lhs, const geometry_msgs::Point &rhs) +{ +return isEqual(lhs.x, rhs.x) && + isEqual(lhs.y, rhs.y) && + isEqual(lhs.z, rhs.z); +} + +inline bool operator!=(const geometry_msgs::Point &lhs, const geometry_msgs::Point &rhs) +{ +return !(lhs == rhs); +} + + } // namespace geometry_msgs #endif // POINT_H \ No newline at end of file diff --git a/geometry_msgs/include/geometry_msgs/Point32.h b/geometry_msgs/include/geometry_msgs/Point32.h index 12d8ae4..2a9d0a9 100644 --- a/geometry_msgs/include/geometry_msgs/Point32.h +++ b/geometry_msgs/include/geometry_msgs/Point32.h @@ -1,6 +1,8 @@ #ifndef POINT_32_H #define POINT_32_H +#include "utils.h" + namespace geometry_msgs { struct Point32 @@ -8,7 +10,25 @@ struct Point32 float x; float y; float z; + + Point32() : x(0.0f), y(0.0f), z(0.0f) {} + Point32(float x_, float y_, float z_) + : x(x_), y(y_), z(z_) {} }; + +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::Point32 &lhs, const geometry_msgs::Point32 &rhs) +{ +return isEqual(lhs.x, rhs.x) && + isEqual(lhs.y, rhs.y) && + isEqual(lhs.z, rhs.z); +} + +inline bool operator!=(const geometry_msgs::Point32 &lhs, const geometry_msgs::Point32 &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif //POINT_32_H \ No newline at end of file diff --git a/geometry_msgs/include/geometry_msgs/PointStamped.h b/geometry_msgs/include/geometry_msgs/PointStamped.h index cece302..a7585e2 100644 --- a/geometry_msgs/include/geometry_msgs/PointStamped.h +++ b/geometry_msgs/include/geometry_msgs/PointStamped.h @@ -16,6 +16,19 @@ struct PointStamped PointStamped() = default; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::PointStamped &lhs, const geometry_msgs::PointStamped &rhs) +{ +return lhs.header == rhs.header && + lhs.point == rhs.point; +} + +inline bool operator!=(const geometry_msgs::PointStamped &lhs, const geometry_msgs::PointStamped &rhs) +{ +return !(lhs == rhs); +} + + } // namespace geometry_msgs #endif //POINT_STAMPED_H \ No newline at end of file diff --git a/geometry_msgs/include/geometry_msgs/Polygon.h b/geometry_msgs/include/geometry_msgs/Polygon.h index fbf0209..2dbebe6 100644 --- a/geometry_msgs/include/geometry_msgs/Polygon.h +++ b/geometry_msgs/include/geometry_msgs/Polygon.h @@ -11,6 +11,23 @@ struct Polygon std::vector points; }; +inline bool operator==(const geometry_msgs::Polygon &lhs, const geometry_msgs::Polygon &rhs) +{ + if(lhs.points.size() != rhs.points.size()) + return false; + for(int i = 0; i < lhs.points.size(); i++) + { + if(!(lhs.points[i] == rhs.points[i])) + return false; + } + return true; +} + +inline bool operator!=(const geometry_msgs::Polygon &lhs, const geometry_msgs::Polygon &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif //POLYGON_H diff --git a/geometry_msgs/include/geometry_msgs/PolygonStamped.h b/geometry_msgs/include/geometry_msgs/PolygonStamped.h index 41a58f0..3c409d2 100644 --- a/geometry_msgs/include/geometry_msgs/PolygonStamped.h +++ b/geometry_msgs/include/geometry_msgs/PolygonStamped.h @@ -16,6 +16,17 @@ struct PolygonStamped Polygon polygon; }; +inline bool operator==(const geometry_msgs::PolygonStamped &lhs, const geometry_msgs::PolygonStamped &rhs) +{ + return lhs.header == rhs.header && + lhs.polygon == rhs.polygon; +} + +inline bool operator!=(const geometry_msgs::PolygonStamped &lhs, const geometry_msgs::PolygonStamped &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif //POLYGON_STAMPED_H diff --git a/geometry_msgs/include/geometry_msgs/Pose.h b/geometry_msgs/include/geometry_msgs/Pose.h index 1371f53..7ae7366 100644 --- a/geometry_msgs/include/geometry_msgs/Pose.h +++ b/geometry_msgs/include/geometry_msgs/Pose.h @@ -15,8 +15,23 @@ struct Pose Quaternion orientation; Pose() = default; + + Pose(Point position_, Quaternion orientation_) + : position(position_), orientation(orientation_) {}; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::Pose &lhs, const geometry_msgs::Pose &rhs) +{ +return lhs.position == rhs.position && + lhs.orientation == rhs.orientation; +} + +inline bool operator!=(const geometry_msgs::Pose &lhs, const geometry_msgs::Pose &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // POSE_H \ No newline at end of file diff --git a/geometry_msgs/include/geometry_msgs/Pose2D.h b/geometry_msgs/include/geometry_msgs/Pose2D.h index df79b90..86fc11c 100644 --- a/geometry_msgs/include/geometry_msgs/Pose2D.h +++ b/geometry_msgs/include/geometry_msgs/Pose2D.h @@ -15,6 +15,8 @@ #ifndef POSE2D_H #define POSE2D_H +#include "utils.h" + namespace geometry_msgs { @@ -23,8 +25,25 @@ struct Pose2D double x; double y; double theta; + + Pose2D() : x(0.0), y(0.0), theta(0.0) {} + Pose2D(double x_, double y_, double theta_) + : x(x_), y(y_), theta(theta_) {} }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::Pose2D &lhs, const geometry_msgs::Pose2D &rhs) +{ +return isEqual(lhs.x, rhs.x) && + isEqual(lhs.y, rhs.y) && + isEqual(lhs.theta, rhs.theta); +} + +inline bool operator!=(const geometry_msgs::Pose2D &lhs, const geometry_msgs::Pose2D &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // POSE2D_H diff --git a/geometry_msgs/include/geometry_msgs/PoseArray.h b/geometry_msgs/include/geometry_msgs/PoseArray.h index 0058ce8..0eea5fd 100644 --- a/geometry_msgs/include/geometry_msgs/PoseArray.h +++ b/geometry_msgs/include/geometry_msgs/PoseArray.h @@ -23,6 +23,24 @@ struct PoseArray PoseArray() = default; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::PoseArray &lhs, const geometry_msgs::PoseArray &rhs) +{ + if(lhs.poses.size() != rhs.poses.size()) + return false; + for(int i = 0; i < lhs.poses.size(); i++) + { + if(!(lhs.poses[i] == rhs.poses[i])) + return false; + } +return lhs.header == rhs.header; +} + +inline bool operator!=(const geometry_msgs::PoseArray &lhs, const geometry_msgs::PoseArray &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // POSE_ARRAY_H \ No newline at end of file diff --git a/geometry_msgs/include/geometry_msgs/PoseStamped.h b/geometry_msgs/include/geometry_msgs/PoseStamped.h index ec781d2..a7923b0 100644 --- a/geometry_msgs/include/geometry_msgs/PoseStamped.h +++ b/geometry_msgs/include/geometry_msgs/PoseStamped.h @@ -20,6 +20,18 @@ struct PoseStamped PoseStamped() = default; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::PoseStamped &lhs, const geometry_msgs::PoseStamped &rhs) +{ +return lhs.header == rhs.header && + lhs.pose == rhs.pose; +} + +inline bool operator!=(const geometry_msgs::PoseStamped &lhs, const geometry_msgs::PoseStamped &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // POSE_STAMPED_H \ No newline at end of file diff --git a/geometry_msgs/include/geometry_msgs/PoseWithCovariance.h b/geometry_msgs/include/geometry_msgs/PoseWithCovariance.h index 4fe3f06..709aa16 100644 --- a/geometry_msgs/include/geometry_msgs/PoseWithCovariance.h +++ b/geometry_msgs/include/geometry_msgs/PoseWithCovariance.h @@ -23,9 +23,27 @@ struct PoseWithCovariance Pose pose; std::array covariance; - PoseWithCovariance() = default; + PoseWithCovariance() : pose(), covariance{{0.0}} {}; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::PoseWithCovariance &lhs, const geometry_msgs::PoseWithCovariance &rhs) +{ + for(size_t i = 0; i < 36; ++i) + { + if (isEqual(lhs.covariance[i], rhs.covariance[i]) == false) + { + return false; + } + } +return lhs.pose == rhs.pose; +} + +inline bool operator!=(const geometry_msgs::PoseWithCovariance &lhs, const geometry_msgs::PoseWithCovariance &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // POSE_WITH_COVARIANCE_H \ No newline at end of file diff --git a/geometry_msgs/include/geometry_msgs/PoseWithCovarianceStamped.h b/geometry_msgs/include/geometry_msgs/PoseWithCovarianceStamped.h index ee20a14..29476fc 100644 --- a/geometry_msgs/include/geometry_msgs/PoseWithCovarianceStamped.h +++ b/geometry_msgs/include/geometry_msgs/PoseWithCovarianceStamped.h @@ -22,6 +22,19 @@ struct PoseWithCovarianceStamped PoseWithCovarianceStamped() = default; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::PoseWithCovarianceStamped &lhs, const geometry_msgs::PoseWithCovarianceStamped &rhs) +{ +return lhs.header == rhs.header && + lhs.pose == rhs.pose; +} + +inline bool operator!=(const geometry_msgs::PoseWithCovarianceStamped &lhs, const geometry_msgs::PoseWithCovarianceStamped &rhs) +{ +return !(lhs == rhs); +} + + } // namespace geometry_msgs #endif // POSE_WITH_COVARIANCE_STAMPED_H diff --git a/geometry_msgs/include/geometry_msgs/Quaternion.h b/geometry_msgs/include/geometry_msgs/Quaternion.h index 9c981e1..2a24b96 100644 --- a/geometry_msgs/include/geometry_msgs/Quaternion.h +++ b/geometry_msgs/include/geometry_msgs/Quaternion.h @@ -1,6 +1,8 @@ #ifndef QUATERNION_H #define QUATERNION_H +#include "utils.h" + namespace geometry_msgs { @@ -19,6 +21,20 @@ struct Quaternion : x(x_), y(y_), z(z_), w(w_) {} }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::Quaternion &lhs, const geometry_msgs::Quaternion &rhs) +{ +return isEqual(lhs.x, rhs.x) && + isEqual(lhs.y, rhs.y) && + isEqual(lhs.z, rhs.z) && + isEqual(lhs.w, rhs.w); +} + +inline bool operator!=(const geometry_msgs::Quaternion &lhs, const geometry_msgs::Quaternion &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // QUATERNION_H \ No newline at end of file diff --git a/geometry_msgs/include/geometry_msgs/QuaternionStamped.h b/geometry_msgs/include/geometry_msgs/QuaternionStamped.h index 4f9228f..78c1eb7 100644 --- a/geometry_msgs/include/geometry_msgs/QuaternionStamped.h +++ b/geometry_msgs/include/geometry_msgs/QuaternionStamped.h @@ -20,6 +20,18 @@ struct QuaternionStamped QuaternionStamped() = default; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::QuaternionStamped &lhs, const geometry_msgs::QuaternionStamped &rhs) +{ +return lhs.header == rhs.header && + lhs.quaternion == rhs.quaternion; +} + +inline bool operator!=(const geometry_msgs::QuaternionStamped &lhs, const geometry_msgs::QuaternionStamped &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // QUATERNION_STAMPED_H diff --git a/geometry_msgs/include/geometry_msgs/Transform.h b/geometry_msgs/include/geometry_msgs/Transform.h index 9dd7c63..7776c17 100644 --- a/geometry_msgs/include/geometry_msgs/Transform.h +++ b/geometry_msgs/include/geometry_msgs/Transform.h @@ -11,8 +11,25 @@ struct Transform { Vector3 translation; Quaternion rotation; + + Transform() = default; + Transform(Vector3 translation_, Quaternion rotation_) + : translation(translation_), rotation(rotation_) {} }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::Transform &lhs, const geometry_msgs::Transform &rhs) +{ +return lhs.translation == rhs.translation && + lhs.rotation == rhs.rotation; +} + +inline bool operator!=(const geometry_msgs::Transform &lhs, const geometry_msgs::Transform &rhs) +{ +return !(lhs == rhs); +} + + } // namespace geometry_msgs #endif // TRANSFORM_H \ No newline at end of file diff --git a/geometry_msgs/include/geometry_msgs/TransformStamped.h b/geometry_msgs/include/geometry_msgs/TransformStamped.h index ebc26c9..f91fadf 100644 --- a/geometry_msgs/include/geometry_msgs/TransformStamped.h +++ b/geometry_msgs/include/geometry_msgs/TransformStamped.h @@ -15,6 +15,19 @@ struct TransformStamped Transform transform; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::TransformStamped &lhs, const geometry_msgs::TransformStamped &rhs) +{ +return lhs.header == rhs.header && + lhs.child_frame_id == rhs.child_frame_id && + lhs.transform == rhs.transform; +} + +inline bool operator!=(const geometry_msgs::TransformStamped &lhs, const geometry_msgs::TransformStamped &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // TRANSFORM_STAMPED_H \ No newline at end of file diff --git a/geometry_msgs/include/geometry_msgs/Twist.h b/geometry_msgs/include/geometry_msgs/Twist.h index 358a85e..b3af9ff 100644 --- a/geometry_msgs/include/geometry_msgs/Twist.h +++ b/geometry_msgs/include/geometry_msgs/Twist.h @@ -23,6 +23,18 @@ struct Twist : linear(linear_), angular(angular_) {} }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::Twist &lhs, const geometry_msgs::Twist &rhs) +{ +return lhs.linear == rhs.linear && + lhs.angular == rhs.angular; +} + +inline bool operator!=(const geometry_msgs::Twist &lhs, const geometry_msgs::Twist &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // ACCEL_H \ No newline at end of file diff --git a/geometry_msgs/include/geometry_msgs/TwistStamped.h b/geometry_msgs/include/geometry_msgs/TwistStamped.h index 94f0019..8584c68 100644 --- a/geometry_msgs/include/geometry_msgs/TwistStamped.h +++ b/geometry_msgs/include/geometry_msgs/TwistStamped.h @@ -19,6 +19,18 @@ struct TwistStamped TwistStamped() = default; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::TwistStamped &lhs, const geometry_msgs::TwistStamped &rhs) +{ +return lhs.header == rhs.header && + lhs.twist == rhs.twist; +} + +inline bool operator!=(const geometry_msgs::TwistStamped &lhs, const geometry_msgs::TwistStamped &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // TWIST_STAMPED_H diff --git a/geometry_msgs/include/geometry_msgs/TwistWithCovariance.h b/geometry_msgs/include/geometry_msgs/TwistWithCovariance.h index ea52ac1..621861d 100644 --- a/geometry_msgs/include/geometry_msgs/TwistWithCovariance.h +++ b/geometry_msgs/include/geometry_msgs/TwistWithCovariance.h @@ -23,9 +23,28 @@ struct TwistWithCovariance Twist twist; std::array covariance; - TwistWithCovariance() = default; + TwistWithCovariance() : twist(), covariance{{0.0}} {}; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::TwistWithCovariance &lhs, const geometry_msgs::TwistWithCovariance &rhs) +{ + for(size_t i = 0; i < 36; ++i) + { + if (isEqual(lhs.covariance[i], rhs.covariance[i]) == false) + { + return false; + } + } +return lhs.twist == rhs.twist; +} + +inline bool operator!=(const geometry_msgs::TwistWithCovariance &lhs, const geometry_msgs::TwistWithCovariance &rhs) +{ +return !(lhs == rhs); +} + + } // namespace geometry_msgs #endif // TWIST_WITH_COVARIANCE_H diff --git a/geometry_msgs/include/geometry_msgs/TwistWithCovarianceStamped.h b/geometry_msgs/include/geometry_msgs/TwistWithCovarianceStamped.h index 608fbbb..3704631 100644 --- a/geometry_msgs/include/geometry_msgs/TwistWithCovarianceStamped.h +++ b/geometry_msgs/include/geometry_msgs/TwistWithCovarianceStamped.h @@ -6,7 +6,7 @@ #define TWIST_WITH_COVARIANCE_STAMPED_H #include -#include +#include @@ -21,6 +21,18 @@ struct TwistWithCovarianceStamped TwistWithCovarianceStamped() = default; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::TwistWithCovarianceStamped &lhs, const geometry_msgs::TwistWithCovarianceStamped &rhs) +{ +return lhs.header == rhs.header && + lhs.twist == rhs.twist; +} + +inline bool operator!=(const geometry_msgs::TwistWithCovarianceStamped &lhs, const geometry_msgs::TwistWithCovarianceStamped &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // TWIST_WITH_COVARIANCE_STAMPED_H \ No newline at end of file diff --git a/geometry_msgs/include/geometry_msgs/Vector3.h b/geometry_msgs/include/geometry_msgs/Vector3.h index df95c81..e9d2897 100644 --- a/geometry_msgs/include/geometry_msgs/Vector3.h +++ b/geometry_msgs/include/geometry_msgs/Vector3.h @@ -1,6 +1,8 @@ #ifndef VECTOR_3_H #define VECTOR_3_H +#include "utils.h" + namespace geometry_msgs { @@ -18,6 +20,20 @@ struct Vector3 : x(x_), y(y_), z(z_) {} }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::Vector3 &lhs, const geometry_msgs::Vector3 &rhs) +{ +return isEqual(lhs.x, rhs.x) && + isEqual(lhs.y, rhs.y) && + isEqual(lhs.z, rhs.z); +} + +inline bool operator!=(const geometry_msgs::Vector3 &lhs, const geometry_msgs::Vector3 &rhs) +{ +return !(lhs == rhs); +} + + } // namespace geometry_msgs #endif // VECTOR_3_H \ No newline at end of file diff --git a/geometry_msgs/include/geometry_msgs/Vector3Stamped.h b/geometry_msgs/include/geometry_msgs/Vector3Stamped.h index 2a8f819..dc3024e 100644 --- a/geometry_msgs/include/geometry_msgs/Vector3Stamped.h +++ b/geometry_msgs/include/geometry_msgs/Vector3Stamped.h @@ -19,6 +19,19 @@ struct Vector3Stamped Vector3Stamped() = default; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::Vector3Stamped &lhs, const geometry_msgs::Vector3Stamped &rhs) +{ +return lhs.header == rhs.header && + lhs.vector == rhs.vector; +} + +inline bool operator!=(const geometry_msgs::Vector3Stamped &lhs, const geometry_msgs::Vector3Stamped &rhs) +{ +return !(lhs == rhs); +} + + } // namespace geometry_msgs #endif // VECTOR_3_STAMPED_H diff --git a/geometry_msgs/include/geometry_msgs/Wrench.h b/geometry_msgs/include/geometry_msgs/Wrench.h index 62ea6cd..c0f9d75 100644 --- a/geometry_msgs/include/geometry_msgs/Wrench.h +++ b/geometry_msgs/include/geometry_msgs/Wrench.h @@ -17,8 +17,22 @@ struct Wrench Vector3 torque; // Constructor mặc định Wrench() = default; + + Wrench(Vector3 force_, Vector3 torque_) : force(force_), torque(torque_) {}; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::Wrench &lhs, const geometry_msgs::Wrench &rhs) +{ +return lhs.force == rhs.force && + lhs.torque == rhs.torque; +} + +inline bool operator!=(const geometry_msgs::Wrench &lhs, const geometry_msgs::Wrench &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // WRENCH_H diff --git a/geometry_msgs/include/geometry_msgs/WrenchStamped.h b/geometry_msgs/include/geometry_msgs/WrenchStamped.h index bd9eb27..09a7796 100644 --- a/geometry_msgs/include/geometry_msgs/WrenchStamped.h +++ b/geometry_msgs/include/geometry_msgs/WrenchStamped.h @@ -19,6 +19,18 @@ struct WrenchStamped WrenchStamped() = default; }; +// constants requiring out of line definition +inline bool operator==(const geometry_msgs::WrenchStamped &lhs, const geometry_msgs::WrenchStamped &rhs) +{ +return lhs.header == rhs.header && + lhs.wrench == rhs.wrench; +} + +inline bool operator!=(const geometry_msgs::WrenchStamped &lhs, const geometry_msgs::WrenchStamped &rhs) +{ +return !(lhs == rhs); +} + } // namespace geometry_msgs #endif // WRENCH_STAMPED_H diff --git a/map_msgs/include/map_msgs/OccupancyGridUpdate.h b/map_msgs/include/map_msgs/OccupancyGridUpdate.h index 8cbf6bc..9718e45 100644 --- a/map_msgs/include/map_msgs/OccupancyGridUpdate.h +++ b/map_msgs/include/map_msgs/OccupancyGridUpdate.h @@ -8,12 +8,28 @@ namespace map_msgs struct OccupancyGridUpdate { std_msgs::Header header; // Thời gian và frame của bản đồ cập nhật - int32_t x = 0; // Tọa độ x của góc trên bên trái của vùng cập nhật trong bản đồ - int32_t y = 0; // Tọa độ y của góc trên bên trái của vùng cập nhật trong bản đồ - uint32_t width = 0; // Chiều rộng của vùng cập nhật - uint32_t height = 0; // Chiều cao của vùng cập nhật + int32_t x; // Tọa độ x của góc trên bên trái của vùng cập nhật trong bản đồ + int32_t y; // Tọa độ y của góc trên bên trái của vùng cập nhật trong bản đồ + uint32_t width; // Chiều rộng của vùng cập nhật + uint32_t height; // Chiều cao của vùng cập nhật std::vector data; // Dữ liệu cập nhật của vùng (giá trị từ -1 đến 100, trong đó -1 là không biết, 0 là không có chướng ngại vật, và 100 là chướng ngại vật chắc chắn OccupancyGridUpdate() = default; }; + +inline bool operator==(const map_msgs::OccupancyGridUpdate & lhs, const map_msgs::OccupancyGridUpdate & rhs) +{ + return lhs.header == rhs.header && + lhs.x == rhs.x && + lhs.y == rhs.y && + lhs.width == rhs.width && + lhs.height == rhs.height && + lhs.data == rhs.data; +} + + +inline bool operator!=(const map_msgs::OccupancyGridUpdate & lhs, const map_msgs::OccupancyGridUpdate & rhs) +{ + return !(lhs == rhs); +} } // namespace map_msgs #endif \ No newline at end of file diff --git a/nav_msgs/include/nav_msgs/GetMap.h b/nav_msgs/include/nav_msgs/GetMap.h new file mode 100644 index 0000000..55b14ac --- /dev/null +++ b/nav_msgs/include/nav_msgs/GetMap.h @@ -0,0 +1,27 @@ +// Generated by gencpp from file nav_msgs/GetMap.msg +// DO NOT EDIT! + +#ifndef NAV_MSGS_MESSAGE_GETMAP_H +#define NAV_MSGS_MESSAGE_GETMAP_H + +#include +#include + +namespace nav_msgs +{ + + struct GetMap + { + + typedef GetMapRequest Request; + typedef GetMapResponse Response; + Request request; + Response response; + + typedef Request RequestType; + typedef Response ResponseType; + + }; // struct GetMap +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_GETMAP_H diff --git a/nav_msgs/include/nav_msgs/GetMapAction.h b/nav_msgs/include/nav_msgs/GetMapAction.h new file mode 100644 index 0000000..afe57ca --- /dev/null +++ b/nav_msgs/include/nav_msgs/GetMapAction.h @@ -0,0 +1,70 @@ +// Generated by gencpp from file nav_msgs/GetMapAction.msg +// DO NOT EDIT! + +#ifndef NAV_MSGS_MESSAGE_GETMAPACTION_H +#define NAV_MSGS_MESSAGE_GETMAPACTION_H + +#include +#include +#include +#include + +#include +#include +#include + +namespace nav_msgs +{ + template + struct GetMapAction_ + { + typedef GetMapAction_ Type; + + GetMapAction_() + : action_goal(), action_result(), action_feedback() + { + } + GetMapAction_(const ContainerAllocator &_alloc) + : action_goal(_alloc), action_result(_alloc), action_feedback(_alloc) + { + (void)_alloc; + } + + typedef ::nav_msgs::GetMapActionGoal_ _action_goal_type; + _action_goal_type action_goal; + + typedef ::nav_msgs::GetMapActionResult_ _action_result_type; + _action_result_type action_result; + + typedef ::nav_msgs::GetMapActionFeedback_ _action_feedback_type; + _action_feedback_type action_feedback; + + typedef boost::shared_ptr<::nav_msgs::GetMapAction_> Ptr; + typedef boost::shared_ptr<::nav_msgs::GetMapAction_ const> ConstPtr; + + }; // struct GetMapAction_ + + typedef ::nav_msgs::GetMapAction_> GetMapAction; + + typedef boost::shared_ptr<::nav_msgs::GetMapAction> GetMapActionPtr; + typedef boost::shared_ptr<::nav_msgs::GetMapAction const> GetMapActionConstPtr; + + // constants requiring out of line definition + + template + bool operator==(const ::nav_msgs::GetMapAction_ &lhs, const ::nav_msgs::GetMapAction_ &rhs) + { + return lhs.action_goal == rhs.action_goal && + lhs.action_result == rhs.action_result && + lhs.action_feedback == rhs.action_feedback; + } + + template + bool operator!=(const ::nav_msgs::GetMapAction_ &lhs, const ::nav_msgs::GetMapAction_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_GETMAPACTION_H diff --git a/nav_msgs/include/nav_msgs/GetMapActionFeedback.h b/nav_msgs/include/nav_msgs/GetMapActionFeedback.h new file mode 100644 index 0000000..16fcbe3 --- /dev/null +++ b/nav_msgs/include/nav_msgs/GetMapActionFeedback.h @@ -0,0 +1,77 @@ +// Generated by gencpp from file nav_msgs/GetMapActionFeedback.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_GETMAPACTIONFEEDBACK_H +#define NAV_MSGS_MESSAGE_GETMAPACTIONFEEDBACK_H + + +#include +#include +#include +#include + +#include +#include +#include + +namespace nav_msgs +{ +template +struct GetMapActionFeedback_ +{ + typedef GetMapActionFeedback_ Type; + + GetMapActionFeedback_() + : header() + , status() + , feedback() { + } + GetMapActionFeedback_(const ContainerAllocator& _alloc) + : header(_alloc) + , status(_alloc) + , feedback(_alloc) { + (void)_alloc; + } + + + + typedef ::std_msgs::Header _header_type; + _header_type header; + + typedef ::actionlib_msgs::GoalStatus_ _status_type; + _status_type status; + + typedef ::nav_msgs::GetMapFeedback_ _feedback_type; + _feedback_type feedback; + + + + + typedef boost::shared_ptr< ::nav_msgs::GetMapActionFeedback_ > Ptr; + typedef boost::shared_ptr< ::nav_msgs::GetMapActionFeedback_ const> ConstPtr; + +}; // struct GetMapActionFeedback_ + +typedef ::nav_msgs::GetMapActionFeedback_ > GetMapActionFeedback; + +typedef boost::shared_ptr< ::nav_msgs::GetMapActionFeedback > GetMapActionFeedbackPtr; +typedef boost::shared_ptr< ::nav_msgs::GetMapActionFeedback const> GetMapActionFeedbackConstPtr; + +template +bool operator==(const ::nav_msgs::GetMapActionFeedback_ & lhs, const ::nav_msgs::GetMapActionFeedback_ & rhs) +{ + return lhs.header == rhs.header && + lhs.status == rhs.status && + lhs.feedback == rhs.feedback; +} + +template +bool operator!=(const ::nav_msgs::GetMapActionFeedback_ & lhs, const ::nav_msgs::GetMapActionFeedback_ & rhs) +{ + return !(lhs == rhs); +} + +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_GETMAPACTIONFEEDBACK_H diff --git a/nav_msgs/include/nav_msgs/GetMapActionGoal.h b/nav_msgs/include/nav_msgs/GetMapActionGoal.h new file mode 100644 index 0000000..f7b5883 --- /dev/null +++ b/nav_msgs/include/nav_msgs/GetMapActionGoal.h @@ -0,0 +1,77 @@ +// Generated by gencpp from file nav_msgs/GetMapActionGoal.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_GETMAPACTIONGOAL_H +#define NAV_MSGS_MESSAGE_GETMAPACTIONGOAL_H + + +#include +#include +#include +#include + +#include +#include +#include + +namespace nav_msgs +{ +template +struct GetMapActionGoal_ +{ + typedef GetMapActionGoal_ Type; + + GetMapActionGoal_() + : header() + , goal_id() + , goal() { + } + GetMapActionGoal_(const ContainerAllocator& _alloc) + : header(_alloc) + , goal_id(_alloc) + , goal(_alloc) { + (void)_alloc; + } + + + + typedef ::std_msgs::Header _header_type; + _header_type header; + + typedef ::actionlib_msgs::GoalID_ _goal_id_type; + _goal_id_type goal_id; + + typedef ::nav_msgs::GetMapGoal_ _goal_type; + _goal_type goal; + + + + + typedef boost::shared_ptr< ::nav_msgs::GetMapActionGoal_ > Ptr; + typedef boost::shared_ptr< ::nav_msgs::GetMapActionGoal_ const> ConstPtr; + +}; // struct GetMapActionGoal_ + +typedef ::nav_msgs::GetMapActionGoal_ > GetMapActionGoal; + +typedef boost::shared_ptr< ::nav_msgs::GetMapActionGoal > GetMapActionGoalPtr; +typedef boost::shared_ptr< ::nav_msgs::GetMapActionGoal const> GetMapActionGoalConstPtr; + +template +bool operator==(const ::nav_msgs::GetMapActionGoal_ & lhs, const ::nav_msgs::GetMapActionGoal_ & rhs) +{ + return lhs.header == rhs.header && + lhs.goal_id == rhs.goal_id && + lhs.goal == rhs.goal; +} + +template +bool operator!=(const ::nav_msgs::GetMapActionGoal_ & lhs, const ::nav_msgs::GetMapActionGoal_ & rhs) +{ + return !(lhs == rhs); +} + +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_GETMAPACTIONGOAL_H diff --git a/nav_msgs/include/nav_msgs/GetMapActionResult.h b/nav_msgs/include/nav_msgs/GetMapActionResult.h new file mode 100644 index 0000000..8c791e7 --- /dev/null +++ b/nav_msgs/include/nav_msgs/GetMapActionResult.h @@ -0,0 +1,77 @@ +// Generated by gencpp from file nav_msgs/GetMapActionResult.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_GETMAPACTIONRESULT_H +#define NAV_MSGS_MESSAGE_GETMAPACTIONRESULT_H + + +#include +#include +#include +#include + +#include +#include +#include + +namespace nav_msgs +{ +template +struct GetMapActionResult_ +{ + typedef GetMapActionResult_ Type; + + GetMapActionResult_() + : header() + , status() + , result() { + } + GetMapActionResult_(const ContainerAllocator& _alloc) + : header(_alloc) + , status(_alloc) + , result(_alloc) { + (void)_alloc; + } + + + + typedef ::std_msgs::Header _header_type; + _header_type header; + + typedef ::actionlib_msgs::GoalStatus_ _status_type; + _status_type status; + + typedef ::nav_msgs::GetMapResult_ _result_type; + _result_type result; + + + + + typedef boost::shared_ptr< ::nav_msgs::GetMapActionResult_ > Ptr; + typedef boost::shared_ptr< ::nav_msgs::GetMapActionResult_ const> ConstPtr; + +}; // struct GetMapActionResult_ + +typedef ::nav_msgs::GetMapActionResult_ > GetMapActionResult; + +typedef boost::shared_ptr< ::nav_msgs::GetMapActionResult > GetMapActionResultPtr; +typedef boost::shared_ptr< ::nav_msgs::GetMapActionResult const> GetMapActionResultConstPtr; + +template +bool operator==(const ::nav_msgs::GetMapActionResult_ & lhs, const ::nav_msgs::GetMapActionResult_ & rhs) +{ + return lhs.header == rhs.header && + lhs.status == rhs.status && + lhs.result == rhs.result; +} + +template +bool operator!=(const ::nav_msgs::GetMapActionResult_ & lhs, const ::nav_msgs::GetMapActionResult_ & rhs) +{ + return !(lhs == rhs); +} + +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_GETMAPACTIONRESULT_H diff --git a/nav_msgs/include/nav_msgs/GetMapFeedback.h b/nav_msgs/include/nav_msgs/GetMapFeedback.h new file mode 100644 index 0000000..fb89b8a --- /dev/null +++ b/nav_msgs/include/nav_msgs/GetMapFeedback.h @@ -0,0 +1,45 @@ +// Generated by gencpp from file nav_msgs/GetMapFeedback.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_GETMAPFEEDBACK_H +#define NAV_MSGS_MESSAGE_GETMAPFEEDBACK_H + + +#include +#include +#include +#include + + +namespace nav_msgs +{ +template +struct GetMapFeedback_ +{ + typedef GetMapFeedback_ Type; + + GetMapFeedback_() + { + } + GetMapFeedback_(const ContainerAllocator& _alloc) + { + (void)_alloc; + } + + + + + typedef boost::shared_ptr< ::nav_msgs::GetMapFeedback_ > Ptr; + typedef boost::shared_ptr< ::nav_msgs::GetMapFeedback_ const> ConstPtr; + +}; // struct GetMapFeedback_ + +typedef ::nav_msgs::GetMapFeedback_ > GetMapFeedback; + +typedef boost::shared_ptr< ::nav_msgs::GetMapFeedback > GetMapFeedbackPtr; +typedef boost::shared_ptr< ::nav_msgs::GetMapFeedback const> GetMapFeedbackConstPtr; + +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_GETMAPFEEDBACK_H diff --git a/nav_msgs/include/nav_msgs/GetMapGoal.h b/nav_msgs/include/nav_msgs/GetMapGoal.h new file mode 100644 index 0000000..58930d5 --- /dev/null +++ b/nav_msgs/include/nav_msgs/GetMapGoal.h @@ -0,0 +1,45 @@ +// Generated by gencpp from file nav_msgs/GetMapGoal.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_GETMAPGOAL_H +#define NAV_MSGS_MESSAGE_GETMAPGOAL_H + + +#include +#include +#include +#include + + +namespace nav_msgs +{ +template +struct GetMapGoal_ +{ + typedef GetMapGoal_ Type; + + GetMapGoal_() + { + } + GetMapGoal_(const ContainerAllocator& _alloc) + { + (void)_alloc; + } + + + + + typedef boost::shared_ptr< ::nav_msgs::GetMapGoal_ > Ptr; + typedef boost::shared_ptr< ::nav_msgs::GetMapGoal_ const> ConstPtr; + +}; // struct GetMapGoal_ + +typedef ::nav_msgs::GetMapGoal_ > GetMapGoal; + +typedef boost::shared_ptr< ::nav_msgs::GetMapGoal > GetMapGoalPtr; +typedef boost::shared_ptr< ::nav_msgs::GetMapGoal const> GetMapGoalConstPtr; + +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_GETMAPGOAL_H diff --git a/nav_msgs/include/nav_msgs/GetMapRequest.h b/nav_msgs/include/nav_msgs/GetMapRequest.h new file mode 100644 index 0000000..9df0394 --- /dev/null +++ b/nav_msgs/include/nav_msgs/GetMapRequest.h @@ -0,0 +1,45 @@ +// Generated by gencpp from file nav_msgs/GetMapRequest.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_GETMAPREQUEST_H +#define NAV_MSGS_MESSAGE_GETMAPREQUEST_H + + +#include +#include +#include +#include + + +namespace nav_msgs +{ +template +struct GetMapRequest_ +{ + typedef GetMapRequest_ Type; + + GetMapRequest_() + { + } + GetMapRequest_(const ContainerAllocator& _alloc) + { + (void)_alloc; + } + + + + + typedef boost::shared_ptr< ::nav_msgs::GetMapRequest_ > Ptr; + typedef boost::shared_ptr< ::nav_msgs::GetMapRequest_ const> ConstPtr; + +}; // struct GetMapRequest_ + +typedef ::nav_msgs::GetMapRequest_ > GetMapRequest; + +typedef boost::shared_ptr< ::nav_msgs::GetMapRequest > GetMapRequestPtr; +typedef boost::shared_ptr< ::nav_msgs::GetMapRequest const> GetMapRequestConstPtr; + +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_GETMAPREQUEST_H diff --git a/nav_msgs/include/nav_msgs/GetMapResponse.h b/nav_msgs/include/nav_msgs/GetMapResponse.h new file mode 100644 index 0000000..ea93590 --- /dev/null +++ b/nav_msgs/include/nav_msgs/GetMapResponse.h @@ -0,0 +1,63 @@ +// Generated by gencpp from file nav_msgs/GetMapResponse.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_GETMAPRESPONSE_H +#define NAV_MSGS_MESSAGE_GETMAPRESPONSE_H + + +#include +#include +#include +#include + +#include + +namespace nav_msgs +{ +template +struct GetMapResponse_ +{ + typedef GetMapResponse_ Type; + + GetMapResponse_() + : map() { + } + GetMapResponse_(const ContainerAllocator& _alloc) + : map(_alloc) { + (void)_alloc; + } + + + + typedef ::nav_msgs::OccupancyGrid_ _map_type; + _map_type map; + + + + + typedef boost::shared_ptr< ::nav_msgs::GetMapResponse_ > Ptr; + typedef boost::shared_ptr< ::nav_msgs::GetMapResponse_ const> ConstPtr; + +}; // struct GetMapResponse_ + +typedef ::nav_msgs::GetMapResponse_ > GetMapResponse; + +typedef boost::shared_ptr< ::nav_msgs::GetMapResponse > GetMapResponsePtr; +typedef boost::shared_ptr< ::nav_msgs::GetMapResponse const> GetMapResponseConstPtr; + +template +bool operator==(const ::nav_msgs::GetMapResponse_ & lhs, const ::nav_msgs::GetMapResponse_ & rhs) +{ + return lhs.map == rhs.map; +} + +template +bool operator!=(const ::nav_msgs::GetMapResponse_ & lhs, const ::nav_msgs::GetMapResponse_ & rhs) +{ + return !(lhs == rhs); +} + +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_GETMAPRESPONSE_H diff --git a/nav_msgs/include/nav_msgs/GetMapResult.h b/nav_msgs/include/nav_msgs/GetMapResult.h new file mode 100644 index 0000000..12ba526 --- /dev/null +++ b/nav_msgs/include/nav_msgs/GetMapResult.h @@ -0,0 +1,63 @@ +// Generated by gencpp from file nav_msgs/GetMapResult.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_GETMAPRESULT_H +#define NAV_MSGS_MESSAGE_GETMAPRESULT_H + + +#include +#include +#include +#include + +#include + +namespace nav_msgs +{ +template +struct GetMapResult_ +{ + typedef GetMapResult_ Type; + + GetMapResult_() + : map() { + } + GetMapResult_(const ContainerAllocator& _alloc) + : map(_alloc) { + (void)_alloc; + } + + + + typedef ::nav_msgs::OccupancyGrid_ _map_type; + _map_type map; + + + + + typedef boost::shared_ptr< ::nav_msgs::GetMapResult_ > Ptr; + typedef boost::shared_ptr< ::nav_msgs::GetMapResult_ const> ConstPtr; + +}; // struct GetMapResult_ + +typedef ::nav_msgs::GetMapResult_ > GetMapResult; + +typedef boost::shared_ptr< ::nav_msgs::GetMapResult > GetMapResultPtr; +typedef boost::shared_ptr< ::nav_msgs::GetMapResult const> GetMapResultConstPtr; + +template +bool operator==(const ::nav_msgs::GetMapResult_ & lhs, const ::nav_msgs::GetMapResult_ & rhs) +{ + return lhs.map == rhs.map; +} + +template +bool operator!=(const ::nav_msgs::GetMapResult_ & lhs, const ::nav_msgs::GetMapResult_ & rhs) +{ + return !(lhs == rhs); +} + +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_GETMAPRESULT_H diff --git a/nav_msgs/include/nav_msgs/GetPlan.h b/nav_msgs/include/nav_msgs/GetPlan.h new file mode 100644 index 0000000..19ed1f5 --- /dev/null +++ b/nav_msgs/include/nav_msgs/GetPlan.h @@ -0,0 +1,30 @@ +// Generated by gencpp from file nav_msgs/GetPlan.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_GETPLAN_H +#define NAV_MSGS_MESSAGE_GETPLAN_H + + +#include +#include + + +namespace nav_msgs +{ + +struct GetPlan +{ + +typedef GetPlanRequest Request; +typedef GetPlanResponse Response; +Request request; +Response response; + +typedef Request RequestType; +typedef Response ResponseType; + +}; // struct GetPlan +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_GETPLAN_H diff --git a/nav_msgs/include/nav_msgs/GetPlanRequest.h b/nav_msgs/include/nav_msgs/GetPlanRequest.h new file mode 100644 index 0000000..c2bf6a5 --- /dev/null +++ b/nav_msgs/include/nav_msgs/GetPlanRequest.h @@ -0,0 +1,75 @@ +// Generated by gencpp from file nav_msgs/GetPlanRequest.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_GETPLANREQUEST_H +#define NAV_MSGS_MESSAGE_GETPLANREQUEST_H + + +#include +#include +#include +#include + +#include + +namespace nav_msgs +{ +template +struct GetPlanRequest_ +{ + typedef GetPlanRequest_ Type; + + GetPlanRequest_() + : start() + , goal() + , tolerance(0.0) { + } + GetPlanRequest_(const ContainerAllocator& _alloc) + : start(_alloc) + , goal(_alloc) + , tolerance(0.0) { + (void)_alloc; + } + + + + typedef ::geometry_msgs::PoseStamped _start_type; + _start_type start; + + typedef ::geometry_msgs::PoseStamped _goal_type; + _goal_type goal; + + typedef float _tolerance_type; + _tolerance_type tolerance; + + + + + typedef boost::shared_ptr< ::nav_msgs::GetPlanRequest_ > Ptr; + typedef boost::shared_ptr< ::nav_msgs::GetPlanRequest_ const> ConstPtr; + +}; // struct GetPlanRequest_ + +typedef ::nav_msgs::GetPlanRequest_ > GetPlanRequest; + +typedef boost::shared_ptr< ::nav_msgs::GetPlanRequest > GetPlanRequestPtr; +typedef boost::shared_ptr< ::nav_msgs::GetPlanRequest const> GetPlanRequestConstPtr; + +template +bool operator==(const ::nav_msgs::GetPlanRequest_ & lhs, const ::nav_msgs::GetPlanRequest_ & rhs) +{ + return lhs.start == rhs.start && + lhs.goal == rhs.goal && + lhs.tolerance == rhs.tolerance; +} + +template +bool operator!=(const ::nav_msgs::GetPlanRequest_ & lhs, const ::nav_msgs::GetPlanRequest_ & rhs) +{ + return !(lhs == rhs); +} + +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_GETPLANREQUEST_H diff --git a/nav_msgs/include/nav_msgs/GetPlanResponse.h b/nav_msgs/include/nav_msgs/GetPlanResponse.h new file mode 100644 index 0000000..d716eef --- /dev/null +++ b/nav_msgs/include/nav_msgs/GetPlanResponse.h @@ -0,0 +1,63 @@ +// Generated by gencpp from file nav_msgs/GetPlanResponse.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_GETPLANRESPONSE_H +#define NAV_MSGS_MESSAGE_GETPLANRESPONSE_H + + +#include +#include +#include +#include + +#include + +namespace nav_msgs +{ +template +struct GetPlanResponse_ +{ + typedef GetPlanResponse_ Type; + + GetPlanResponse_() + : plan() { + } + GetPlanResponse_(const ContainerAllocator& _alloc) + : plan(_alloc) { + (void)_alloc; + } + + + + typedef ::nav_msgs::Path_ _plan_type; + _plan_type plan; + + + + + typedef boost::shared_ptr< ::nav_msgs::GetPlanResponse_ > Ptr; + typedef boost::shared_ptr< ::nav_msgs::GetPlanResponse_ const> ConstPtr; + +}; // struct GetPlanResponse_ + +typedef ::nav_msgs::GetPlanResponse_ > GetPlanResponse; + +typedef boost::shared_ptr< ::nav_msgs::GetPlanResponse > GetPlanResponsePtr; +typedef boost::shared_ptr< ::nav_msgs::GetPlanResponse const> GetPlanResponseConstPtr; + +template +bool operator==(const ::nav_msgs::GetPlanResponse_ & lhs, const ::nav_msgs::GetPlanResponse_ & rhs) +{ + return lhs.plan == rhs.plan; +} + +template +bool operator!=(const ::nav_msgs::GetPlanResponse_ & lhs, const ::nav_msgs::GetPlanResponse_ & rhs) +{ + return !(lhs == rhs); +} + +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_GETPLANRESPONSE_H diff --git a/nav_msgs/include/nav_msgs/GridCells.h b/nav_msgs/include/nav_msgs/GridCells.h index 6115595..77dfc13 100644 --- a/nav_msgs/include/nav_msgs/GridCells.h +++ b/nav_msgs/include/nav_msgs/GridCells.h @@ -21,8 +21,27 @@ struct GridCells float cell_width; float cell_height; std::vector cells; + + GridCells() = default; }; +inline bool operator==(const nav_msgs::GridCells & lhs, const nav_msgs::GridCells & rhs) +{ + if(lhs.cells.size() != rhs.cells.size()) return false; + for(int i = 0; i < lhs.cells.size(); i++) + { + if(lhs.cells[i] != rhs.cells[i]) return false; + } + return lhs.header == rhs.header && + isEqual(lhs.cell_width, rhs.cell_width) && + isEqual(lhs.cell_height, rhs.cell_height); +} + +inline bool operator!=(const nav_msgs::GridCells & lhs, const nav_msgs::GridCells & rhs) +{ + return !(lhs == rhs); +} + } #endif //GRID_CELLS_H \ No newline at end of file diff --git a/nav_msgs/include/nav_msgs/LoadMap.h b/nav_msgs/include/nav_msgs/LoadMap.h new file mode 100644 index 0000000..7b4730c --- /dev/null +++ b/nav_msgs/include/nav_msgs/LoadMap.h @@ -0,0 +1,30 @@ +// Generated by gencpp from file nav_msgs/LoadMap.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_LOADMAP_H +#define NAV_MSGS_MESSAGE_LOADMAP_H + + +#include +#include + + +namespace nav_msgs +{ + +struct LoadMap +{ + +typedef LoadMapRequest Request; +typedef LoadMapResponse Response; +Request request; +Response response; + +typedef Request RequestType; +typedef Response ResponseType; + +}; // struct LoadMap +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_LOADMAP_H diff --git a/nav_msgs/include/nav_msgs/LoadMapRequest.h b/nav_msgs/include/nav_msgs/LoadMapRequest.h new file mode 100644 index 0000000..f22b19f --- /dev/null +++ b/nav_msgs/include/nav_msgs/LoadMapRequest.h @@ -0,0 +1,62 @@ +// Generated by gencpp from file nav_msgs/LoadMapRequest.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_LOADMAPREQUEST_H +#define NAV_MSGS_MESSAGE_LOADMAPREQUEST_H + + +#include +#include +#include +#include + + +namespace nav_msgs +{ +template +struct LoadMapRequest_ +{ + typedef LoadMapRequest_ Type; + + LoadMapRequest_() + : map_url() { + } + LoadMapRequest_(const ContainerAllocator& _alloc) + : map_url(_alloc) { + (void)_alloc; + } + + + + typedef std::basic_string, typename std::allocator_traits::template rebind_alloc> _map_url_type; + _map_url_type map_url; + + + + + typedef boost::shared_ptr< ::nav_msgs::LoadMapRequest_ > Ptr; + typedef boost::shared_ptr< ::nav_msgs::LoadMapRequest_ const> ConstPtr; + +}; // struct LoadMapRequest_ + +typedef ::nav_msgs::LoadMapRequest_ > LoadMapRequest; + +typedef boost::shared_ptr< ::nav_msgs::LoadMapRequest > LoadMapRequestPtr; +typedef boost::shared_ptr< ::nav_msgs::LoadMapRequest const> LoadMapRequestConstPtr; + +template +bool operator==(const ::nav_msgs::LoadMapRequest_ & lhs, const ::nav_msgs::LoadMapRequest_ & rhs) +{ + return lhs.map_url == rhs.map_url; +} + +template +bool operator!=(const ::nav_msgs::LoadMapRequest_ & lhs, const ::nav_msgs::LoadMapRequest_ & rhs) +{ + return !(lhs == rhs); +} + +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_LOADMAPREQUEST_H diff --git a/nav_msgs/include/nav_msgs/LoadMapResponse.h b/nav_msgs/include/nav_msgs/LoadMapResponse.h new file mode 100644 index 0000000..a3fee92 --- /dev/null +++ b/nav_msgs/include/nav_msgs/LoadMapResponse.h @@ -0,0 +1,94 @@ +// Generated by gencpp from file nav_msgs/LoadMapResponse.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_LOADMAPRESPONSE_H +#define NAV_MSGS_MESSAGE_LOADMAPRESPONSE_H + + +#include +#include +#include +#include + +#include + +namespace nav_msgs +{ +template +struct LoadMapResponse_ +{ + typedef LoadMapResponse_ Type; + + LoadMapResponse_() + : map() + , result(0) { + } + LoadMapResponse_(const ContainerAllocator& _alloc) + : map(_alloc) + , result(0) { + (void)_alloc; + } + + + + typedef ::nav_msgs::OccupancyGrid_ _map_type; + _map_type map; + + typedef uint8_t _result_type; + _result_type result; + + + +// reducing the odds to have name collisions with Windows.h +#if defined(_WIN32) && defined(RESULT_SUCCESS) + #undef RESULT_SUCCESS +#endif +#if defined(_WIN32) && defined(RESULT_MAP_DOES_NOT_EXIST) + #undef RESULT_MAP_DOES_NOT_EXIST +#endif +#if defined(_WIN32) && defined(RESULT_INVALID_MAP_DATA) + #undef RESULT_INVALID_MAP_DATA +#endif +#if defined(_WIN32) && defined(RESULT_INVALID_MAP_METADATA) + #undef RESULT_INVALID_MAP_METADATA +#endif +#if defined(_WIN32) && defined(RESULT_UNDEFINED_FAILURE) + #undef RESULT_UNDEFINED_FAILURE +#endif + + enum { + RESULT_SUCCESS = 0u, + RESULT_MAP_DOES_NOT_EXIST = 1u, + RESULT_INVALID_MAP_DATA = 2u, + RESULT_INVALID_MAP_METADATA = 3u, + RESULT_UNDEFINED_FAILURE = 255u, + }; + + + typedef boost::shared_ptr< ::nav_msgs::LoadMapResponse_ > Ptr; + typedef boost::shared_ptr< ::nav_msgs::LoadMapResponse_ const> ConstPtr; + +}; // struct LoadMapResponse_ + +typedef ::nav_msgs::LoadMapResponse_ > LoadMapResponse; + +typedef boost::shared_ptr< ::nav_msgs::LoadMapResponse > LoadMapResponsePtr; +typedef boost::shared_ptr< ::nav_msgs::LoadMapResponse const> LoadMapResponseConstPtr; + +template +bool operator==(const ::nav_msgs::LoadMapResponse_ & lhs, const ::nav_msgs::LoadMapResponse_ & rhs) +{ + return lhs.map == rhs.map && + lhs.result == rhs.result; +} + +template +bool operator!=(const ::nav_msgs::LoadMapResponse_ & lhs, const ::nav_msgs::LoadMapResponse_ & rhs) +{ + return !(lhs == rhs); +} + +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_LOADMAPRESPONSE_H diff --git a/nav_msgs/include/nav_msgs/MapMetaData.h b/nav_msgs/include/nav_msgs/MapMetaData.h index 10ba6a3..ed3e4f6 100644 --- a/nav_msgs/include/nav_msgs/MapMetaData.h +++ b/nav_msgs/include/nav_msgs/MapMetaData.h @@ -5,6 +5,7 @@ #include #include #include "geometry_msgs/Pose.h" +// #include "utils.h" namespace nav_msgs { @@ -16,8 +17,24 @@ struct MapMetaData uint32_t width; uint32_t height; geometry_msgs::Pose origin; + + MapMetaData() : map_load_time(0.0), resolution(0.0), width(0), height(0), origin() {} }; +inline bool operator==(const nav_msgs::MapMetaData & lhs, const nav_msgs::MapMetaData & rhs) +{ + return isEqual(lhs.map_load_time, rhs.map_load_time) && + isEqual(lhs.resolution, rhs.resolution) && + lhs.width == rhs.width && + lhs.height == rhs.height && + lhs.origin == rhs.origin; +} + +inline bool operator!=(const nav_msgs::MapMetaData & lhs, const nav_msgs::MapMetaData & rhs) +{ + return !(lhs == rhs); +} + } #endif //MAP_META_DATA_H \ No newline at end of file diff --git a/nav_msgs/include/nav_msgs/OccupancyGrid.h b/nav_msgs/include/nav_msgs/OccupancyGrid.h index cb5f8fe..4a4c665 100644 --- a/nav_msgs/include/nav_msgs/OccupancyGrid.h +++ b/nav_msgs/include/nav_msgs/OccupancyGrid.h @@ -4,7 +4,7 @@ #include #include #include -#include "std_msgs/Header.h" +#include #include namespace nav_msgs @@ -17,8 +17,26 @@ std_msgs::Header header; MapMetaData info; std::vector data; +OccupancyGrid() = default; }; +inline bool operator==(const nav_msgs::OccupancyGrid & lhs, const nav_msgs::OccupancyGrid & rhs) +{ + if(lhs.data.size() != rhs.data.size()) return false; + for(int i = 0; i < lhs.data.size(); i++) + { + if(lhs.data[i] != rhs.data[i]) return false; + } + return lhs.header == rhs.header && + lhs.info == rhs.info; + } +inline bool operator!=(const nav_msgs::OccupancyGrid & lhs, const nav_msgs::OccupancyGrid & rhs) +{ + return !(lhs == rhs); +} + +} // namespace nav_msgs + #endif //OCCUPANCY_GRID_H diff --git a/nav_msgs/include/nav_msgs/Odometry.h b/nav_msgs/include/nav_msgs/Odometry.h index 79dd904..3207d2e 100644 --- a/nav_msgs/include/nav_msgs/Odometry.h +++ b/nav_msgs/include/nav_msgs/Odometry.h @@ -25,8 +25,24 @@ struct Odometry std::string child_frame_id; geometry_msgs::PoseWithCovariance pose; geometry_msgs::TwistWithCovariance twist; + + Odometry() = default; }; +inline bool operator==(const nav_msgs::Odometry & lhs, const nav_msgs::Odometry & rhs) +{ + return lhs.header == rhs.header && + lhs.child_frame_id == rhs.child_frame_id && + lhs.pose == rhs.pose && + lhs.twist == rhs.twist; +} + +inline bool operator!=(const nav_msgs::Odometry & lhs, const nav_msgs::Odometry & rhs) +{ + return !(lhs == rhs); +} + + } #endif //ODOMETRY_H \ No newline at end of file diff --git a/nav_msgs/include/nav_msgs/Path.h b/nav_msgs/include/nav_msgs/Path.h index 6b8bbf6..b6a3eab 100644 --- a/nav_msgs/include/nav_msgs/Path.h +++ b/nav_msgs/include/nav_msgs/Path.h @@ -17,8 +17,25 @@ struct Path { std_msgs::Header header; std::vector poses; + + Path() = default; }; +bool operator==(const nav_msgs::Path & lhs, const nav_msgs::Path & rhs) +{ + if(lhs.poses.size() != rhs.poses.size()) return false; + for(int i = 0; i < lhs.poses.size(); i++) + { + if(lhs.poses[i] != rhs.poses[i]) return false; + } + return lhs.header == rhs.header; +} + +bool operator!=(const nav_msgs::Path & lhs, const nav_msgs::Path & rhs) +{ + return !(lhs == rhs); +} + } #endif //PATH_H diff --git a/nav_msgs/include/nav_msgs/SetMap.h b/nav_msgs/include/nav_msgs/SetMap.h new file mode 100644 index 0000000..b1ff016 --- /dev/null +++ b/nav_msgs/include/nav_msgs/SetMap.h @@ -0,0 +1,30 @@ +// Generated by gencpp from file nav_msgs/SetMap.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_SETMAP_H +#define NAV_MSGS_MESSAGE_SETMAP_H + + +#include +#include + + +namespace nav_msgs +{ + +struct SetMap +{ + +typedef SetMapRequest Request; +typedef SetMapResponse Response; +Request request; +Response response; + +typedef Request RequestType; +typedef Response ResponseType; + +}; // struct SetMap +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_SETMAP_H diff --git a/nav_msgs/include/nav_msgs/SetMapRequest.h b/nav_msgs/include/nav_msgs/SetMapRequest.h new file mode 100644 index 0000000..86c47b2 --- /dev/null +++ b/nav_msgs/include/nav_msgs/SetMapRequest.h @@ -0,0 +1,70 @@ +// Generated by gencpp from file nav_msgs/SetMapRequest.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_SETMAPREQUEST_H +#define NAV_MSGS_MESSAGE_SETMAPREQUEST_H + + +#include +#include +#include +#include + +#include +#include + +namespace nav_msgs +{ +template +struct SetMapRequest_ +{ + typedef SetMapRequest_ Type; + + SetMapRequest_() + : map() + , initial_pose() { + } + SetMapRequest_(const ContainerAllocator& _alloc) + : map(_alloc) + , initial_pose(_alloc) { + (void)_alloc; + } + + + + typedef ::nav_msgs::OccupancyGrid_ _map_type; + _map_type map; + + typedef ::geometry_msgs::PoseWithCovarianceStamped _initial_pose_type; + _initial_pose_type initial_pose; + + + + + typedef boost::shared_ptr< ::nav_msgs::SetMapRequest_ > Ptr; + typedef boost::shared_ptr< ::nav_msgs::SetMapRequest_ const> ConstPtr; + +}; // struct SetMapRequest_ + +typedef ::nav_msgs::SetMapRequest_ > SetMapRequest; + +typedef boost::shared_ptr< ::nav_msgs::SetMapRequest > SetMapRequestPtr; +typedef boost::shared_ptr< ::nav_msgs::SetMapRequest const> SetMapRequestConstPtr; + +template +bool operator==(const ::nav_msgs::SetMapRequest_ & lhs, const ::nav_msgs::SetMapRequest_ & rhs) +{ + return lhs.map == rhs.map && + lhs.initial_pose == rhs.initial_pose; +} + +template +bool operator!=(const ::nav_msgs::SetMapRequest_ & lhs, const ::nav_msgs::SetMapRequest_ & rhs) +{ + return !(lhs == rhs); +} + +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_SETMAPREQUEST_H diff --git a/nav_msgs/include/nav_msgs/SetMapResponse.h b/nav_msgs/include/nav_msgs/SetMapResponse.h new file mode 100644 index 0000000..1d37e8a --- /dev/null +++ b/nav_msgs/include/nav_msgs/SetMapResponse.h @@ -0,0 +1,62 @@ +// Generated by gencpp from file nav_msgs/SetMapResponse.msg +// DO NOT EDIT! + + +#ifndef NAV_MSGS_MESSAGE_SETMAPRESPONSE_H +#define NAV_MSGS_MESSAGE_SETMAPRESPONSE_H + + +#include +#include +#include +#include + + +namespace nav_msgs +{ +template +struct SetMapResponse_ +{ + typedef SetMapResponse_ Type; + + SetMapResponse_() + : success(false) { + } + SetMapResponse_(const ContainerAllocator& _alloc) + : success(false) { + (void)_alloc; + } + + + + typedef uint8_t _success_type; + _success_type success; + + + + + typedef boost::shared_ptr< ::nav_msgs::SetMapResponse_ > Ptr; + typedef boost::shared_ptr< ::nav_msgs::SetMapResponse_ const> ConstPtr; + +}; // struct SetMapResponse_ + +typedef ::nav_msgs::SetMapResponse_ > SetMapResponse; + +typedef boost::shared_ptr< ::nav_msgs::SetMapResponse > SetMapResponsePtr; +typedef boost::shared_ptr< ::nav_msgs::SetMapResponse const> SetMapResponseConstPtr; + +template +bool operator==(const ::nav_msgs::SetMapResponse_ & lhs, const ::nav_msgs::SetMapResponse_ & rhs) +{ + return lhs.success == rhs.success; +} + +template +bool operator!=(const ::nav_msgs::SetMapResponse_ & lhs, const ::nav_msgs::SetMapResponse_ & rhs) +{ + return !(lhs == rhs); +} + +} // namespace nav_msgs + +#endif // NAV_MSGS_MESSAGE_SETMAPRESPONSE_H diff --git a/sensor_msgs/include/sensor_msgs/BatteryState.h b/sensor_msgs/include/sensor_msgs/BatteryState.h index 033db21..f6242f1 100644 --- a/sensor_msgs/include/sensor_msgs/BatteryState.h +++ b/sensor_msgs/include/sensor_msgs/BatteryState.h @@ -60,4 +60,29 @@ struct BatteryState std::string serial_number; }; +inline bool operator==(const sensor_msgs::BatteryState& lhs, const sensor_msgs::BatteryState& rhs) +{ + return lhs.header == rhs.header && + lhs.voltage == rhs.voltage && + lhs.temperature == rhs.temperature && + lhs.current == rhs.current && + lhs.charge == rhs.charge && + lhs.capacity == rhs.capacity && + lhs.design_capacity == rhs.design_capacity && + lhs.percentage == rhs.percentage && + lhs.power_supply_status == rhs.power_supply_status && + lhs.power_supply_health == rhs.power_supply_health && + lhs.power_supply_technology == rhs.power_supply_technology && + lhs.present == rhs.present && + lhs.cell_voltage == rhs.cell_voltage && + lhs.cell_temperature == rhs.cell_temperature && + lhs.location == rhs.location && + lhs.serial_number == rhs.serial_number; +} + +inline bool operator!=(const sensor_msgs::BatteryState& lhs, const sensor_msgs::BatteryState& rhs) +{ + return !(lhs == rhs); +} + } // namespace sensor_msgs diff --git a/std_msgs/include/std_msgs/Bool.h b/std_msgs/include/std_msgs/Bool.h new file mode 100644 index 0000000..8f7b9d7 --- /dev/null +++ b/std_msgs/include/std_msgs/Bool.h @@ -0,0 +1,61 @@ +// Generated by gencpp from file std_msgs/Bool.msg +// DO NOT EDIT! + + +#ifndef STD_MSGS_MESSAGE_BOOL_H +#define STD_MSGS_MESSAGE_BOOL_H + + +#include +#include +#include + +namespace std_msgs +{ +template +struct Bool_ +{ + typedef Bool_ Type; + + Bool_() + : data(false) { + } + Bool_(const ContainerAllocator& _alloc) + : data(false) { + (void)_alloc; + } + + + + typedef uint8_t _data_type; + _data_type data; + + + typedef boost::shared_ptr< ::std_msgs::Bool_ > Ptr; + typedef boost::shared_ptr< ::std_msgs::Bool_ const> ConstPtr; + +}; // struct Bool_ + +typedef ::std_msgs::Bool_ > Bool; + +typedef boost::shared_ptr< ::std_msgs::Bool > BoolPtr; +typedef boost::shared_ptr< ::std_msgs::Bool const> BoolConstPtr; + +// constants requiring out of line definition + +template +bool operator==(const ::std_msgs::Bool_ & lhs, const ::std_msgs::Bool_ & rhs) +{ + return lhs.data == rhs.data; +} + +template +bool operator!=(const ::std_msgs::Bool_ & lhs, const ::std_msgs::Bool_ & rhs) +{ + return !(lhs == rhs); +} + + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_BOOL_H diff --git a/std_msgs/include/std_msgs/Byte.h b/std_msgs/include/std_msgs/Byte.h new file mode 100644 index 0000000..c9599de --- /dev/null +++ b/std_msgs/include/std_msgs/Byte.h @@ -0,0 +1,56 @@ +// Generated by gencpp from file std_msgs/Byte.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_BYTE_H +#define STD_MSGS_MESSAGE_BYTE_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct Byte_ + { + typedef Byte_ Type; + + Byte_() + : data(0) + { + } + Byte_(const ContainerAllocator &_alloc) + : data(0) + { + (void)_alloc; + } + + typedef int8_t _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::Byte_> Ptr; + typedef boost::shared_ptr<::std_msgs::Byte_ const> ConstPtr; + + }; // struct Byte_ + + typedef ::std_msgs::Byte_> Byte; + + typedef boost::shared_ptr<::std_msgs::Byte> BytePtr; + typedef boost::shared_ptr<::std_msgs::Byte const> ByteConstPtr; + + // constants requiring out of line definition + template + bool operator==(const ::std_msgs::Byte_ &lhs, const ::std_msgs::Byte_ &rhs) + { + return lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::Byte_ &lhs, const ::std_msgs::Byte_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_BYTE_H diff --git a/std_msgs/include/std_msgs/ByteMultiArray.h b/std_msgs/include/std_msgs/ByteMultiArray.h new file mode 100644 index 0000000..141bef3 --- /dev/null +++ b/std_msgs/include/std_msgs/ByteMultiArray.h @@ -0,0 +1,60 @@ +// Generated by gencpp from file std_msgs/ByteMultiArray.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_BYTEMULTIARRAY_H +#define STD_MSGS_MESSAGE_BYTEMULTIARRAY_H + +#include +#include +#include + +#include + +namespace std_msgs +{ + template + struct ByteMultiArray_ + { + typedef ByteMultiArray_ Type; + + ByteMultiArray_() + : layout(), data() + { + } + ByteMultiArray_(const ContainerAllocator &_alloc) + : layout(_alloc), data(_alloc) + { + (void)_alloc; + } + + typedef ::std_msgs::MultiArrayLayout_ _layout_type; + _layout_type layout; + + typedef std::vector::template rebind_alloc> _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::ByteMultiArray_> Ptr; + typedef boost::shared_ptr<::std_msgs::ByteMultiArray_ const> ConstPtr; + + }; // struct ByteMultiArray_ + + typedef ::std_msgs::ByteMultiArray_> ByteMultiArray; + + typedef boost::shared_ptr<::std_msgs::ByteMultiArray> ByteMultiArrayPtr; + typedef boost::shared_ptr<::std_msgs::ByteMultiArray const> ByteMultiArrayConstPtr; + + template + bool operator==(const ::std_msgs::ByteMultiArray_ &lhs, const ::std_msgs::ByteMultiArray_ &rhs) + { + return lhs.layout == rhs.layout && + lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::ByteMultiArray_ &lhs, const ::std_msgs::ByteMultiArray_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs +#endif // STD_MSGS_MESSAGE_BYTEMULTIARRAY_H diff --git a/std_msgs/include/std_msgs/Char.h b/std_msgs/include/std_msgs/Char.h new file mode 100644 index 0000000..ba36b80 --- /dev/null +++ b/std_msgs/include/std_msgs/Char.h @@ -0,0 +1,56 @@ +// Generated by gencpp from file std_msgs/Char.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_CHAR_H +#define STD_MSGS_MESSAGE_CHAR_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct Char_ + { + typedef Char_ Type; + + Char_() + : data(0) + { + } + Char_(const ContainerAllocator &_alloc) + : data(0) + { + (void)_alloc; + } + + typedef uint8_t _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::Char_> Ptr; + typedef boost::shared_ptr<::std_msgs::Char_ const> ConstPtr; + + }; // struct Char_ + + typedef ::std_msgs::Char_> Char; + + typedef boost::shared_ptr<::std_msgs::Char> CharPtr; + typedef boost::shared_ptr<::std_msgs::Char const> CharConstPtr; + + // constants requiring out of line definition + template + bool operator==(const ::std_msgs::Char_ &lhs, const ::std_msgs::Char_ &rhs) + { + return lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::Char_ &lhs, const ::std_msgs::Char_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_CHAR_H diff --git a/std_msgs/include/std_msgs/ColorRGBA.h b/std_msgs/include/std_msgs/ColorRGBA.h new file mode 100644 index 0000000..4433684 --- /dev/null +++ b/std_msgs/include/std_msgs/ColorRGBA.h @@ -0,0 +1,69 @@ +// Generated by gencpp from file std_msgs/ColorRGBA.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_COLORRGBA_H +#define STD_MSGS_MESSAGE_COLORRGBA_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct ColorRGBA_ + { + typedef ColorRGBA_ Type; + + ColorRGBA_() + : r(0.0), g(0.0), b(0.0), a(0.0) + { + } + ColorRGBA_(const ContainerAllocator &_alloc) + : r(0.0), g(0.0), b(0.0), a(0.0) + { + (void)_alloc; + } + + typedef float _r_type; + _r_type r; + + typedef float _g_type; + _g_type g; + + typedef float _b_type; + _b_type b; + + typedef float _a_type; + _a_type a; + + typedef boost::shared_ptr<::std_msgs::ColorRGBA_> Ptr; + typedef boost::shared_ptr<::std_msgs::ColorRGBA_ const> ConstPtr; + + }; // struct ColorRGBA_ + + typedef ::std_msgs::ColorRGBA_> ColorRGBA; + + typedef boost::shared_ptr<::std_msgs::ColorRGBA> ColorRGBAPtr; + typedef boost::shared_ptr<::std_msgs::ColorRGBA const> ColorRGBAConstPtr; + + // constants requiring out of line definition + + template + bool operator==(const ::std_msgs::ColorRGBA_ &lhs, const ::std_msgs::ColorRGBA_ &rhs) + { + return lhs.r == rhs.r && + lhs.g == rhs.g && + lhs.b == rhs.b && + lhs.a == rhs.a; + } + + template + bool operator!=(const ::std_msgs::ColorRGBA_ &lhs, const ::std_msgs::ColorRGBA_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_COLORRGBA_H diff --git a/std_msgs/include/std_msgs/Duration.h b/std_msgs/include/std_msgs/Duration.h new file mode 100644 index 0000000..22cfd3b --- /dev/null +++ b/std_msgs/include/std_msgs/Duration.h @@ -0,0 +1,62 @@ +// Generated by gencpp from file std_msgs/Duration.msg +// DO NOT EDIT! + + +#ifndef STD_MSGS_MESSAGE_DURATION_H +#define STD_MSGS_MESSAGE_DURATION_H + + +#include +#include +#include + +#include + +namespace std_msgs +{ +template +struct Duration_ +{ + typedef Duration_ Type; + + Duration_() + : data() { + } + Duration_(const ContainerAllocator& _alloc) + : data() { + (void)_alloc; + } + + typedef robot::Duration _data_type; + _data_type data; + + typedef std::shared_ptr< ::std_msgs::Duration_ > Ptr; + typedef std::shared_ptr< ::std_msgs::Duration_ const> ConstPtr; + +}; // struct Duration_ + +typedef ::std_msgs::Duration_ > Duration; + +typedef std::shared_ptr< ::std_msgs::Duration > DurationPtr; +typedef std::shared_ptr< ::std_msgs::Duration const> DurationConstPtr; + +// constants requiring out of line definition + + + +template +bool operator==(const ::std_msgs::Duration_ & lhs, const ::std_msgs::Duration_ & rhs) +{ + return lhs.data == rhs.data; +} + +template +bool operator!=(const ::std_msgs::Duration_ & lhs, const ::std_msgs::Duration_ & rhs) +{ + return !(lhs == rhs); +} + + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_DURATION_H diff --git a/std_msgs/include/std_msgs/Empty.h b/std_msgs/include/std_msgs/Empty.h new file mode 100644 index 0000000..000fdea --- /dev/null +++ b/std_msgs/include/std_msgs/Empty.h @@ -0,0 +1,40 @@ +// Generated by gencpp from file std_msgs/Empty.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_EMPTY_H +#define STD_MSGS_MESSAGE_EMPTY_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct Empty_ + { + typedef Empty_ Type; + + Empty_() + { + } + Empty_(const ContainerAllocator &_alloc) + { + (void)_alloc; + } + + typedef boost::shared_ptr<::std_msgs::Empty_> Ptr; + typedef boost::shared_ptr<::std_msgs::Empty_ const> ConstPtr; + + }; // struct Empty_ + + typedef ::std_msgs::Empty_> Empty; + + typedef boost::shared_ptr<::std_msgs::Empty> EmptyPtr; + typedef boost::shared_ptr<::std_msgs::Empty const> EmptyConstPtr; + + // constants requiring out of line definition + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_EMPTY_H diff --git a/std_msgs/include/std_msgs/Float32.h b/std_msgs/include/std_msgs/Float32.h new file mode 100644 index 0000000..4430cd8 --- /dev/null +++ b/std_msgs/include/std_msgs/Float32.h @@ -0,0 +1,55 @@ +// Generated by gencpp from file std_msgs/Float32.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_FLOAT32_H +#define STD_MSGS_MESSAGE_FLOAT32_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct Float32_ + { + typedef Float32_ Type; + + Float32_() + : data(0.0) + { + } + Float32_(const ContainerAllocator &_alloc) + : data(0.0) + { + (void)_alloc; + } + + typedef float _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::Float32_> Ptr; + typedef boost::shared_ptr<::std_msgs::Float32_ const> ConstPtr; + + }; // struct Float32_ + + typedef ::std_msgs::Float32_> Float32; + + typedef boost::shared_ptr<::std_msgs::Float32> Float32Ptr; + typedef boost::shared_ptr<::std_msgs::Float32 const> Float32ConstPtr; + + template + bool operator==(const ::std_msgs::Float32_ &lhs, const ::std_msgs::Float32_ &rhs) + { + return lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::Float32_ &lhs, const ::std_msgs::Float32_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_FLOAT32_H diff --git a/std_msgs/include/std_msgs/Float32MultiArray.h b/std_msgs/include/std_msgs/Float32MultiArray.h new file mode 100644 index 0000000..40553b7 --- /dev/null +++ b/std_msgs/include/std_msgs/Float32MultiArray.h @@ -0,0 +1,62 @@ +// Generated by gencpp from file std_msgs/Float32MultiArray.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_FLOAT32MULTIARRAY_H +#define STD_MSGS_MESSAGE_FLOAT32MULTIARRAY_H + +#include +#include +#include + +#include + +namespace std_msgs +{ + template + struct Float32MultiArray_ + { + typedef Float32MultiArray_ Type; + + Float32MultiArray_() + : layout(), data() + { + } + Float32MultiArray_(const ContainerAllocator &_alloc) + : layout(_alloc), data(_alloc) + { + (void)_alloc; + } + + typedef ::std_msgs::MultiArrayLayout_ _layout_type; + _layout_type layout; + + typedef std::vector::template rebind_alloc> _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::Float32MultiArray_> Ptr; + typedef boost::shared_ptr<::std_msgs::Float32MultiArray_ const> ConstPtr; + + }; // struct Float32MultiArray_ + + typedef ::std_msgs::Float32MultiArray_> Float32MultiArray; + + typedef boost::shared_ptr<::std_msgs::Float32MultiArray> Float32MultiArrayPtr; + typedef boost::shared_ptr<::std_msgs::Float32MultiArray const> Float32MultiArrayConstPtr; + + // constants requiring out of line definition + template + bool operator==(const ::std_msgs::Float32MultiArray_ &lhs, const ::std_msgs::Float32MultiArray_ &rhs) + { + return lhs.layout == rhs.layout && + lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::Float32MultiArray_ &lhs, const ::std_msgs::Float32MultiArray_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_FLOAT32MULTIARRAY_H diff --git a/std_msgs/include/std_msgs/Float64.h b/std_msgs/include/std_msgs/Float64.h new file mode 100644 index 0000000..1f8d51e --- /dev/null +++ b/std_msgs/include/std_msgs/Float64.h @@ -0,0 +1,55 @@ +// Generated by gencpp from file std_msgs/Float64.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_FLOAT64_H +#define STD_MSGS_MESSAGE_FLOAT64_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct Float64_ + { + typedef Float64_ Type; + + Float64_() + : data(0.0) + { + } + Float64_(const ContainerAllocator &_alloc) + : data(0.0) + { + (void)_alloc; + } + + typedef double _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::Float64_> Ptr; + typedef boost::shared_ptr<::std_msgs::Float64_ const> ConstPtr; + + }; // struct Float64_ + + typedef ::std_msgs::Float64_> Float64; + + typedef boost::shared_ptr<::std_msgs::Float64> Float64Ptr; + typedef boost::shared_ptr<::std_msgs::Float64 const> Float64ConstPtr; + + template + bool operator==(const ::std_msgs::Float64_ &lhs, const ::std_msgs::Float64_ &rhs) + { + return lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::Float64_ &lhs, const ::std_msgs::Float64_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_FLOAT64_H diff --git a/std_msgs/include/std_msgs/Float64MultiArray.h b/std_msgs/include/std_msgs/Float64MultiArray.h new file mode 100644 index 0000000..89ba05f --- /dev/null +++ b/std_msgs/include/std_msgs/Float64MultiArray.h @@ -0,0 +1,59 @@ +// Generated by gencpp from file std_msgs/Float64MultiArray.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_FLOAT64MULTIARRAY_H +#define STD_MSGS_MESSAGE_FLOAT64MULTIARRAY_H + +#include +#include +#include +#include + +namespace std_msgs +{ + template + struct Float64MultiArray_ + { + typedef Float64MultiArray_ Type; + + Float64MultiArray_() + : layout(), data() + { + } + Float64MultiArray_(const ContainerAllocator &_alloc) + : layout(_alloc), data(_alloc) + { + (void)_alloc; + } + + typedef ::std_msgs::MultiArrayLayout_ _layout_type; + _layout_type layout; + + typedef std::vector::template rebind_alloc> _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::Float64MultiArray_> Ptr; + typedef boost::shared_ptr<::std_msgs::Float64MultiArray_ const> ConstPtr; + + }; // struct Float64MultiArray_ + + typedef ::std_msgs::Float64MultiArray_> Float64MultiArray; + + typedef boost::shared_ptr<::std_msgs::Float64MultiArray> Float64MultiArrayPtr; + typedef boost::shared_ptr<::std_msgs::Float64MultiArray const> Float64MultiArrayConstPtr; + + template + bool operator==(const ::std_msgs::Float64MultiArray_ &lhs, const ::std_msgs::Float64MultiArray_ &rhs) + { + return lhs.layout == rhs.layout && + lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::Float64MultiArray_ &lhs, const ::std_msgs::Float64MultiArray_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs +#endif // STD_MSGS_MESSAGE_FLOAT64MULTIARRAY_H diff --git a/std_msgs/include/std_msgs/Header.h b/std_msgs/include/std_msgs/Header.h index 378e6bb..f34312c 100644 --- a/std_msgs/include/std_msgs/Header.h +++ b/std_msgs/include/std_msgs/Header.h @@ -9,24 +9,24 @@ namespace std_msgs { struct Header { - uint32_t seq = 0; // số thứ tự message - robot::Time stamp = robot::Time(0); // thời gian theo giây (Unix time) + uint32_t seq; // số thứ tự message + robot::Time stamp; // thời gian timestamp std::string frame_id; - Header() = default; - - // Hàm tạo nhanh header với timestamp hiện tại - static Header now(const std::string& frame = "") - { - robot::Time time_now = robot::Time::now(); - Header h; - h.seq = 0; - h.stamp = time_now; - h.frame_id = frame; - return h; - } + Header() : seq(0), stamp(robot::Time::now()), frame_id("") {} }; -} // namespace std_msgs +inline bool operator==(const std_msgs::Header& lhs, const std_msgs::Header &rhs) +{ + return lhs.seq == rhs.seq && + lhs.stamp == rhs.stamp && + lhs.frame_id == rhs.frame_id; +} +inline bool operator!=(const std_msgs::Header &lhs, const std_msgs::Header &rhs) +{ + return !(lhs == rhs); +} + +} // namespace std_msgs #endif diff --git a/std_msgs/include/std_msgs/Int16.h b/std_msgs/include/std_msgs/Int16.h new file mode 100644 index 0000000..0b3ab04 --- /dev/null +++ b/std_msgs/include/std_msgs/Int16.h @@ -0,0 +1,57 @@ +// Generated by gencpp from file std_msgs/Int16.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_INT16_H +#define STD_MSGS_MESSAGE_INT16_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct Int16_ + { + typedef Int16_ Type; + + Int16_() + : data(0) + { + } + Int16_(const ContainerAllocator &_alloc) + : data(0) + { + (void)_alloc; + } + + typedef int16_t _data_type; + _data_type data; + + typedef std::shared_ptr<::std_msgs::Int16_> Ptr; + typedef std::shared_ptr<::std_msgs::Int16_ const> ConstPtr; + + }; // struct Int16_ + + typedef ::std_msgs::Int16_> Int16; + + typedef std::shared_ptr<::std_msgs::Int16> Int16Ptr; + typedef std::shared_ptr<::std_msgs::Int16 const> Int16ConstPtr; + + // constants requiring out of line definition + + template + bool operator==(const ::std_msgs::Int16_ &lhs, const ::std_msgs::Int16_ &rhs) + { + return lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::Int16_ &lhs, const ::std_msgs::Int16_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_INT16_H diff --git a/std_msgs/include/std_msgs/Int16MultiArray.h b/std_msgs/include/std_msgs/Int16MultiArray.h new file mode 100644 index 0000000..d0c3a76 --- /dev/null +++ b/std_msgs/include/std_msgs/Int16MultiArray.h @@ -0,0 +1,60 @@ +// Generated by gencpp from file std_msgs/Int16MultiArray.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_INT16MULTIARRAY_H +#define STD_MSGS_MESSAGE_INT16MULTIARRAY_H + +#include +#include +#include +#include + +namespace std_msgs +{ + template + struct Int16MultiArray_ + { + typedef Int16MultiArray_ Type; + + Int16MultiArray_() + : layout(), data() + { + } + Int16MultiArray_(const ContainerAllocator &_alloc) + : layout(_alloc), data(_alloc) + { + (void)_alloc; + } + + typedef ::std_msgs::MultiArrayLayout_ _layout_type; + _layout_type layout; + + typedef std::vector::template rebind_alloc> _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::Int16MultiArray_> Ptr; + typedef boost::shared_ptr<::std_msgs::Int16MultiArray_ const> ConstPtr; + + }; // struct Int16MultiArray_ + + typedef ::std_msgs::Int16MultiArray_> Int16MultiArray; + + typedef boost::shared_ptr<::std_msgs::Int16MultiArray> Int16MultiArrayPtr; + typedef boost::shared_ptr<::std_msgs::Int16MultiArray const> Int16MultiArrayConstPtr; + + template + bool operator==(const ::std_msgs::Int16MultiArray_ &lhs, const ::std_msgs::Int16MultiArray_ &rhs) + { + return lhs.layout == rhs.layout && + lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::Int16MultiArray_ &lhs, const ::std_msgs::Int16MultiArray_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_INT16MULTIARRAY_H diff --git a/std_msgs/include/std_msgs/Int32.h b/std_msgs/include/std_msgs/Int32.h new file mode 100644 index 0000000..41f23df --- /dev/null +++ b/std_msgs/include/std_msgs/Int32.h @@ -0,0 +1,57 @@ +// Generated by gencpp from file std_msgs/Int32.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_INT32_H +#define STD_MSGS_MESSAGE_INT32_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct Int32_ + { + typedef Int32_ Type; + + Int32_() + : data(0) + { + } + Int32_(const ContainerAllocator &_alloc) + : data(0) + { + (void)_alloc; + } + + typedef int32_t _data_type; + _data_type data; + + typedef std::shared_ptr<::std_msgs::Int32_> Ptr; + typedef std::shared_ptr<::std_msgs::Int32_ const> ConstPtr; + + }; // struct Int32_ + + typedef ::std_msgs::Int32_> Int32; + + typedef std::shared_ptr<::std_msgs::Int32> Int32Ptr; + typedef std::shared_ptr<::std_msgs::Int32 const> Int32ConstPtr; + + // constants requiring out of line definition + + template + bool operator==(const ::std_msgs::Int32_ &lhs, const ::std_msgs::Int32_ &rhs) + { + return lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::Int32_ &lhs, const ::std_msgs::Int32_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_INT32_H diff --git a/std_msgs/include/std_msgs/Int32MultiArray.h b/std_msgs/include/std_msgs/Int32MultiArray.h new file mode 100644 index 0000000..eb548cb --- /dev/null +++ b/std_msgs/include/std_msgs/Int32MultiArray.h @@ -0,0 +1,61 @@ +// Generated by gencpp from file std_msgs/Int32MultiArray.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_INT32MULTIARRAY_H +#define STD_MSGS_MESSAGE_INT32MULTIARRAY_H + +#include +#include +#include + +#include + +namespace std_msgs +{ + template + struct Int32MultiArray_ + { + typedef Int32MultiArray_ Type; + + Int32MultiArray_() + : layout(), data() + { + } + Int32MultiArray_(const ContainerAllocator &_alloc) + : layout(_alloc), data(_alloc) + { + (void)_alloc; + } + + typedef ::std_msgs::MultiArrayLayout_ _layout_type; + _layout_type layout; + + typedef std::vector::template rebind_alloc> _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::Int32MultiArray_> Ptr; + typedef boost::shared_ptr<::std_msgs::Int32MultiArray_ const> ConstPtr; + + }; // struct Int32MultiArray_ + + typedef ::std_msgs::Int32MultiArray_> Int32MultiArray; + + typedef boost::shared_ptr<::std_msgs::Int32MultiArray> Int32MultiArrayPtr; + typedef boost::shared_ptr<::std_msgs::Int32MultiArray const> Int32MultiArrayConstPtr; + + template + bool operator==(const ::std_msgs::Int32MultiArray_ &lhs, const ::std_msgs::Int32MultiArray_ &rhs) + { + return lhs.layout == rhs.layout && + lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::Int32MultiArray_ &lhs, const ::std_msgs::Int32MultiArray_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_INT32MULTIARRAY_H diff --git a/std_msgs/include/std_msgs/Int64.h b/std_msgs/include/std_msgs/Int64.h new file mode 100644 index 0000000..2bdc3aa --- /dev/null +++ b/std_msgs/include/std_msgs/Int64.h @@ -0,0 +1,55 @@ +// Generated by gencpp from file std_msgs/Int64.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_INT64_H +#define STD_MSGS_MESSAGE_INT64_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct Int64_ + { + typedef Int64_ Type; + + Int64_() + : data(0) + { + } + Int64_(const ContainerAllocator &_alloc) + : data(0) + { + (void)_alloc; + } + + typedef int64_t _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::Int64_> Ptr; + typedef boost::shared_ptr<::std_msgs::Int64_ const> ConstPtr; + + }; // struct Int64_ + + typedef ::std_msgs::Int64_> Int64; + + typedef boost::shared_ptr<::std_msgs::Int64> Int64Ptr; + typedef boost::shared_ptr<::std_msgs::Int64 const> Int64ConstPtr; + + template + bool operator==(const ::std_msgs::Int64_ &lhs, const ::std_msgs::Int64_ &rhs) + { + return lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::Int64_ &lhs, const ::std_msgs::Int64_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_INT64_H diff --git a/std_msgs/include/std_msgs/Int64MultiArray.h b/std_msgs/include/std_msgs/Int64MultiArray.h new file mode 100644 index 0000000..fc9b4df --- /dev/null +++ b/std_msgs/include/std_msgs/Int64MultiArray.h @@ -0,0 +1,60 @@ +// Generated by gencpp from file std_msgs/Int64MultiArray.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_INT64MULTIARRAY_H +#define STD_MSGS_MESSAGE_INT64MULTIARRAY_H + +#include +#include +#include +#include + +namespace std_msgs +{ + template + struct Int64MultiArray_ + { + typedef Int64MultiArray_ Type; + + Int64MultiArray_() + : layout(), data() + { + } + Int64MultiArray_(const ContainerAllocator &_alloc) + : layout(_alloc), data(_alloc) + { + (void)_alloc; + } + + typedef ::std_msgs::MultiArrayLayout_ _layout_type; + _layout_type layout; + + typedef std::vector::template rebind_alloc> _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::Int64MultiArray_> Ptr; + typedef boost::shared_ptr<::std_msgs::Int64MultiArray_ const> ConstPtr; + + }; // struct Int64MultiArray_ + + typedef ::std_msgs::Int64MultiArray_> Int64MultiArray; + + typedef boost::shared_ptr<::std_msgs::Int64MultiArray> Int64MultiArrayPtr; + typedef boost::shared_ptr<::std_msgs::Int64MultiArray const> Int64MultiArrayConstPtr; + + template + bool operator==(const ::std_msgs::Int64MultiArray_ &lhs, const ::std_msgs::Int64MultiArray_ &rhs) + { + return lhs.layout == rhs.layout && + lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::Int64MultiArray_ &lhs, const ::std_msgs::Int64MultiArray_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_INT64MULTIARRAY_H diff --git a/std_msgs/include/std_msgs/Int8.h b/std_msgs/include/std_msgs/Int8.h new file mode 100644 index 0000000..f9ae91f --- /dev/null +++ b/std_msgs/include/std_msgs/Int8.h @@ -0,0 +1,57 @@ +// Generated by gencpp from file std_msgs/Int8.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_INT8_H +#define STD_MSGS_MESSAGE_INT8_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct Int8_ + { + typedef Int8_ Type; + + Int8_() + : data(0) + { + } + Int8_(const ContainerAllocator &_alloc) + : data(0) + { + (void)_alloc; + } + + typedef int8_t _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::Int8_> Ptr; + typedef boost::shared_ptr<::std_msgs::Int8_ const> ConstPtr; + + }; // struct Int8_ + + typedef ::std_msgs::Int8_> Int8; + + typedef boost::shared_ptr<::std_msgs::Int8> Int8Ptr; + typedef boost::shared_ptr<::std_msgs::Int8 const> Int8ConstPtr; + + // constants requiring out of line definition + + template + bool operator==(const ::std_msgs::Int8_ &lhs, const ::std_msgs::Int8_ &rhs) + { + return lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::Int8_ &lhs, const ::std_msgs::Int8_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_INT8_H diff --git a/std_msgs/include/std_msgs/Int8MultiArray.h b/std_msgs/include/std_msgs/Int8MultiArray.h new file mode 100644 index 0000000..9bfcf21 --- /dev/null +++ b/std_msgs/include/std_msgs/Int8MultiArray.h @@ -0,0 +1,60 @@ +// Generated by gencpp from file std_msgs/Int8MultiArray.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_INT8MULTIARRAY_H +#define STD_MSGS_MESSAGE_INT8MULTIARRAY_H + +#include +#include +#include +#include + +namespace std_msgs +{ + template + struct Int8MultiArray_ + { + typedef Int8MultiArray_ Type; + + Int8MultiArray_() + : layout(), data() + { + } + Int8MultiArray_(const ContainerAllocator &_alloc) + : layout(_alloc), data(_alloc) + { + (void)_alloc; + } + + typedef ::std_msgs::MultiArrayLayout_ _layout_type; + _layout_type layout; + + typedef std::vector::template rebind_alloc> _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::Int8MultiArray_> Ptr; + typedef boost::shared_ptr<::std_msgs::Int8MultiArray_ const> ConstPtr; + + }; // struct Int8MultiArray_ + + typedef ::std_msgs::Int8MultiArray_> Int8MultiArray; + + typedef boost::shared_ptr<::std_msgs::Int8MultiArray> Int8MultiArrayPtr; + typedef boost::shared_ptr<::std_msgs::Int8MultiArray const> Int8MultiArrayConstPtr; + + template + bool operator==(const ::std_msgs::Int8MultiArray_ &lhs, const ::std_msgs::Int8MultiArray_ &rhs) + { + return lhs.layout == rhs.layout && + lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::Int8MultiArray_ &lhs, const ::std_msgs::Int8MultiArray_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_INT8MULTIARRAY_H diff --git a/std_msgs/include/std_msgs/MultiArrayDimension.h b/std_msgs/include/std_msgs/MultiArrayDimension.h new file mode 100644 index 0000000..f374fe3 --- /dev/null +++ b/std_msgs/include/std_msgs/MultiArrayDimension.h @@ -0,0 +1,63 @@ +// Generated by gencpp from file std_msgs/MultiArrayDimension.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_MULTIARRAYDIMENSION_H +#define STD_MSGS_MESSAGE_MULTIARRAYDIMENSION_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct MultiArrayDimension_ + { + typedef MultiArrayDimension_ Type; + + MultiArrayDimension_() + : label(), size(0), stride(0) + { + } + MultiArrayDimension_(const ContainerAllocator &_alloc) + : label(_alloc), size(0), stride(0) + { + (void)_alloc; + } + + typedef std::basic_string, typename std::allocator_traits::template rebind_alloc> _label_type; + _label_type label; + + typedef uint32_t _size_type; + _size_type size; + + typedef uint32_t _stride_type; + _stride_type stride; + + typedef boost::shared_ptr<::std_msgs::MultiArrayDimension_> Ptr; + typedef boost::shared_ptr<::std_msgs::MultiArrayDimension_ const> ConstPtr; + + }; // struct MultiArrayDimension_ + + typedef ::std_msgs::MultiArrayDimension_> MultiArrayDimension; + + typedef boost::shared_ptr<::std_msgs::MultiArrayDimension> MultiArrayDimensionPtr; + typedef boost::shared_ptr<::std_msgs::MultiArrayDimension const> MultiArrayDimensionConstPtr; + + template + bool operator==(const ::std_msgs::MultiArrayDimension_ &lhs, const ::std_msgs::MultiArrayDimension_ &rhs) + { + return lhs.label == rhs.label && + lhs.size == rhs.size && + lhs.stride == rhs.stride; + } + + template + bool operator!=(const ::std_msgs::MultiArrayDimension_ &lhs, const ::std_msgs::MultiArrayDimension_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_MULTIARRAYDIMENSION_H diff --git a/std_msgs/include/std_msgs/MultiArrayLayout.h b/std_msgs/include/std_msgs/MultiArrayLayout.h new file mode 100644 index 0000000..34fd4d3 --- /dev/null +++ b/std_msgs/include/std_msgs/MultiArrayLayout.h @@ -0,0 +1,60 @@ +// Generated by gencpp from file std_msgs/MultiArrayLayout.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_MULTIARRAYLAYOUT_H +#define STD_MSGS_MESSAGE_MULTIARRAYLAYOUT_H + +#include +#include +#include +#include + +namespace std_msgs +{ + template + struct MultiArrayLayout_ + { + typedef MultiArrayLayout_ Type; + + MultiArrayLayout_() + : dim(), data_offset(0) + { + } + MultiArrayLayout_(const ContainerAllocator &_alloc) + : dim(_alloc), data_offset(0) + { + (void)_alloc; + } + + typedef std::vector<::std_msgs::MultiArrayDimension_, typename std::allocator_traits::template rebind_alloc<::std_msgs::MultiArrayDimension_>> _dim_type; + _dim_type dim; + + typedef uint32_t _data_offset_type; + _data_offset_type data_offset; + + typedef boost::shared_ptr<::std_msgs::MultiArrayLayout_> Ptr; + typedef boost::shared_ptr<::std_msgs::MultiArrayLayout_ const> ConstPtr; + + }; // struct MultiArrayLayout_ + + typedef ::std_msgs::MultiArrayLayout_> MultiArrayLayout; + + typedef boost::shared_ptr<::std_msgs::MultiArrayLayout> MultiArrayLayoutPtr; + typedef boost::shared_ptr<::std_msgs::MultiArrayLayout const> MultiArrayLayoutConstPtr; + + template + bool operator==(const ::std_msgs::MultiArrayLayout_ &lhs, const ::std_msgs::MultiArrayLayout_ &rhs) + { + return lhs.dim == rhs.dim && + lhs.data_offset == rhs.data_offset; + } + + template + bool operator!=(const ::std_msgs::MultiArrayLayout_ &lhs, const ::std_msgs::MultiArrayLayout_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_MULTIARRAYLAYOUT_H diff --git a/std_msgs/include/std_msgs/String.h b/std_msgs/include/std_msgs/String.h new file mode 100644 index 0000000..928e7e1 --- /dev/null +++ b/std_msgs/include/std_msgs/String.h @@ -0,0 +1,57 @@ +// Generated by gencpp from file std_msgs/String.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_STRING_H +#define STD_MSGS_MESSAGE_STRING_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct String_ + { + typedef String_ Type; + + String_() + : data() + { + } + String_(const ContainerAllocator &_alloc) + : data(_alloc) + { + (void)_alloc; + } + + typedef std::basic_string, typename std::allocator_traits::template rebind_alloc> _data_type; + _data_type data; + + typedef std::shared_ptr<::std_msgs::String_> Ptr; + typedef std::shared_ptr<::std_msgs::String_ const> ConstPtr; + + }; // struct String_ + + typedef ::std_msgs::String_> String; + + typedef std::shared_ptr<::std_msgs::String> StringPtr; + typedef std::shared_ptr<::std_msgs::String const> StringConstPtr; + + // constants requiring out of line definition + + template + bool operator==(const ::std_msgs::String_ &lhs, const ::std_msgs::String_ &rhs) + { + return lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::String_ &lhs, const ::std_msgs::String_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_STRING_H diff --git a/std_msgs/include/std_msgs/Time.h b/std_msgs/include/std_msgs/Time.h new file mode 100644 index 0000000..5a6e087 --- /dev/null +++ b/std_msgs/include/std_msgs/Time.h @@ -0,0 +1,59 @@ +// Generated by gencpp from file std_msgs/Time.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_TIME_H +#define STD_MSGS_MESSAGE_TIME_H + +#include +#include +#include + +#include + +namespace std_msgs +{ + template + struct Time_ + { + typedef Time_ Type; + + Time_() + : data() + { + } + Time_(const ContainerAllocator &_alloc) + : data() + { + (void)_alloc; + } + + typedef robot::Time _data_type; + _data_type data; + + typedef std::shared_ptr<::std_msgs::Time_> Ptr; + typedef std::shared_ptr<::std_msgs::Time_ const> ConstPtr; + + }; // struct Time_ + + typedef ::std_msgs::Time_> Time; + + typedef std::shared_ptr<::std_msgs::Time> TimePtr; + typedef std::shared_ptr<::std_msgs::Time const> TimeConstPtr; + + // constants requiring out of line definition + + template + bool operator==(const ::std_msgs::Time_ &lhs, const ::std_msgs::Time_ &rhs) + { + return lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::Time_ &lhs, const ::std_msgs::Time_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_TIME_H diff --git a/std_msgs/include/std_msgs/UInt16.h b/std_msgs/include/std_msgs/UInt16.h new file mode 100644 index 0000000..0de1af3 --- /dev/null +++ b/std_msgs/include/std_msgs/UInt16.h @@ -0,0 +1,55 @@ +// Generated by gencpp from file std_msgs/UInt16.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_UINT16_H +#define STD_MSGS_MESSAGE_UINT16_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct UInt16_ + { + typedef UInt16_ Type; + + UInt16_() + : data(0) + { + } + UInt16_(const ContainerAllocator &_alloc) + : data(0) + { + (void)_alloc; + } + + typedef uint16_t _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::UInt16_> Ptr; + typedef boost::shared_ptr<::std_msgs::UInt16_ const> ConstPtr; + + }; // struct UInt16_ + + typedef ::std_msgs::UInt16_> UInt16; + + typedef boost::shared_ptr<::std_msgs::UInt16> UInt16Ptr; + typedef boost::shared_ptr<::std_msgs::UInt16 const> UInt16ConstPtr; + + template + bool operator==(const ::std_msgs::UInt16_ &lhs, const ::std_msgs::UInt16_ &rhs) + { + return lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::UInt16_ &lhs, const ::std_msgs::UInt16_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_UINT16_H diff --git a/std_msgs/include/std_msgs/UInt16MultiArray.h b/std_msgs/include/std_msgs/UInt16MultiArray.h new file mode 100644 index 0000000..1a4af14 --- /dev/null +++ b/std_msgs/include/std_msgs/UInt16MultiArray.h @@ -0,0 +1,60 @@ +// Generated by gencpp from file std_msgs/UInt16MultiArray.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_UINT16MULTIARRAY_H +#define STD_MSGS_MESSAGE_UINT16MULTIARRAY_H + +#include +#include +#include +#include + +namespace std_msgs +{ + template + struct UInt16MultiArray_ + { + typedef UInt16MultiArray_ Type; + + UInt16MultiArray_() + : layout(), data() + { + } + UInt16MultiArray_(const ContainerAllocator &_alloc) + : layout(_alloc), data(_alloc) + { + (void)_alloc; + } + + typedef ::std_msgs::MultiArrayLayout_ _layout_type; + _layout_type layout; + + typedef std::vector::template rebind_alloc> _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::UInt16MultiArray_> Ptr; + typedef boost::shared_ptr<::std_msgs::UInt16MultiArray_ const> ConstPtr; + + }; // struct UInt16MultiArray_ + + typedef ::std_msgs::UInt16MultiArray_> UInt16MultiArray; + + typedef boost::shared_ptr<::std_msgs::UInt16MultiArray> UInt16MultiArrayPtr; + typedef boost::shared_ptr<::std_msgs::UInt16MultiArray const> UInt16MultiArrayConstPtr; + + template + bool operator==(const ::std_msgs::UInt16MultiArray_ &lhs, const ::std_msgs::UInt16MultiArray_ &rhs) + { + return lhs.layout == rhs.layout && + lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::UInt16MultiArray_ &lhs, const ::std_msgs::UInt16MultiArray_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_UINT16MULTIARRAY_H diff --git a/std_msgs/include/std_msgs/UInt32.h b/std_msgs/include/std_msgs/UInt32.h new file mode 100644 index 0000000..3ea1a12 --- /dev/null +++ b/std_msgs/include/std_msgs/UInt32.h @@ -0,0 +1,55 @@ +// Generated by gencpp from file std_msgs/UInt32.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_UINT32_H +#define STD_MSGS_MESSAGE_UINT32_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct UInt32_ + { + typedef UInt32_ Type; + + UInt32_() + : data(0) + { + } + UInt32_(const ContainerAllocator &_alloc) + : data(0) + { + (void)_alloc; + } + + typedef uint32_t _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::UInt32_> Ptr; + typedef boost::shared_ptr<::std_msgs::UInt32_ const> ConstPtr; + + }; // struct UInt32_ + + typedef ::std_msgs::UInt32_> UInt32; + + typedef boost::shared_ptr<::std_msgs::UInt32> UInt32Ptr; + typedef boost::shared_ptr<::std_msgs::UInt32 const> UInt32ConstPtr; + + template + bool operator==(const ::std_msgs::UInt32_ &lhs, const ::std_msgs::UInt32_ &rhs) + { + return lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::UInt32_ &lhs, const ::std_msgs::UInt32_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_UINT32_H diff --git a/std_msgs/include/std_msgs/UInt32MultiArray.h b/std_msgs/include/std_msgs/UInt32MultiArray.h new file mode 100644 index 0000000..c283831 --- /dev/null +++ b/std_msgs/include/std_msgs/UInt32MultiArray.h @@ -0,0 +1,60 @@ +// Generated by gencpp from file std_msgs/UInt32MultiArray.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_UINT32MULTIARRAY_H +#define STD_MSGS_MESSAGE_UINT32MULTIARRAY_H + +#include +#include +#include +#include + +namespace std_msgs +{ + template + struct UInt32MultiArray_ + { + typedef UInt32MultiArray_ Type; + + UInt32MultiArray_() + : layout(), data() + { + } + UInt32MultiArray_(const ContainerAllocator &_alloc) + : layout(_alloc), data(_alloc) + { + (void)_alloc; + } + + typedef ::std_msgs::MultiArrayLayout_ _layout_type; + _layout_type layout; + + typedef std::vector::template rebind_alloc> _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::UInt32MultiArray_> Ptr; + typedef boost::shared_ptr<::std_msgs::UInt32MultiArray_ const> ConstPtr; + + }; // struct UInt32MultiArray_ + + typedef ::std_msgs::UInt32MultiArray_> UInt32MultiArray; + + typedef boost::shared_ptr<::std_msgs::UInt32MultiArray> UInt32MultiArrayPtr; + typedef boost::shared_ptr<::std_msgs::UInt32MultiArray const> UInt32MultiArrayConstPtr; + + template + bool operator==(const ::std_msgs::UInt32MultiArray_ &lhs, const ::std_msgs::UInt32MultiArray_ &rhs) + { + return lhs.layout == rhs.layout && + lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::UInt32MultiArray_ &lhs, const ::std_msgs::UInt32MultiArray_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_UINT32MULTIARRAY_H diff --git a/std_msgs/include/std_msgs/UInt64.h b/std_msgs/include/std_msgs/UInt64.h new file mode 100644 index 0000000..c02dfa2 --- /dev/null +++ b/std_msgs/include/std_msgs/UInt64.h @@ -0,0 +1,55 @@ +// Generated by gencpp from file std_msgs/UInt64.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_UINT64_H +#define STD_MSGS_MESSAGE_UINT64_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct UInt64_ + { + typedef UInt64_ Type; + + UInt64_() + : data(0) + { + } + UInt64_(const ContainerAllocator &_alloc) + : data(0) + { + (void)_alloc; + } + + typedef uint64_t _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::UInt64_> Ptr; + typedef boost::shared_ptr<::std_msgs::UInt64_ const> ConstPtr; + + }; // struct UInt64_ + + typedef ::std_msgs::UInt64_> UInt64; + + typedef boost::shared_ptr<::std_msgs::UInt64> UInt64Ptr; + typedef boost::shared_ptr<::std_msgs::UInt64 const> UInt64ConstPtr; + + template + bool operator==(const ::std_msgs::UInt64_ &lhs, const ::std_msgs::UInt64_ &rhs) + { + return lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::UInt64_ &lhs, const ::std_msgs::UInt64_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_UINT64_H diff --git a/std_msgs/include/std_msgs/UInt64MultiArray.h b/std_msgs/include/std_msgs/UInt64MultiArray.h new file mode 100644 index 0000000..0ecb23f --- /dev/null +++ b/std_msgs/include/std_msgs/UInt64MultiArray.h @@ -0,0 +1,60 @@ +// Generated by gencpp from file std_msgs/UInt64MultiArray.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_UINT64MULTIARRAY_H +#define STD_MSGS_MESSAGE_UINT64MULTIARRAY_H + +#include +#include +#include +#include + +namespace std_msgs +{ + template + struct UInt64MultiArray_ + { + typedef UInt64MultiArray_ Type; + + UInt64MultiArray_() + : layout(), data() + { + } + UInt64MultiArray_(const ContainerAllocator &_alloc) + : layout(_alloc), data(_alloc) + { + (void)_alloc; + } + + typedef ::std_msgs::MultiArrayLayout_ _layout_type; + _layout_type layout; + + typedef std::vector::template rebind_alloc> _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::UInt64MultiArray_> Ptr; + typedef boost::shared_ptr<::std_msgs::UInt64MultiArray_ const> ConstPtr; + + }; // struct UInt64MultiArray_ + + typedef ::std_msgs::UInt64MultiArray_> UInt64MultiArray; + + typedef boost::shared_ptr<::std_msgs::UInt64MultiArray> UInt64MultiArrayPtr; + typedef boost::shared_ptr<::std_msgs::UInt64MultiArray const> UInt64MultiArrayConstPtr; + + template + bool operator==(const ::std_msgs::UInt64MultiArray_ &lhs, const ::std_msgs::UInt64MultiArray_ &rhs) + { + return lhs.layout == rhs.layout && + lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::UInt64MultiArray_ &lhs, const ::std_msgs::UInt64MultiArray_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_UINT64MULTIARRAY_H diff --git a/std_msgs/include/std_msgs/UInt8.h b/std_msgs/include/std_msgs/UInt8.h new file mode 100644 index 0000000..97436a2 --- /dev/null +++ b/std_msgs/include/std_msgs/UInt8.h @@ -0,0 +1,55 @@ +// Generated by gencpp from file std_msgs/UInt8.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_UINT8_H +#define STD_MSGS_MESSAGE_UINT8_H + +#include +#include +#include + +namespace std_msgs +{ + template + struct UInt8_ + { + typedef UInt8_ Type; + + UInt8_() + : data(0) + { + } + UInt8_(const ContainerAllocator &_alloc) + : data(0) + { + (void)_alloc; + } + + typedef uint8_t _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::UInt8_> Ptr; + typedef boost::shared_ptr<::std_msgs::UInt8_ const> ConstPtr; + + }; // struct UInt8_ + + typedef ::std_msgs::UInt8_> UInt8; + + typedef boost::shared_ptr<::std_msgs::UInt8> UInt8Ptr; + typedef boost::shared_ptr<::std_msgs::UInt8 const> UInt8ConstPtr; + + template + bool operator==(const ::std_msgs::UInt8_ &lhs, const ::std_msgs::UInt8_ &rhs) + { + return lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::UInt8_ &lhs, const ::std_msgs::UInt8_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_UINT8_H diff --git a/std_msgs/include/std_msgs/UInt8MultiArray.h b/std_msgs/include/std_msgs/UInt8MultiArray.h new file mode 100644 index 0000000..fede9ea --- /dev/null +++ b/std_msgs/include/std_msgs/UInt8MultiArray.h @@ -0,0 +1,60 @@ +// Generated by gencpp from file std_msgs/UInt8MultiArray.msg +// DO NOT EDIT! + +#ifndef STD_MSGS_MESSAGE_UINT8MULTIARRAY_H +#define STD_MSGS_MESSAGE_UINT8MULTIARRAY_H + +#include +#include +#include +#include + +namespace std_msgs +{ + template + struct UInt8MultiArray_ + { + typedef UInt8MultiArray_ Type; + + UInt8MultiArray_() + : layout(), data() + { + } + UInt8MultiArray_(const ContainerAllocator &_alloc) + : layout(_alloc), data(_alloc) + { + (void)_alloc; + } + + typedef ::std_msgs::MultiArrayLayout_ _layout_type; + _layout_type layout; + + typedef std::vector::template rebind_alloc> _data_type; + _data_type data; + + typedef boost::shared_ptr<::std_msgs::UInt8MultiArray_> Ptr; + typedef boost::shared_ptr<::std_msgs::UInt8MultiArray_ const> ConstPtr; + + }; // struct UInt8MultiArray_ + + typedef ::std_msgs::UInt8MultiArray_> UInt8MultiArray; + + typedef boost::shared_ptr<::std_msgs::UInt8MultiArray> UInt8MultiArrayPtr; + typedef boost::shared_ptr<::std_msgs::UInt8MultiArray const> UInt8MultiArrayConstPtr; + + template + bool operator==(const ::std_msgs::UInt8MultiArray_ &lhs, const ::std_msgs::UInt8MultiArray_ &rhs) + { + return lhs.layout == rhs.layout && + lhs.data == rhs.data; + } + + template + bool operator!=(const ::std_msgs::UInt8MultiArray_ &lhs, const ::std_msgs::UInt8MultiArray_ &rhs) + { + return !(lhs == rhs); + } + +} // namespace std_msgs + +#endif // STD_MSGS_MESSAGE_UINT8MULTIARRAY_H diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt new file mode 100644 index 0000000..31d3766 --- /dev/null +++ b/utils/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.10) + +# --- Project riêng cho utils --- +project(utils LANGUAGES CXX) + +# --- Tạo INTERFACE library (header-only) --- +add_library(utils INTERFACE) + +# --- Include directories --- +target_include_directories(utils + INTERFACE + $ # build nội bộ + $ # dùng khi install/export +) + +# --- Cài đặt header files --- +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ + DESTINATION include/utils + FILES_MATCHING PATTERN "*.h" +) + +# --- Cài đặt target INTERFACE để export --- +install(TARGETS utils + EXPORT utils-targets +) + +# --- Export target file --- +install(EXPORT utils-targets + FILE utils-targets.cmake + NAMESPACE utils:: + DESTINATION lib/cmake/utils +) diff --git a/utils/utils.h b/utils/utils.h new file mode 100644 index 0000000..524e32d --- /dev/null +++ b/utils/utils.h @@ -0,0 +1,11 @@ +#ifndef UTILIS_MSGS_H +#define UTILIS_MSGS_H +#include + +template +bool isEqual(const T& a, const T& b, double eps = 1e-5) +{ + return std::fabs(a - b) < eps; +} + +#endif // UTILIS_MSGS_H \ No newline at end of file