remove function

This commit is contained in:
duongtd 2025-12-05 11:28:20 +07:00
parent 59c8d4fd69
commit 7416a97789

View File

@ -10,32 +10,32 @@
#include <robot/time.h> #include <robot/time.h>
#include <cmath> #include <cmath>
template <typename T> // template <typename T>
bool isEqual(const T& a, const T& b, double eps = 1e-5) // bool isEqual(const T& a, const T& b, double eps = 1e-5)
{ // {
return std::fabs(a - b) < eps; // return std::fabs(a - b) < eps;
} // }
inline bool operator==(const geometry_msgs::Quaternion& a, const geometry_msgs::Quaternion& b) // inline bool operator==(const geometry_msgs::Quaternion& a, const geometry_msgs::Quaternion& b)
{ // {
return isEqual(a.x, b.x) && isEqual(a.y, b.y) && isEqual(a.z, b.z) && isEqual(a.w, b.w); // return isEqual(a.x, b.x) && isEqual(a.y, b.y) && isEqual(a.z, b.z) && isEqual(a.w, b.w);
} // }
inline bool operator==(const geometry_msgs::Point& a, const geometry_msgs::Point& b) // inline bool operator==(const geometry_msgs::Point& a, const geometry_msgs::Point& b)
{ // {
return isEqual(a.x, b.x) && isEqual(a.y, b.y) && isEqual(a.z, b.z); // return isEqual(a.x, b.x) && isEqual(a.y, b.y) && isEqual(a.z, b.z);
} // }
inline bool operator==(const geometry_msgs::Pose& a, const geometry_msgs::Pose& b) // inline bool operator==(const geometry_msgs::Pose& a, const geometry_msgs::Pose& b)
{ // {
return (a.position == b.position) && (a.orientation == b.orientation); // return (a.position == b.position) && (a.orientation == b.orientation);
} // }
inline bool operator==(const geometry_msgs::PoseStamped& a, const geometry_msgs::PoseStamped& b) // inline bool operator==(const geometry_msgs::PoseStamped& a, const geometry_msgs::PoseStamped& b)
{ // {
return (a.header.frame_id == b.header.frame_id) && // return (a.header.frame_id == b.header.frame_id) &&
(a.pose == b.pose); // (a.pose == b.pose);
} // }
namespace data_convert namespace data_convert
{ {